Code Snippet: TouchAction touch = new TouchAction(driver); touch.press(driver.findElement(By.id("elementID on top"))).waitAction(Duration.ofMillis(2000)).moveTo(driver.findElement(By.id("ElementId on bottom"))).release().perform();   Get the apk: https://www.google.com/url?q=http://search.maven.org/remotecontent?filepath%3Dcom/navercorp/pulltorefresh/sample/3.2.2/sample-3.2.2.apk&sa=D&source=hangouts&ust=1539068982276000&usg=AFQjCNHmfVRCdprrf46-u5-MOKdS4qJfBQ Read More
Categories : Appium
Posted by Shibu Panda
No Comments
Code Snippet: //str => Which text contains by the element driver.findElementsByAndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(\"" + str +"\").instance(0))"); Read More
Categories : Appium
Posted by Shibu Panda
No Comments
Code Snippet: //Here we have Initialized driver as AppiumDriver driver.findElement(By.id(“doc.saulmm.notification: id / simple_notification”)).click(); ((AndroidDriver < WebElement > ) driver).openNotifications(); List < WebElement > notificationTitles = driver.findElements(By.id(“android: id / title”)); for (WebElement title: notificationTitles) { String Read More
Categories : Appium
Posted by Shibu Panda
No Comments
Code Snippet: Set contextNames = driver.getContextHandles(); driver.context(); Yes, WebView.setWebContentsDebuggingEnabled(true); is needed for webviews to work through UI Automator. This is an Android requirement, not Appium. Read More
Categories : Appium
Posted by Shibu Panda
No Comments
To grant all permission for your application(Android) you can add: capabilities.setCapability("autoGrantPermissions",true); Read More
Categories : Appium
Posted by Anshuman Chatterjee
No Comments