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
0
votes
0 answers

Selenium in Python Error Message: stale element reference: element is not attached to the page document

Hello, I'm using Selenium with python and am getting the error in the title and I'm really at a loss to why. It seems to be this that is causing the issue: down_arrow = driver.find_element_by_xpath('//*[@id="ember68"]/span') #WebDriverWait(driver,…
0
votes
2 answers

StaleElementException with Python

I am trying to extract tables from dropdown menus but I keep on getting an exception error that the element is not attached to the document in the last loop. I think it is to do with the fact that the page refreshes when clicking on submit. My…
ak7880
  • 23
  • 4
0
votes
0 answers

Stale Web Element

Any suggestions how to get around stale elements exceptions when it seems one shouldn't be raised? Fair enough with any of the many javascript libraries in use any updates may remove the respective DOM nodes and later FindElement from the…
Dano
  • 112
  • 7
0
votes
0 answers

Stale element exception under shadow dom

I'm facing a problem with a stale element under the shadow DOM, scenario below: hover to the video and the dock is shown and vice versa HTML Dom changes from not hovering to hovering and vice versa: The below html is for not hovering.
0
votes
1 answer

how to handle webtable in selenium java when number of rows in a table is getting changed after page is reloaded when some action is performed in row

Currently I am going through a situation. There are three rows in a the body of the table. I have to perform some action on each row if row matches with a text. For this I am getting the size for the the rows and using for loop and checking the…
0
votes
1 answer

Selenium Java unable to locate element using xpath

Below is the code where selenium is unable to find the element. By machineUIList = By.xpath("//div[@class='thmbinnerdiv']"); Thread.sleep(5000); ArrayList machineUITextList = objUtilities.getElementsTextList(machineUIList); …
0
votes
0 answers

Selenium Stale Element Reference Errors (Seems Random)?

I know there have been several questions asked regarding stale elements, but I can't seem to resolve these. My site is private so unfortunately can't share, but seems to always throw the error somewhere within the below for-loop. This loop is meant…
0
votes
1 answer

Not able to resolve stale element reference: element is not attached to the page document

I'm getting stale element exception and tried adding try catch block but still i'm getting this error. Is there a way to resolve it? I want to click on particular link in each div which contains the text "Dep. Libraries". List
0
votes
0 answers

After successful click that changes the page: stale element reference: element is not attached to the page document

When running in a Ruby kernel on Jupyter Notebook, after finding and clicking an element that changes the page and removes the clicked element, I get this error after about 3 seconds: Selenium::WebDriver::Error::StaleElementReferenceError: stale…
0
votes
1 answer

Message: stale element reference: element is not attached to the page document - Web Table Python

enter image description hereenter image description hereI am getting the mentioned exception when trying to automate Web-table using selenium Python. below is my code import time from selenium import webdriver from selenium.common.exceptions import…
0
votes
1 answer

I get the "StaleElementReferenceException: stale element reference: element is not attached to the page document" when I use selenium

I'm trying to scrape the table from following website using selenium: https://web.archive.org/web/20120220031809/http://simcentral.net/ibaf/games/1 with the code: from selenium import webdriver as wd from selenium.webdriver.common.by import By from…
0
votes
2 answers

Selenium StaleElementReferenceException after frameToBeAvailableAndSwitchToIt

If Selenium throws a StaleElementReferenceException it is usually (?) because the state of web page (DOM) Selenium "owns" has changed due to outside interference but I started to get it when I added frameToBeAvailableAndSwitchToIt before a switch…
d-b
  • 695
  • 3
  • 14
  • 43
0
votes
1 answer

Selenium C# - StaleElementReferenceException - Even after refreshing the page

I am getting OpenQA.Selenium.StaleElementReferenceException which is a bit strange since I am refreshing the page. So here is the detail: The technology we are using is React. Browser: Chrome ( latest version) C# with Selenium Webdriver (3.X) We…
0
votes
0 answers

Python Selenium - element is not attached to the page document (download csv file in Chrome)

I am automate a login and download data process. At my final step: click 'export' then download .csv file. I faced the error: selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the…
0
votes
1 answer

A way around the StaleElementReferenceException after opening and closing a new tab?

So I have this project: It is a website with multiple WebElements on it. I find those WebElements by their class name (they all have the same one obviously) and then iterate through them to click on each of them. After clicking on them I have to…