Closed Bug 1318843 Opened 8 years ago Closed 6 years ago

Using SwitchTo results in StaleElement exception

Categories

(Remote Protocol :: Marionette, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: gordon.marsh, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36

Steps to reproduce:

We use C#, Selenium 3 and SauceLabs to execute tests.

When the following scenario is executed against an older version of FireFox (e.g. 46.0 which presumably uses the old FireFoxDriver) then all is OK.

However, executing against the latest FireFox (49.0) an exception is thrown.

We have a routine which searches recursively through frames to get to an element using switchFrame, then we use switchWindow to go back to the original window after it's finished.

The issue seems very similar to the one documented here: https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/4876


Actual results:

{"The element reference is stale. Either the element is no longer attached to the DOM or the page has been refreshed. (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 10 milliseconds\nFor documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html\nBuild info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'\nSystem info: host: 'WIN-R1JBAO1CNPS', ip: '172.20.35.166', os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_91'\nDriver info: org.openqa.selenium.firefox.MarionetteDriver\nCapabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, webdriver.remote.quietExceptions=true, appBuildId=20160916101415, version=49.0, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=1584, browserVersion=49.0, platformVersion=6.1, XULappId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXa9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt, device=desktop}]\nSession ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXX25fec41d"}


Expected results:

The element should have been found.
Priority: -- → P3
Sorry about the lateness replying to this bug, but can you please attach a geckodriver trace-level log?
Flags: needinfo?(gordon.marsh)
Closing for inactivity.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(gordon.marsh)
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → INCOMPLETE
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.