Skip to content

Instantly share code, notes, and snippets.

@Tarek-O
Created July 5, 2022 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tarek-O/51bcfe66655aa9366637bf45d9a6e498 to your computer and use it in GitHub Desktop.
Save Tarek-O/51bcfe66655aa9366637bf45d9a6e498 to your computer and use it in GitHub Desktop.
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "android");
cap.setCapability("fullReset", false);
cap.setCapability("automationName", "UiAutomator2");
//cap.setCapability("appWaitActivity", "");
cap.setCapability(MobileCapabilityType.APP, System.getProperty("user.dir")+"//App//****.apk");
driver = new AndroidDriver<WebElement>(new URL("http://0.0.0.0:4723/wd/hub"), cap);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment