SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
346 stars 194 forks source link

WebDriver findElement Exception with Firefox 55 #8837

Closed AlanRashid closed 6 years ago

AlanRashid commented 6 years ago

I'm having problems with WebDriver 3.5.3/Firefox 55.0.3 (32-bit). A NoSuchElementException is consistently being raised in findElement. If I execute the exact same code using Firefox 53.0.3 it executes properly.

I am using the following JAR files/driver:

selenium-html-runner-3.5.3.jar selenium-server-standalone-3.5.3.jar geckodriver-v0.18.0-win32

The routine statement in my test code where the problem occurs is the first time I look for an element in a Firefox window; specificly, I check for the existence of the File menu before clicking on it. I have the code with System.out.println statements to verify the processing of the statement. The following is the code where the failure occurs:

System.out.println("Find the File menu."); If (mWinJEM.elementIsVisible(jemSession.appSelenium(), mWinJEMFileMenu, shortTimeOut)) { System.out.println("File menu found."); jemSession.appSelenium().click(mWinJEMFileMenu); } else { Fail("Timeout: File menu not present"); }

The following is the output when using Firefox 53.0.3:

Select the JEM main window Maximize the JEM main window Find the File menu. File menu found.

The following is the output when using Firefox 55.0.3:

Select the JEM main window Maximize the JEM main window Find the File menu. Exception in thread "main" com.thoughtworks.selenium.SeleniumException: Element css=span not found at com.thoughtworks.selenium.webdriven.ElementFinder.findElement(ElementFinder.java:93) at com.thoughtworks.selenium.webdriven.commands.IsVisible.handleSeleneseCommand(IsVisible.java:34) at com.thoughtworks.selenium.webdriven.commands.IsVisible.handleSeleneseCommand(IsVisible.java:25) at com.thoughtworks.selenium.webdriven.SeleneseCommand.apply(SeleneseCommand.java:36) at com.thoughtworks.selenium.webdriven.Timer.run(Timer.java:41) at com.thoughtworks.selenium.webdriven.WebDriverCommandProcessor.execute(WebDriverCommandProcessor.java:150) at com.thoughtworks.selenium.webdriven.WebDriverCommandProcessor.getBoolean(WebDriverCommandProcessor.java:137) at com.thoughtworks.selenium.DefaultSelenium.isVisible(DefaultSelenium.java:548) at ATTWebDriver.AppWindow.elementIsVisible(AppWindow.java:108) at JEMIncident.JEMIncident01.main(JEMIncident01.java:290) Caused by: org.openqa.selenium.NoSuchElementException: Cannot locate element even after falling back to Sizzle: span For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:55:29.867Z' System info: host: 'TCC09', ip: 'xxx.xxx.xxx.139', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144' Driver info: driver.version: unknown at com.thoughtworks.selenium.webdriven.ElementFinder.fallbackToSizzle(ElementFinder.java:154) at com.thoughtworks.selenium.webdriven.ElementFinder.findElementDirectlyIfNecessary(ElementFinder.java:125) at com.thoughtworks.selenium.webdriven.ElementFinder.findElement(ElementFinder.java:93) ... 9 more Java Result: 1 BUILD SUCCESSFUL (total time: 1 minute 18 seconds)

I believe this is a problem between marionette and gecko because the only software that changed between a successful and unsuccessful test is the Firefox version.