开发者

Can not drive Opera with watir-webdriver on Windows XP

开发者 https://www.devze.com 2023-04-05 18:32 出处:网络
I am trying to drive Opera with watir-webdriver on Windows XP. Just to mention, I had no problems driving it on Windows Vista or 7. Also, I was able to drive Internet Explorer, Firefox and Chrome on

I am trying to drive Opera with watir-webdriver on Windows XP.

Just to mention, I had no problems driving it on Windows Vista or 7. Also, I was able to drive Internet Explorer, Firefox and Chrome on Windows XP.

It is fully patched machine (Microsoft Windows XP Professional, Version 2002, Service Pack 3), 512 MB, virtualized in VMware Fusion 3.1.3.

>ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

>gem -v
1.8.10

>java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

Opera 11.51, selenium-webdriver 2.6.0, selenium-server-standalone-2.6.0.jar, watir-webdriver 0.3.3.

This is what I get

>irb

> require "watir-webdriver"
=> true

> browser = Watir::Browser.new :opera

Selenium::WebDriver::Error::UnhandledError: Could not start the launcher process: Cannot run program "C:\Documents and Settings\zeljko\.launcher\launcher-win32-i86pc.exe": Creation has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem
Build info: version: '2.6.0', revision: '13840', time: '2011-09-13 14:55:30'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_26'
Driver info: driver.version: OperaDriver (org.openqa.selenium.WebDriverException)
        from [remote server] com.opera.core.systems.runner.launcher.OperaLauncherBinary(OperaLauncherBinary开发者_JAVA技巧.java):74:in `init'
        from [remote server] com.opera.core.systems.runner.launcher.OperaLauncherBinary(OperaLauncherBinary.java):48:in `<init>'
        from [remote server] com.opera.core.systems.runner.launcher.OperaLauncherRunner(OperaLauncherRunner.java):163:in `<init>'
        from [remote server] com.opera.core.systems.OperaDriver(OperaDriver.java):286:in `<init>'
        from [remote server] sun.reflect.NativeConstructorAccessorImpl():-2:in `newInstance0'
        from [remote server] sun.reflect.NativeConstructorAccessorImpl():-1:in `newInstance'
        from [remote server] sun.reflect.DelegatingConstructorAccessorImpl():-1:in `newInstance'
        from [remote server] java.lang.reflect.Constructor():-1:in `newInstance'
        from [remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):88:in `callConstructor'
        from [remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):82:in `newInstance'
        from [remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):156:in `call'
        from [remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):1:in `call'
        from [remote server] java.util.concurrent.FutureTask$Sync():-1:in `innerRun'
        from [remote server] java.util.concurrent.FutureTask():-1:in `run'
        from [remote server] java.util.concurrent.ThreadPoolExecutor$Worker():-1:in `runTask'
        from [remote server] java.util.concurrent.ThreadPoolExecutor$Worker():-1:in `run'
... 2 levels...
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/remote/http/common.rb:54:in `new'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/remote/http/common.rb:54:in `create_response'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/remote/http/default.rb:64:in `request'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/remote/http/common.rb:35:in `call'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/remote/bridge.rb:410:in `raw_execute'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/remote/bridge.rb:88:in `create_session'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/opera/bridge.rb:27:in `initialize'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/common/driver.rb:41:in `new'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver/common/driver.rb:41:in `for'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.6.0/lib/selenium/webdriver.rb:81:in `for'
        from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.3.3/lib/watir-webdriver/browser.rb:35:in `initialize'
        from (irb):13:in `new'
        from (irb):13
        from C:/Ruby192/bin/irb:12:in `<main>'

Well, rebooting did not help. Not even reinstalling Opera (and then rebooting).

For more information see https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md (In Opera with watir-webdriver on XP chapter at the bottom of the page)


You need to install the Visual Studio 2008 C++ runtime libraries on your machine. They can be downloaded from:

http://www.microsoft.com/download/en/details.aspx?id=29

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号