Read sms message on real device (Android)


#1

Hi ,

Is there a way to read a sms message on real device (Android) , the idea is to read it straight from the notification bar and not from the messages app.

Thanks


#2

#3

@MrZigaS thanks for the link

Aleksei’s solution is great , the only problem with the PO for notification bar that is almost unlimited , each phone manufacture creates his own UI implementation and the UI controls have different ids therefore it’s hard to create generic PO :disappointed_relieved:

I’ve already seen differences between Pixel , Samsung and LG , and the devices list is huge


#4

@igal_epshtein just use ALL_POSSIBLE:

@HowToUseLocators(androidAutomation = ALL_POSSIBLE)
@AndroidFindBy(uiAutomator = "new UiSelector().resourceId(\"android:id/Fakecontent\")")
@AndroidFindBy(id = "android:id/Faketext1")
@AndroidFindBy(uiAutomator = "new UiSelector().resourceId(\"android:id/list\")")
//by this locator element is found
@AndroidFindBy(id = "android:id/FakeId")
private List<WebElement> findAllElementViews;