Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stale element crashes #35

Open
ndroock1 opened this issue Nov 20, 2017 · 2 comments
Open

stale element crashes #35

ndroock1 opened this issue Nov 20, 2017 · 2 comments

Comments

@ndroock1
Copy link

I regularly get errors like:

[INFO ] 2017-11-17 14:14:59.927 [pool-4-thread-2] QueryWorker - stale element reference: element is not attached to the page document
  (Session info: headless chrome=62.0.3202.94)
  (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html

do you recognize them? Any ideas how to approach them?

Currently I just restart the thread and try again, eventually I am able to scrape the data off the target website but I have the feeling I use the wrong approach.

@ddavison
Copy link
Member

is there a stack trace you can share? it's possible that it's coming from one of the built-in waits. if it's not, then it might be possible to use a custom explicit wait

@ndroock1
Copy link
Author

This is the original stack trace.

[INFO ] 2017-11-17 14:14:59.927 [pool-4-thread-2] QueryWorker - stale element reference: element is not attached to the page document
  (Session info: headless chrome=62.0.3202.94)
  (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'DESKTOP-IBQBHCN', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{mobileEmulationEnabled=false, hasTouchScreen=false, platform=XP, acceptSslCerts=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, platformName=XP, setWindowRect=true, unexpectedAlertBehaviour=, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=C:\Users\Nilo\AppData\Local\Temp\scoped_dir15548_4620}, takesHeapSnapshot=true, pageLoadStrategy=normal, unhandledPromptBehavior=, databaseEnabled=false, handlesAlerts=true, version=62.0.3202.94, browserConnectionEnabled=false, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}]
Session ID: 910cc36b804fa105e8a549625297df19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants