My code but it is not working:

MobileElement el = (MobileElement) driver.findElementById("jpb.com.upisimulator:id/action_bar");
        MobileElement el2 = el.findElementByName("Open navigation drawer");
        el2.click();
1

There are 1 best solutions below

0
On

You have to use content description for that.

driver.findElementByAccessibilityId("Open navigation drawer").click();