Code Snippet: //Get the size of screen. Dimension size = driver.manage().window().getSize(); //Find swipe start and end point from screen’s with and height. int starty = (int) (size.height * 0.80); //Find endy point which is at Read More
Categories : Appium
Posted by Sridatta Pani
No Comments
Code Snippet: MobileElement keyboard = (MobileElement) driver.findElement(MobileBy.className(“UIAKeyboard”)); keyboard.findElements(By.name(“Return”)).get(0).click(); Thread.sleep(5000); OR ((IOSDriver) driver).hideKeyboard(HideKeyboardStrategy.PRESS_KEY, “Return”); Read More
Categories : Appium
Posted by Sridatta Pani
No Comments
Code Snippet: package com.networkConnection; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.DesiredCapabilities; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import io.appium.java_client.AppiumDriver; import io.appium.java_client.android.AndroidDriver; import io.appium.java_client.android.Connection; import io.appium.java_client.android.HasNetworkConnection; public Read More
Categories : Appium
Posted by Sridatta Pani
1 Comment
Code Snippet: package com.networkConnection; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.DesiredCapabilities; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import io.appium.java_client.AppiumDriver; import io.appium.java_client.android.AndroidDriver; import io.appium.java_client.android.Connection; import io.appium.java_client.android.HasNetworkConnection; public Read More
Categories : Appium
Posted by Sridatta Pani
No Comments
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