watir-webdriver-performance
watir-webdriver-performance copied to clipboard
IE9 JavaScript error: toplevel constant JSON referenced by Watir::Object::JSON
When I run browser.performance (browser being my Watir::Browser object) I get the following error:
c:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-webdriver-performance-0.2.2/lib/watir-webdriver-performance.rb:91: warning: toplevel constant JSON referenced by Watir
::Object::JSON
Running:
IE9 9.0.8112.16421 on Windows 7 machine (OS is 64 bit, IE is 32 bit)
ruby 2.0.0p353 (2013-11-22) [i386-mingw32]
watir-webdriver (0.6.4) watir-webdriver-performance (0.2.2)
Here is the backtrace:
=> ["c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/response.rb:51:in `assert_ok'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/http/default.rb:66:in `request'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/bridge.rb:634:in `raw_execute'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/bridge.rb:612:in `execute'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/bridge.rb:333:in `executeScript'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/common/driver.rb:213:in `execute_script'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-webdriver-performance-0.2.2/lib/watir-webdriver-performance.rb:91:in `performance'",
"c:/webapp/tools/sbr/lib/web/company/lh.rb:98:in `new_business'",
"c:/webapp/tools/sbr/lib/web/company/lh.rb:6:in `policy_number'",
"c:/webapp/tools/sbr/lib/web/main.rb:13:in `get_policy_number'",
"c:/webapp/tools/sbr/spec/regression/web_spec.rb:13:in `block (4 levels) in <top (required)>'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:114:in `instance_eval'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:114:in `block in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:254:in `with_around_each_hooks'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:111:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:390:in `block in run_examples'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:386:in `map'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:386:in `run_examples'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:371:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `block in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `map'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `block in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `map'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `map'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `block in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/reporter.rb:58:in `report'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:25:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'"]
Can you please update to the latest version 0.2.3, have since tried a patch (but don't have windows/IE to confirm).
thanks Tim
I am still running into the issue. I updated to:
watir-webdriver 0.6.6 and watir-webdriver-performance 0.2.3
I there anything you want me to do to get more info for you?
Selenium::WebDriver::Error::JavascriptError: JavaScript error
from c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/response.rb:51:in `assert_ok'
> ["c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/response.rb:51:in `assert_ok'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/http/default.rb:66:in `request'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/bridge.rb:634:in `raw_execute'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/bridge.rb:612:in `execute'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/remote/bridge.rb:333:in `executeScript'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.39.0/lib/selenium/webdriver/common/driver.rb:213:in `execute_script'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-webdriver-performance-0.2.3/lib/watir-webdriver-performance.rb:93:in `performance'",
"c:/webapp/tools/sbr/lib/web/company/lh.rb:142:in `new_business'",
"c:/webapp/tools/sbr/lib/web/company/lh.rb:12:in `policy_number'",
"c:/webapp/tools/sbr/lib/web/main.rb:23:in `policy_number'",
"c:/webapp/tools/sbr/spec/regression/web_spec.rb:13:in `block (4 levels) in <top (required)>'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:114:in `instance_eval'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:114:in `block in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:254:in `with_around_each_hooks'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb:111:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:390:in `block in run_examples'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:386:in `map'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:386:in `run_examples'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:371:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `block in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `map'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `block in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `map'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb:372:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `map'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:28:in `block in run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/reporter.rb:58:in `report'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:25:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'",
"c:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'"]
Are there any updates for this issue? I am seeing the same Selenium::WebDriver::Error::JavascriptError: JavaScript error in IE8.
I was running into this issue, ended up have it resolved when I added
require 'json'