Watir 5.0 测试加载报错,希望大家帮帮 程序如下:
require "watir"
browser = Watir::Browser.new
报错:
LoadError: cannot load such file -- watir-webdriver/locators/element_locator
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.9.0/lib/watir-webdriver.rb:13:in `<top (required)>'
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/gems/2.1.0/gems/watir-5.0.0/lib/watir/loader.rb:41:in `load_driver'
from /usr/local/lib/ruby/gems/2.1.0/gems/watir-5.0.0/lib/watir/loader.rb:33:in `load_driver_for'
from /usr/local/lib/ruby/gems/2.1.0/gems/watir-5.0.0/lib/watir/loader.rb:6:in `initialize'
from (irb):5:in `new'
from (irb):5
from /usr/local/bin/irb:11:in `<main>'
我的 gem:
watir (5.0.0)
watir-webdriver (0.9.0)
ruby 版本 ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]