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

Avoiding StaleElementReferenceException when dealing with a dynamic table in Selenium

I am having trouble dealing with a dynamic table. This is our table: …
elgato
  • 506
  • 1
  • 5
  • 20
1
vote
2 answers

Selenium VB : OpenQA.Selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document

I am trying to click on an element using LinkText. Eg: myelement = driver.FindElement(By.LinkText(StoreFile)) 'Click on report by name logger.Debug("Report Found as " & myelement.Text) If myelement Is Nothing Then GoTo endTry Else …
1
vote
0 answers

Overcoming a StaleElementReferenceException in python?

Intention: My aim is to scrape football data from whoscored.com. Match pages (see example here) contain a timeline view (div id = match-centre-timeline) which has timeline handles in turn (div class = timeline-handle). The handles can be dragged and…
1
vote
0 answers

Message: stale element reference: element is not attached to the page document python Dropdown menu

## RJ: import libraries ## ## RJ: END OF COMMENT ## from urllib.request import urlopen from bs4 import BeautifulSoup import csv import time from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from…
1
vote
1 answer

Not able to solve "Stale element reference exception" in loop

I am trying to click on pagination inside loop. Here is my code: WebElement pagination = d.findElement(By.xpath("/html/body/div[9]/div[1]/div[3]/div/div/div[2]/ul")); List < WebElement > allPaginations =…
1
vote
1 answer

Selenium Webdriver - Stale element exception when clicking on multiple dropdowns while HTML DOM doesn't change

I tried to automate a scenario, where the condition is that I have to select an option from drop down and then there's another dropown next to it, I have to click one option from next drop to enable to button . I tried with the code but it clicks…
0
votes
2 answers

Python Selenium - StaleElementReferenceException: stale element not found

I am trying to click on the next button at the bottom of the page to access the following page as in the image below: However, when I reach page 3 I receive the following error: selenium. common. exceptions. StaleElementReferenceException:…
0
votes
1 answer

selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: stale element not found

I am trying to click on all the products from this link. I wanted to click on all the products(click on the first product, come back, click on the second product, and so forth till the last product). But as soon as the loop reaches the second…
0
votes
0 answers

Wait method to avoid statement ,any other wait method will support?

Before input the value we are using wait method until DOM load,if i used webdriver wait im getting stale element error message ,what is the best approach to use wait method where we require page to load DOM elements public static void…
0
votes
1 answer

Stale Element Reference Exception problem

so i 'm trying with this code to retrieve some informations (Inchikey and SMILES) from lipids database but my code crash after the first itteration with this error:…
0
votes
0 answers

Error looping dropdown menu: stale element reference: element is not attached to the page document

This code works fine but when it goes to the second looping this error happens: ERROR: StaleElementReferenceException: Message: stale element reference: element is not attached to the page document from selenium import webdriver from tqdm import…
0
votes
0 answers

org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document in java

// Launching Browser System.setProperty("webdriver.chrome.driver", "C:/chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.manage().window().maximize(); driver.get("https://ifsc.bankifsccode.com/"); …
0
votes
0 answers

Scrape Tweets with Selenium in Colab

Hi how are you doing? I am new to Selenium, I am working in colab (Python) with a Google Chrome version 111.0.5563.64 which is the same for chrome driver. The code works fine to scrape a few tweets but I have to collect 50000 in each run two errors…
0
votes
2 answers

is there a way to handle stale Element in selenium?

i was navigating to a page which had a list of menu in that page and i wanted to check if i can click on all the menu and get expected outcome, since some of the menu option navigated me to different screen ; i navigated back to original screen to…