I'm trying to automate android mobile app using selenium/java with appium. I connected the android device to my pc and trying to inspect the elements on app screen after taking the screenshot using uiautomator viewer. But the whole screen is displayed inside single frameLayout and I couldn't inspect each element inside the frame.
I tried with chrome inspect as well but elements are not detected using chrome inspector.
Can sometime please help on this?
This is the similar question I have put up some time ago:
How to tap on a element which is focused in appium. Unable to select value of a dropdown in appium
One of the thing you can try by switch to frame if any frame present.
Try using
driver.getPageSource();
. It will return you XML DOM, if you are getting the value then it is good. Write a XPath for same.Either you just need to use co-ordinare and then using tab
Below code work for me
Note:- you need to adjust X and Y as per your requirement in above code and pass the nearest locator like text box of the dropdown.