私は Watir をまったく使用したことがなく、Web サイトのテストに使用できるように基本を理解しようとしています。
問題は、最初browser.goto
に . ウィンドウはまだそこにありますが、irb から「コマンド」できなくなりました。
次のエラーが表示されます。
C:\>irb
DL is deprecated, please use Fiddle
irb(main):001:0> require "watir-webdriver"
=> true
irb(main):002:0> ie = Watir::Browser.new :ie
Started InternetExplorerDriver server (32-bit)
2.32.3.0
Listening on port 5555
=> #<Watir::Browser:0x..f3e539e40 url="http://localhost:5555/" title="WebDriver"
>
irb(main):003:0> ie.goto "google.com"
=> "http://localhost:5555/"
irb(main):004:0> ie.goto "stackoverflow.com"
Selenium::WebDriver::Error::NoSuchWindowError: Unable to get browser
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/response.rb:52:in `assert_ok'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/response.rb:15:in `initialize'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/http/common.rb:59:in `new'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/http/common.rb:59:in `create_response'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/http/default.rb:66:in `request'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/http/common.rb:40:in `call'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/bridge.rb:619:in `raw_execute'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/bridge.rb:597:in `execute'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/remote/bridge.rb:103:in `get'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/l
ib/selenium/webdriver/common/navigation.rb:14:in `to'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/watir-webdriver-0.6.4/lib/w
atir-webdriver/browser.rb:77:in `goto'
from (irb):4
from C:/Ruby200-x64/bin/irb:12:in `<main>'
irb(main):005:0>
Win7 x64 と Ruby x64 を使用していますが、32 ビット IE です。