Refer this and add this capability in your script. caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, “uiAutomator2”);