This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
1 / 4
Feb 2019

try: driver.findElementByAndroidUIAutomator(new UiSelector().text(“Markets”)").click();
and make sure you do not have a typo in xpath:
driver.findElement(By.xpath("//android.widget.TextView[@text, ‘Markets’]")).click();

What do you have under (0) TextView: , above (1) TextView: Markets ?

try

driver.findElement(By.xpath("//android.widget.TextView[@text=‘Markets’]")).click();

above one should work, if it doesn’t. Then it means that element was unable to found on DOM, so try to put explicit wait before clicking on that element. On other hand to make your code more dynamic you can take the layout of that bottom navigation bar then iterate by no of items and perform you required action(without taking these texts as a reference to the elemnts).