Skip to content

Instantly share code, notes, and snippets.

@luke-hill
Created July 31, 2017 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luke-hill/1515f2617aa4548792855c540028ef78 to your computer and use it in GitHub Desktop.
Save luke-hill/1515f2617aa4548792855c540028ef78 to your computer and use it in GitHub Desktop.
Element not found in the cache - perhaps the page has changed since it was looked up
For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'node13810620', ip: '172.23.4.108', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_102'
Driver info: driver.version: unknown (org.openqa.selenium.StaleElementReferenceException)
[remote server] <anonymous class>(resource://fxdriver/modules/web-element-cache.js):9454:in `fxdriver.cache.getElementAt'
[remote server] <anonymous class>(file:///C:/Users/ieuser/AppData/Local/Temp/anonymous6705458459645073067webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js):9039:in `Utils.getElementAt'
[remote server] <anonymous class>(file:///C:/Users/ieuser/AppData/Local/Temp/anonymous6705458459645073067webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js):12189:in `WebElement.isElementDisplayed'
[remote server] <anonymous class>(file:///C:/Users/ieuser/AppData/Local/Temp/anonymous6705458459645073067webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js):12661:in `DelayedCommand.prototype.executeInternal_/h'
[remote server] <anonymous class>(file:///C:/Users/ieuser/AppData/Local/Temp/anonymous6705458459645073067webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js):12666:in `DelayedCommand.prototype.executeInternal_'
[remote server] <anonymous class>(file:///C:/Users/ieuser/AppData/Local/Temp/anonymous6705458459645073067webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js):12608:in `DelayedCommand.prototype.execute/<'
features/login/registered_users.feature:14:in `Then I should be logged in with Hi "R"'
features/login/registered_users.feature:8:in `Then I should be logged in with Hi "<username>"'
@p0deje
Copy link

p0deje commented Jul 31, 2017

begin
  # some code that causes error
rescue Selenium::WebDriver::Error::StaleElementReferenceError => error
  # do smth with error.message
  raise error
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment