0

Windows XP で watir-webdriver を使用して Opera を駆動しようとしています。

Windows Vista や 7 では問題なく動作しました。また、Windows XP では Internet Explorer、Firefox、Chrome を動作させることができました。

これは、完全にパッチが適用されたマシン (Microsoft Windows XP Professional、バージョン 2002、Service Pack 3)、512 MB、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。

これは私が得るものです

>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):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>'

まあ、再起動しても役に立ちませんでした。Operaを再インストールすることさえしません(そして再起動します)。

詳細については、https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.mdを参照してください(ページの下部にある XP の章でwatir-webdriver を使用する Opera の場合)

4

1 に答える 1

1

Visual Studio 2008 C++ ランタイム ライブラリをマシンにインストールする必要があります。以下からダウンロードできます。

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

于 2011-09-17T14:17:23.823 に答える