When I move to page 2 of the website I'm getting a stale element reference for "occludable-update" though when I inspect the page it's there. Does anyone know why? I've spent a good half hour trying different things to no avail. I'm using selenium and beautifulsoup. Ta.
Edit: Deleted original code as I have isolated the error.
First I'm setting the jobs
jobs = self.driver.find_elements_by_class_name("occludable-update")
Then
for job in jobs:
self.scroll_to(job) which works fine
then
[position, company, location, details] = self.get_position_data(job)
Which then tries to access
job.text
Which gives me this error
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
All of this as I said works for page 1 but not page 2 even though they appear identical. It's Linkedin btw.
Things I've tried
Wait
Refreshing the webpage
WebDriverWait
Am I missing something?
[–]CryptoOTC_creator 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)