Wednesday, February 24, 2010

Chapter 56: Watir-Webdriver Journey

1. If I set "WATIR_WEBDRIVER_BROWSER" to "safari".
2. Use this ruby/watir script:
require "watir-webdriver"
browser = Watir::Browser.new(:safari)
sleep 2
browser.close

3. Then I get this:
C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/selenium-webdriver-0.0.17/com
on/src/rb/lib/selenium/webdriver/driver.rb:44:in `for': unknown driver: :safari (A
gumentError)
from C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/selenium-webdriv
r-0.0.17/common/src/rb/lib/selenium/webdriver.rb:61:in `for'
from C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/watir-webdriver-
.0.1.dev5/lib/watir-webdriver/browser.rb:28:in `initialize'
from use-it.rb:10:in `new'
from use-it.rb:10

No comments:

Post a Comment