OperaDriver 1.2 With Selenium 2.32.0 on Windows 8

“Hmm, why aren’t my tests on Opera working any more?”

For those of you that want to skip to the chase and see my hack then I did this, just before I created a new OperaDriver();

System.setProperty("os.name","windows");
driver = new OperaDriver();

And thanks to you for sticking around to see the investigation process…

Caused by: org.openqa.selenium.WebDriverException: 
Could not find a platform that supports bundled launchers, 
please set it manually
Build info: version: '2.32.0', revision: 
'6c40c187d01409a5dc3b7f8251859150c8af0bcb', time: '2013-04-09 10:39:28'
System info: os.name: 'Windows 8', os.arch: 'amd64', 
os.version: '6.2', java.version: '1.7.0_10'
Driver info: driver.version: OperaDriver
    at com.opera.core.systems.runner.launcher.OperaLauncherRunner.
launcherNameForOS(OperaLauncherRunner.java:543)
    at com.opera.core.systems.runner.launcher.OperaLauncherRunner.
<clinit>(OperaLauncherRunner.java:77)
    ... 34 more

Umm. OK. That’s new for me. I wonder how to set the platform inderal 10 mg online manually?

I jumped off to the line of code in the OperaLauncherRunner, which was an enum. Did a quick evaluate on Platform.getCurrent(); which had correctly identified my current operating system as WIN8.

But sadly the switch statement in launcherNameForOS doesn’t cater for WIN8, so I set the platform manually by changing the “os.name” property, and I set it to “windows” to pretend I’m running on XP.

System.setProperty("os.name","windows");
driver = new OperaDriver();

I also used “win7” and pretended to be VISTA. Same result, so I thought using “windows” was probably the most explanatory in the code.

And viola. My tests were running in Opera again.

 

This entry was posted in Selenium Simplified Blog, WebDriver. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *