Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
480 views
by Contributing Tester (54 points)
edited by

I am automating mobile web using ios-driver on iPhone 6, the safari browser opens but it doesn’t load the URL, instead I get the about:blank page.

The configuration as shown in terminal by running the command:

command:

java -jar ios-server-standalone-0.6.6-SNAPSHOT.jar -newSessionTimeoutSec 40 -port 4444 -beta


Configuration:
 

Running on: Mac OS X 10.10 (x86_64)
Using java: 1.8.0_45
Using Xcode install: /Applications/Xcode.app
Using instruments: version:6.3.2, build: 57082
Using iOS version 8.3

My Java Code is as follows:
 

IOSCapabilities capabilities = IOSCapabilities.iphone("Safari");
capabilities.setCapability(IOSCapabilities.SIMULATOR, false);
capabilities.setCapability(IOSCapabilities.UUID, "UID-of-Device");
capabilities.setCapability("javascriptEnabled", true);
RemoteIOSDriver webDriver = null;
try {
    webDriver = new RemoteIOSDriver(new URL("http://localhost:4444/wd/hub"), capabilities);
} catch (MalformedURLException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
}
webDriver.get("https://www.apple.com/");
webDriver.quit();

I am getting the following error:
 

Exception in thread "main" org.openqa.selenium.WebDriverException: is Safari started and with the focus ?

2 Answers

0 like 0 dislike
by The go-to Tester (143 points)

This looks like an issue with the driver. Visit the following link for more insight.

https://github.com/ios-driver/ios-driver/issues/369

 

0 like 0 dislike
by
This looks like a bug on GitHub

https://github.com/ios-driver/ios-driver/issues/369

Also, you can try upgrading or downgrade your environment to see what works for you.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...