Appium AVD device setup
1-UI Automator viewer- to find locators 2- androidUIautomator driver.findElementByAndroidUIAutomator("text(\"Views\")").click(); AndroidDriver<AndroidElement> driver; ######################################################################### File f= new File("src"); File fs= new File(f,"ApiDemos-debug.apk"); DesiredCapabilities cp = new DesiredCapabilities(); cp.setCapability(MobileCapabilityType.DEVICE_NAME,"AndriodTest"); cp.setCapability(MobileCapabilityType.AUTOMATION_NAME,"Uiautomator2"); cp.setCapability(MobileCapabilityType.APP,fs.getAbsolutePath()); driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"), cp); //xpath id className, androidUIautomator /* xpath Syntax * //tagName[@attribute='value']. driver.findElementByXPath("//android.widget.TextView[@text='Preference']")....