Questions tagged [staleelementreferenceexception]

StaleElementReferenceException : org.openqa.selenium.StaleElementReferenceException popularly known as StaleElementReferenceException extends org.openqa.selenium.WebDriverException which indicates that a reference to an element is now "stale", which means that the element is no longer attached to the DOM of the page.

StaleElementReferenceException

org.openqa.selenium.StaleElementReferenceException popularly known as StaleElementReferenceException extends org.openqa.selenium.WebDriverException which indicates that a reference to an element is now stale which means that the element is no longer attached to the DOM of the page.

Reference : StaleElementReferenceException

180 questions
1
vote
1 answer

Python Selenium - element is not attached to the page document - once button is clicked

When I click on an item inside a dropdown list, the item is correctly clicked but the error: "stale element is not attached to the page document" is raised. I guess this error is raised because of an element I use as changed inside the DOM or has…
1
vote
1 answer

StaleElementException error in Selenium Python

I am working on a web automation project. The project is personally for myself as I have to constantly click and fill out text fields on a web app (IBM Maximo Asset Management). The login, and then clicking the link where I want to go initially work…
1
vote
1 answer

How to get around the StaleElementReferenceException with ignored_exceptions?

So I am having a little difficulty with selenium automated testing. I have a "next" button to click after filling in some fields, however, I get a "selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element…
1
vote
1 answer

Selenium EC.element_to_be_clickable still returns stale element error

I am not sure what is wrong with this. Am I using EC.element_to_be_clickable() right? I am getting the error message: "selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page…
1
vote
2 answers

StaleElementReferenceException while looping over list

I'm trying to make a webscraper for this website. The idea is that code iterates over all institutions by selecting the institution's name (3B-Wonen at first instance), closes the pop-up screen, clicks the download button, and does it all again for…
Sukaldi
  • 13
  • 4
1
vote
1 answer

Selenium PageFactory lazy evaluation StaleElementException

I'm doing unit testing on a system using Selenium with a Page Object Model. Usually I'm able to figure out a solution to such a problem in relatively short order, but this one is being rather tenacious, so I thought I should just get clarification…
1
vote
1 answer

Understanding selenium move_to_element behaviour + StaleElementReference exception

I am using Python3.9+Selenium to write a small script that fills an online form for me. A bit of context: the webpage contains a field (locationField) expecting a street address as input, and located on top of some sort of "google maps…
etien
  • 301
  • 1
  • 9
1
vote
1 answer

(Appium-Python) Difference of "Element could not be located on the page using the given search parameters" & "Element does not exist in DOM anymore"

As above. Encountered these two issues. An element could not be located on the page using the given search parameters. The element does not exist in DOM anymore
1
vote
1 answer

Using the same SUIT for more than one try in a class with defined "with"-statement

I am currently automating ui-tests via selenium in python and some webElements are changing periodically which leads to StaleElementReferenceExceptions. My current solutions for such troublesome elements is, to use try-except-blocks with a for-loop…
1
vote
0 answers

Python Selenium Try/Except x Number of Times for Stale Element

I'm trying to get some elements from a website (private, sorry) and keep getting the dreaded StaleElementReferenceException. I've already incorporated WebDriverWait, but the DOM is still somehow populating so loses the assigned element. To fix this,…
1
vote
1 answer

Python Selenium StaleElement Exception

I am looking for a solution to the StaleElementReferenceException that arises when navigating back to a previous page with Selenium. Here is a sample code to reproduce the error: from selenium.webdriver import Chrome from selenium.common.exceptions…
1
vote
1 answer

StaleElementReferenceException in while loop iterating over pages

set-up I use Python + Selenium to scrape info of companies of this site. Since the website doesn't allow me to simply load page urls, I plan to click on the next page arrow element at the bottom of the list and using a while loop with a…
LucSpan
  • 1,831
  • 6
  • 31
  • 66
1
vote
2 answers

Alternative to time.sleep() in selenium using python while web scraping?

I need to scrape price of certain listed food items basis different locations in the country. There's an input text box that allows me to enter the name of the city & pressing "Enter" shows me the list of items available in that city. Here's how I…
1
vote
0 answers

Looping in Python Selenium for scraping content on multiple pages

I am scraping for all of the App.No on this site: WIPO. I am scraping content through this website and I can't seem to loop through the final page I want(100), even though my code does click through to the next page. Also, the content I pull off is…
1
vote
1 answer

StaleElementReferenceException even when having explicit wait

I've been trying to crawl data from the website AlgoExplorer. It has a table with pagnigation to store data. Even though I use an Explicit Wait for clicking a 'next' button, it still get StaleException. Here is a piece of my code, and an image of…
1 2
3
11 12