hprakash
hprakash

Reputation: 472

click method throws "Right-hand side of 'instanceof' is not callable"

I am trying to submit a form in this url "http://www.paisabazaar.com/personal-loan" using ruby (watir-webdriver gem) script . I'm able to fill the form using the script but im not able to click on the checkbox and the submit button.

Following are the specifications

chrome=54.0.2840.71
chromedriver=2.25.426923
watir-webdriver (0.9.3, 0.9.1)
ruby version= ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32]
gem version= 2.6.8
OS=windows 7

Script:

require 'watir-webdriver'
$browser=Watir::Browser.new :chrome
$browser.goto "http://www.paisabazaar.com/personal-loan"
$browser.text_field(:id,'loan_amount').send_keys "400000"
$browser.text_field(:id,'monthly_income').send_keys "90000"
$browser.text_field(:id,'email').send_keys "[email protected]"
$browser.text_field(:id,'mobile_number').send_keys "898989898989"
$browser.button(:id,'submit_first_step').click

Error:

Selenium::WebDriver::Error::UnknownError: unknown error: Right-hand side of 'instanceof' is not callable
  (Session info: chrome=54.0.2840.71)
  (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 6.1.7601 SP1 x86_64)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/response.rb:70:in `assert_ok'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/common.rb:78:in `new'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/common.rb:78:in `create_response'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/default.rb:90:in `request'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/bridge.rb:649:in `raw_execute'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/bridge.rb:627:in `execute'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/bridge.rb:389:in `clickElement'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/common/element.rb:73:in `click'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/watir-webdriver-0.9.1/lib/watir-webdriver/elements/element.rb:128:in `block in click'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/watir-webdriver-0.9.1/lib/watir-webdriver/elements/element.rb:598:in `element_call'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/watir-webdriver-0.9.1/lib/watir-webdriver/elements/element.rb:117:in `click'
        from (irb):7
        from C:/Ruby22-x64/bin/irb:11:in `<main>'

This error occurs only with the click method (checked in irb). Please check and let me know whats happening and solution for this issue. Thank you in advance.

Upvotes: 0

Views: 956

Answers (1)

titusfortner
titusfortner

Reputation: 4194

It appears to be an unresolved bug in chromedriver. https://bugs.chromium.org/p/chromedriver/issues/detail?id=1388 I recommend adding your reproducible test case there.

Upvotes: 3

Related Questions