Question

Here is the error

WebDriverException: Message: "findElement execution failed;\\n Property \'Error\' of object [object DOMWindow] is not a function"

I run:

LoginPage.authenticate(self, self.admin_user) 

This works fine, logs me in OK, but as soon as I try to find an element on the next page using the chrome driver:

self.driver.find_element_by_id('Menu_LogInOut')

I get the above error. It doesn't error out in Firefox.

Has anyone else run into this? What is going on? How do I get around it?

Was it helpful?

Solution

We had inadvertently overwritten window.Error in our application. Thank you webdriver for pointing this out.

The fix is to not do this, something like window.Error_These_arent_the_droids_youre_looking_for.

XD

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top