Unable to get attributes using UI automator

Hi,

I am unable to get attributes using UI automator.

i am trying to validate field with different set of test data and verify appropriate message is displayed.
i am unable to get attributes as the message displayed is under image view, where neither id nor class is displayed.

i need to read message - " please enter a valid phone number" and accordingly validate the same.

can any one suggest me solution for the same.

Regards,
Prakash.

Have you tried pagesource? If not try to get driver.getpagesource(). Some times the value it is not identified in uiautomator but if you take full page source all values it will display in hierarchy

Hi Jayesh,

I tried with driver.getpagesource(), but the pop up message is not getting populated in the xml generated.
is there any other solution ? please suggest.
Thanks
Prakash.