Android Driver starting Safari

52 views
Skip to first unread message

Joshua Grant

unread,
Jul 5, 2013, 3:24:37 PM7/5/13
to seleniu...@googlegroups.com
Hello everyone, 

This looks like a bug, but I'm not sure if it's a known issue or maybe some config problem on my end. 

I'm trying to run some tests with the Remote WebDriver on an Android device using the AndroidDriver(). The RemoteDriver is connected through Selenium Grid. When I start my tests and try to initialize the webdriver, I get the following error:

org.openqa.selenium.WebDriverException: Safari could not be found in the path!
Please add the directory containing ''Safari.exe'' to your PATH environment
variable, or explicitly specify a path to Safari like this:
*safari c:\blah\Safari.exe
Command duration or timeout: 134 milliseconds
Build info: version: '2.33.0', revision: '4ecaf82108b2a6cc6f006aae81961236eba93358', time: '2013-05-22 12:00:17'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_09'
Driver info: org.openqa.selenium.android.AndroidDriver

This is consistent with trying to use a SafariDriver(). 

I tried running these tests after installing Safari for windows, and sure enough, the tests started and ran with the Safari browser. Uninstalling Safari leads to the above error again. 

The driver initialization looks like this:

dc = DesiredCapabilities.android();
dc.setBrowserName("android");
dc.setPlatform(Platform.ANDROID);
dc.setJavascriptEnabled(true);
dc.setCapability("takesScreenshot", true);
dc.setCapability("environment", "tablet");
driver = new AndroidDriver(new URL("http://" + host + ":4444/wd/hub"), dc);

Any insights here? I'm using the Android SDK with android-server-2.21.0, WebDriver for Java verison 2.32 and Java 1.7 

Thanks!

Josh

Krishnan Mahadevan

unread,
Jul 6, 2013, 2:47:53 AM7/6/13
to Selenium Users
Josh,

I dont think you are doing it correctly.
When you say you are using Grid, have you ensured that the the device/android simulator is hooked on to your Grid ? 

Can you check your Grid console and make sure that the android node even shows up there ?





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/071b48ed-be17-4149-a437-f78edf82b75b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Joshua Grant

unread,
Jul 8, 2013, 1:40:53 PM7/8/13
to seleniu...@googlegroups.com
I've actually gotten this result immediately after debugging some working tests. 
This is what's been happening:

  1. I start to run the scripts in debug mode using Eclipse
  2. The WebDriver correctly works on the Android tablet I'm working with
  3. I stop the debugger to do some coding
  4. When I try to restart the scripts in the debugger, I get the above errors relating to Safari

Reply all
Reply to author
Forward
0 new messages