Created
July 23, 2019 17:20
-
-
Save ckzgraphics/ead589139dfb4d506ad85ff454c336ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.URL; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import io.appium.java_client.AppiumDriver; | |
import io.appium.java_client.android.AndroidDriver; | |
public class Debug_Android_WebSiteOpen { | |
public static void main(String[] args) { | |
String HUB_URL = "http://localhost:4723/wd/hub"; | |
AppiumDriver webDriver = null; | |
URL URLObj = null; | |
DesiredCapabilities capss = null; | |
String AUT_URL = "https://uidtest.accounts400.ondemand.com"; | |
try { | |
URLObj = new URL(HUB_URL); | |
capss = new DesiredCapabilities(); | |
capss.setCapability("platformName", "Android"); | |
capss.setCapability("platformVersion", "9.0"); | |
capss.setCapability("deviceName", "Nokia 7 Plus"); | |
capss.setCapability("browserName", "chrome"); | |
capss.setCapability("udid", "B2NGAA8822603421"); | |
webDriver = new AndroidDriver(URLObj, capss); | |
webDriver.get(AUT_URL); | |
webDriver.getPageSource(); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} finally { | |
if(webDriver != null){ | |
webDriver.quit(); | |
} | |
} // CATCH END | |
} // FUNC END | |
} // CLASS END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment