How to find X and Y co-ordinate of a particular element?

WebElement acceptButton= driver.findElement(By.xpath(“//android.widget.Button[@resource-id=’com.pcloudy.appiumdemo:id/accept’]”)); By this below script we can get the xcordinate of the particular element acceptButton.getLocation().getX(); By this below script we can get the Ycordinate of the particular element …

How to enable wifi using appium in android local device ?

String adbCommand = “adb shell am broadcast -a io.appium.settings.wifi –es setstatus enable”; runCommand(adbCommand); public String runCommand(String command) throws InterruptedException, IOException { p = Runtime.getRuntime().exec(command); // get std output BufferedReader r …

How to disable wifi in local Android device using appium?

String adbCommand = “adb shell am broadcast -a io.appium.settings.wifi –es setstatus disable”; runCommand(adbCommand); public String runCommand(String command) throws InterruptedException, IOException { p = Runtime.getRuntime().exec(command); // get std output BufferedReader r …