Code Snippet: ((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.HOME);   Read More
Categories : Appium
Posted by Sridatta Pani
No Comments
Code Snippet: //BACK KEY PRESSED ((PressesKeyCode) driver).pressKeyCode(AndroidKeyCode.BACK);   Read More
Categories : Appium
Posted by Sridatta Pani
No Comments
Code Snippet: driver.installApp("/UpgradeAPPVersion/TheApp-v1.7.0.apk"); Activity activity = new Activity("io.cloudgrey.the_app","io.cloudgrey.the_app.MainActivity"); driver.startActivity(activity); Read More
Categories : Appium
Posted by Sridatta Pani
No Comments
Code Snippet: Twilio.init(ACCOUNT_SID,AUTH_TOKEN); Message message = Message.creator(new PhoneNumber("+91 77##########"),new PhoneNumber("+170#########"), "your otp is 123456").create(); Read More
Categories : Appium
Posted by Sridatta Pani
No Comments
For that, they need to trust the app before running their script and they need to resign (pCloudy Feature) their application and try to use resigned application with proper bundleId. Read More
Categories : Appium
Posted by Shibu Panda
No Comments
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