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
2 answers

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

Code trials: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import…
0
votes
0 answers

Python Selenium - I'm getting StaleElementReferenceException when I get element after clicking button

I tried to make auto ticketing macro using python Selenium, but when it clicks a button, java script in web changes element of page and StaleElementReferenceException just appears when it finds newly generated elements. How can I fix this exception?…
0
votes
1 answer

Selenium - StaleElementReferenceException - element is not attached to the page document (C#)

I appreciate this has been asked many times before, but when you feel like you have tried every solution ever posted on stack overflow, then its time to ask a question... I am receiving a StaleElementReferenceException whilst looping over a table…
0
votes
1 answer

How to fix StaleElementReferenceException on Python Selenium?

I am getting the following error while using Selenium in python: Traceback (most recent call last): File "C:\Users\pedro\Desktop\PyCharm\tutorial\index.py", line 30, in select_object_unidades.select_by_value(unidades) File…
0
votes
0 answers

I have a stale element reference but no Idea how to get around it in my case

So I am having a problem. I am trying to automate part of our software testing with Python Selenium, however now I have fallen into a bit of a problem. I have the code below. After the selection of a drop down (country_list_element =…
0
votes
2 answers

How to handle StaleElementReferenceException (Selenium Python)?

I am writing a scraper for https://etherscan.io/ using selenium in python. I am getting StaleElementReferenceException in my code when it clicks on a button and not finding any good source to solve this error. This is the code url =…
0
votes
1 answer

Stale element exception while running test in Jenkins, but works fine locally

I have the following method that keeps failing in Jenkins but working fine locally. try: WebDriverWait(driver.instance, 20).until(ec.element_to_be_clickable((By.XPATH, continue_button))).click() except StaleElementReferenceException: …
DZR
  • 195
  • 1
  • 2
  • 12
0
votes
1 answer

Intermittent Stale Element Reference Exception

I am writing a python selenium script to scrape data from a website. The script reads the employee identification number, name and date of birth from a CSV file and copies it to a Dictionary & then enters data from each line into a form and then…
Auditor
  • 45
  • 1
  • 10
0
votes
1 answer

Actions.click() throws StaleElementReferenceException, but WebElement.click() does not

In my test project, I have a static class that contains a number of methods for basic interactions with WebElements. I have two separate methods for clicking a WebElement, one that uses the WebElement.click() method: public static void…
Mattemingda
  • 61
  • 1
  • 1
  • 8
0
votes
2 answers

Selenium loop stops with StaleElementReferenceException

I am doing day 48 from 100 Days of Code: The Complete Python Pro Bootcamp for 2022. It is based on this clicking game: http://orteil.dashnet.org/experiments/cookie/ Problem I have here is the loop clicks tier_2 just once and then I get…
0
votes
0 answers

Selenium StaleElementReferenceException and command(related wait) does not work

When I run below Program, Code "option2[opt2].click()" work well. But second "option2[opt2].click()" occur "StaleElementReferenceException" I tried to solve this problem with "time.sleep(), implicitly_wait(), WebDriverWait(browser,…
0
votes
1 answer

Python pyautogui loop with scrollIntoView becomes stale

I have a python script that's almost working but there is a problem that I cannot resolve. My loop is working but only for the first row of images. For some reason the webelement becomes stale after 3 images. I'm positive that there are more than 3…
0
votes
2 answers

Unable to click Sign in button of Microsoft Login in C# Selenium

Trying to click Sign In button but getting "Stale element Exception error". IWebElement email = driver.FindElement(By.XPath("//*[contains(@name,'loginfmt')]")); IWebElement password =…
0
votes
0 answers

Scrapy: stale element reference: element is not attached to the page document

I'm trying to run this code using Scrapy-Selenium. Whenever I'm trying to execute this, selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document error is occurring. I…
0
votes
2 answers

Stale Element when using List of WebElement but works fine with individual elements in Selenium

I have 5 elements which I am tryin to hover 1 by 1. I am putting these elements in a List. But when I use List for Hover(with and without loop) it gives Stale Element Exception. Note I can perform it when I use individual elements without using…