Can error from Javascript cause Selenium tests fail? - javascript

I am writing automation test for a Rail app using Selenium, Capybara and Cucumber running on Jenkins. Recently, lots of my tests failed due to error:
unknown error: Cannot read property 'ownerDocument' of undefined
(Session info: chrome=47.0.2526.106)
(Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 4.0.5 x86_64) (Selenium::WebDriver::Error::UnknownError)
./features/step_definitions/advanced_search.rb:81:in `/^user can see search buttons and links$/'
and in Chrome inspect, I can see a javascript error:
Uncaught TypeError: Cannot read property 'ownerDocument' of undefined
So, I want to know if this javascript error can make my tests failed? This error only appears after clicking on an element. Have anyone experienced this error? How to solve this?
Thanks.

Yes a JS error can cause tests to fail since it means things in the page aren't doing what you'd expect. The Chrome inspect should show you the source of the JS with the error, if it's in your JS you'll need to fix it, if not it may be a bug in chromedriver.

Related

Cordova Build error: nodeValue undefined

After a couple of days without touching my app, today when I tried to build it I got the following error:
Error thrown while running shell command: "cordova build ios"
Error: Command failed: /bin/sh -c cordova build ios
Error: Cannot read property 'nodeValue' of undefined
If I remove the ios platform and add it again, it will work, but that's not the best solution... I'd like to understand the issue.
Do you have any idea what might have caused this error and what would be the best solution to fix it?
Thanks.
I just got this exact same error. For me the cause was that in my MyApp-info.plist I had added a new line that was empty, basically there was a blank key-value pair like this:
<key></key>
<string></string>
Once I removed this, the error disappeared and cordova was able to build again.
Hope that helps!

Selenium RunScript error "JavaScript is Null"

Using Selenium (2.5.0), one of the steps is to run a simple block of JavaScript:
Command: runScript
Target: javascript{document.getElementById("ui-datepicker-div").style.display='block';}
Value: [blank]
When running executing this command I get the error message
[error] Unexpected Exception: TypeError: document.getElementById(...) is null.
The element ID definitely exists and I have tried this with text boxes etc too
I can't see why this should return a null error as it doesn't really mean much
Can anyone suggest how I can fix this?

What is a V8Exception error?

I'm not sure what this error is coming from, nor what it is or what it means. Here is the error I get:
[ERROR] : V8Exception: Exception occurred at undefined:1: Uncaught SyntaxError: Unexpected token u
Now, I am creating an HTML 5 Cross platform (Android/iOS) application using Titanium Studio IDE. I'm not sure if this is an Android specific error or a Titanium Studio specific error. I know it can't be iOS because I only get this error when I am trying to test the app on Android tablet. (The app installs and runs on the device though).
NOTE: The code I am working on is proprietary so I can't show it. But what I'm mostly interested in an explanation of this error. Generally, What is this error and when does some one come across it?

JavaScript runtime error: 'fidoCallback' is undefined

I have built an asp.net application. Every time I am running it, I am getting an error saying:
Unhandled exception at line 1, column 1 in script block
0x800a1391 - JavaScript runtime error: 'fidoCallback' is undefined
I have tried adding
function fidoCallback(status) { }
but it is not helping. Any help would be appreciated.
Got the actual reason behind the error. It is because of the Nok Nok Labs installed. Uninstall that from your extensions and then you can see that the error does not repeat. No need to add fidocallback after this.
Actually, the name of the Nok Nok Labs package is "Multifactor Authentication Client". Just uninstall this package from "control panel/programs and features".

error updating JScript IntelliSense warnings

How can this error be rectified? What's the cause of this error?
Warning 1 Error updating JScript IntelliSense: Object doesn't support this property:#--
I found this via Google - have you tried it?
http://patrickyong.net/2009/05/08/error-updating-jscript-intellisense-object-doesnt-support-this-property-or-method-21391/

Categories