1

以下是錯誤爲什麼會出現在Chrome webdriver的例外,而不是在Firefox

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

我運行:

LoginPage.authenticate(self, self.admin_user) 

這工作得很好,登錄我OK,但只要我嘗試使用chrome驅動程序在下一頁中找到一個元素:

self.driver.find_element_by_id('Menu_LogInOut') 

我得到上述錯誤。它不會在Firefox中出錯。

有沒有其他人遇到過這個問題?到底是怎麼回事?我如何解決它?

回答

0

我們在應用程序中無意中覆蓋了window.Error。謝謝你的webdriver指出這一點。

解決的辦法是不這樣做,就像window.Error_These_arent_the_droids_youre_looking_for。

XD

相關問題