SeleniumRCを使用してサファリを開こうとしています。ただし、Safariインスタンスが作成され、接続要求モードのままになります(SafariDriverがws:// localhost:3078 / wdで接続を要求します)。
require "selenium-webdriver"
caps = Selenium::WebDriver::Remote::Capabilities.safari
browser = Selenium::WebDriver.for :remote, :url=>"http://localhost:4444/wd/hub", :desired_capabilities=>caps
上記のものがハングアップし、次のように失敗します-Selenium :: WebDriver :: Error :: UnknownError:[リモートサーバー] com.google.common.base.Preconditions(Preconditions.java)からExecutorがまだ開始されていません(java.lang.IllegalStateException) ):145:in checkState'
from [remote server] org.openqa.selenium.safari.SafariDriverCommandExecutor(SafariDriverCommandExecutor.java):123:in
execute'from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):432:in execute'
from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):140:in
startSession' from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java ):95:<init>'
from [remote server] org.openqa.selenium.safari.SafariDriver(SafariDriver.java):33:in
in'from[リモートサーバー]sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):-2:in newInstance0'
from [remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):39:in
newInstance' from[リモートサーバー]sun.reflect.DelegatingConstructorAccessorImpl(DelegatingConstructorAccessorImpl.java):27:in newInstance'
from [remote server] java.lang.reflect.Constructor(Constructor.java):513:in
newInstance'from [リモートサーバー]java.lang.Class(Class.java):355:innewInstance0'
from [remote server] java.lang.Class(Class.java):308:in
newInstance'from [remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):61:in callConstructor'
from [remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):52:in
newInstance' from [remote server] org.openqa.selenium.remote.server.DefaultSession $ BrowserCreator(DefaultSession。 java):197:in call'
from [remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):1:in
call'... 4 level ... from [remote server] java.util.concurrent.ThreadPoolExecutor $ Worker(ThreadPoolExecutor.java):908:in run'
from [remote server] java.lang.Thread(Thread.java):680:in
run' from /Users/demo/.rvm/ gems / ruby-1.9.2-p180 / gems / selenium-webdriver-2.24.0 / lib / selenium / webdriver / remote / response.rb:52:in assert_ok'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/response.rb:15:in
initialize'from /Users/demo/.rvm/gems/ruby- 1.9.2-p180 / gems / selenium-webdriver-2.24.0 / lib / selenium / webdriver / remote / http / common.rb:59:innew'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/common.rb:59:in
create_response'from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/default.rb:59:in request'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/common.rb:40:in
call' from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/bridge.rb:598:in raw_execute'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/bridge.rb:92:in
create_session'from / Users / demo / .rvm / gems / ruby-1.9.2-p180 / gems / selenium-webdriver-2.24.0 / lib / selenium / webdriver / remote / bridge.rb:68:in initialize'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/common/driver.rb:33:in
new'from /Users/demo/.rvm /gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/common/driver.rb:33:in for'from for'
from /Users/demo/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver.rb:65:in
(irb):7