When using the alert methods of selenium-webdriver, I encountered the JavaScript Error: "e is null"
Code:
browser = Watir::Browser.new :firefox
browser.alert.ok; sleep 5
Error:
Selenium::WebDriver::Error::UnknownError: [JavaScript Error: "e is null" {file: "file:///var/folders/f4/rz3xgqkj22zdyldyzrnyx4v40000gn/T/webdriver-profile20140731-47367-tyngix/extensions/[email protected]/components/command_processor.js" line: 7716}]'
[JavaScript Error: "e is null" {file: "file:///var/folders/f4/rz3xgqkj22zdyldyzrnyx4v40000gn/T/webdriver-profile20140731-47367-tyngix/extensions/[email protected]/components/command_processor.js"
line: 7716}]' when calling method: [nsICommandProcessor::execute]
Environment:
- 'selenium-webdriver', '2.42.0'
- Firefox 31.0
- MAC 10.9
- Ruby 2.0
Any advice would be very much appreciated. Thanks!
Watir::Exception::UnknownObjectException
pointing to Watir-Webdriver code because no alert exists when running your code sample. – Gloomingbrowser = Watir::Browser.new :firefox new_new = Onepage.new(:browser => browser) new_new.browser.alert.ok
Did not manage to fix this yet... – Spleen