Closed Ravicmeti closed 6 years ago
@BeforeClass public void MobileTestLaunch() { /*driver = Utility.getDriver(); System.out.println(driver);*/ String path; System.out.println("Session is creating"); path = System.getProperty("user.dir"); DesiredCapabilities cap = new DesiredCapabilities(); cap.setCapability("platformName", "Android"); cap.setCapability("deviceName", "Fieldez(SM-T311)"); cap.setCapability("app", path+"//app//fieldEZ1.apk"); try { driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), cap); System.out.println(driver); // printing Android: null here } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); System.out.println("Session is created"); }
@Ravicmeti not exactly sure how the above code is connected to nativescript-backghrouind-http plugin - please elaborate more.