lundi 7 décembre 2015

In watir-webdirver gem '.click' is throwing error in windows 10 but working fine in linux(Ubuntu)

I am using watir-webdriver gem to run over a website. I tried to click a button to load more content in a webpage, for that I used the following code, b = Watir::Browser.new b.goto "http://ift.tt/KIwo0Y" b.button(:class => "ga_Finder_Load_More").click This code is running fine in linux(ubuntu) and I can load the data in the webpage by clicking the button. But when I run the same code in window 10 I am getting the following error,

  C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-webdriver-0.9.1/lib/watir-            webdriver/elements/element.rb:508:in `assert_exists' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-webdriver-0.9.1/lib/watir-webdriver/elements/element.rb:114:in `click' from leafly_v1.3.rb:70:in `block (2 levels) in <main>' from leafly_v1.3.rb:67:in `each' from leafly_v1.3.rb:67:in `block in <main>' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.6.4-x86-mingw32/lib/nokogiri/xml/node_set.rb:187:in `block in each' from 

Ruby version - 2.0.0 watir-webdriver - 0.9.1

Can anyone please help me to fix this or can any one suggest me alternate method to click a button.

Thanks.

Aucun commentaire:

Enregistrer un commentaire