Watir-webdriver: Chrome unhandled error on site where IE and Firefox working fine
So I think this might be an error with the ChromeDriver but wanted to ask here first.
I'm having trouble using just about every webdriver function with chrome, yet IE and Firefox is working fine.
The site is www.bing.com's sign in with Windows live site.
https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1314808262&rver=6.0.5286.0&wp=MBI&wreply=http:%2F%2Fwww.bing.com%2FPassport.aspx%3Frequrl%3Dhttp%253a%252f%252fwww.bing.com%252f&lc=1033&id=264960
Once at that site when using chrome the only two functions I can get to work properly are
@browser.title
@browser.html
are the only functions that work properly. When I try
@browser.links.size
@browser.button[0].flash
@browser.button[0].click
I get
Selenium::WebDriver::Error::UnhandledError:
Using :id etc to reference the objects doesn't work either.
However IE and开发者_如何学编程 Firefox can interact with the site fine.
If you need code or clarification let me know, but basically I can't get chrome to interact with that log in site. (Other sites work just fine on chrome)
You will need to install the ChomeDriver, which involves downloading the binary and putting it on your PATH. See: http://watirwebdriver.com/chrome/
This site works perfectly for me in Chrome.
Eg.
$irb
ruby-1.9.2-p290 :001 > require 'watir-webdriver'
=> true
ruby-1.9.2-p290 :002 > b = Watir::Browser.new :chrome
=> #<Watir::Browser:0x6c6e06ba1a564e50 url="about:blank" title="about:blank">
ruby-1.9.2-p290 :003 > b.goto "https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1314808262&rver=6.0.5286.0&wp=MBI&wreply=http:%2F%2Fwww.bing.com%2FPassport.aspx%3Frequrl%3Dhttp%253a%252f%252fwww.bing.com%252f&lc=1033&id=264960"
=> "https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1314808262&rver=6.0.5286.0&wp=MBI&wreply=http:%2F%2Fwww.bing.com%2FPassport.aspx%3Frequrl%3Dhttp%253a%252f%252fwww.bing.com%252f&lc=1033&id=264960"
ruby-1.9.2-p290 :004 > b.title
=> "Welcome to Windows Live"
ruby-1.9.2-p290 :005 > b.html
=> "<!-- ServerInfo: BAYIDSLGN1M37 2011.07.22.19.28.58...
精彩评论