Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Archives: FAQs

Swipe on Mobile Application

TouchAction touchAction = new TouchAction(driver);AndroidElement element = driver.findElementById(“android:id/content”);Point point = element.getLocation();Dimension size = element.getSize();touchAction.press(PointOption.point(point.getX() + 5, point.getY() + 5)).waitAction(WaitOptions.waitOptions(Duration.ofMillis(200))).moveTo(PointOption.point(point.getX() + size.getWidth() – 5, point.getY() + size.getHeight() – 5)).release().perform();

Locating Elements with Appium

By ID : AndroidElement button = driver.findElementById(“com.example.android.apis:id/button”);By Class : AndroidElement checkBox = driver.findElementByClassName(“android.widget.CheckBox”);By XPath : AndroidElement secondButton = driver.findElementByXPath(“//*[@resource-id=’com.example.android.apis:id/button’]”);By AndroidUIAutomator : AndroidElement thirdButton = driver.findElementByAndroidUIAutomator(“new UiSelector().textContains(\”BUTTO\”);”);