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
1 answer

Selenium org.openqa.selenium.StaleElementReferenceException: Element is no longer valid

I am trying to write such applications in selenium. Enters the subpage, gets data, goes back, enters the next subpage ... Unfortunately, an exception appears to me "org.openqa.selenium.StaleElementReferenceException: Element is no longer…
0
votes
2 answers

selenium StaleElementReferenceException: element is not attached to the page document error in python

I am trying to visit a series of webpages and recursively. Visit one page and then back then move to next page and so on. With my code, I can visit the first page and then back to the previous page, but I can not visit the next page and get an stale…
0
votes
3 answers

StaleElementReferenceException when trying to click on the links in a loop

Please click on the link below to see the link "BEAUTY" on which I am clicking 1. I am using this code to click on the "Beauty" link driver =…
0
votes
2 answers

org.openqa.selenium.StaleElementReferenceException: element is not attached to the page document while iterating through a List

I don't know why this error shows up . Need help to fix it . Website i am working on :"http://freevideolectures.com/Course/3680/Pentaho-BI" . In this site List cl =…
-1
votes
2 answers

Selenium Stale elements in Python

I am trying to complete a problem involved in Angela's '100 Days of Python' course. It involves building a cookie clicker website that uses selenium to click the cookie from** http://orteil.dashnet.org/experiments/cookie/ **continually. Every 5…
-1
votes
1 answer

Why am I getting StaleElementReferenceException even though the element is present in my loop? (Selenium Python)

I'm pretty new to Python and coding in general, but I've been working on a datascraping project and I have been stuck for a couple days. Right now I am trying to make my code navigate through different pages in TripAdvisor. The code allows me to…
-1
votes
1 answer

Java and Selenium: Extreme StaleElementReferenceException

I'm experiencing a StaleElementReferenceExpection that seems beyond all reason in an application. It involves absolutely no refreshing or reloading of the page, but just two consecutive actions of accessing the element - one click and one assertion…
-1
votes
1 answer

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

Today I'm having troubles due to a "a href" button that does not have any ID to be identified, then let's explain a little bit more about the problem... I have an structure like this one(let's assume XXX is an anonymous path): wait =…
-1
votes
1 answer

Python, selenium stale element reference error

An error randomly occours in my python selenium project, where i scrape data from websites with my raspberry pi. It fetches date, temperature, wind and rainfall. The script sometimes run normally, but other times the error pops…
-1
votes
2 answers

how to avoid Infinite Recursion in a non-return method with Try catch

public class Sample { public static void main(String[] args) { method(); } public static void method() { try { System.out.println("function"); throw new StaleElementReferenceException("thih sexception occured"); } …
-1
votes
1 answer

Getting error "Message: stale element reference: element is not attached to the page document".what i am doing wrong

connections=driver.find_elements_by_css_selector("a span[class='mn-connection-card__name t-16 t-black t-bold']") print(len(connections)) for connection in connections: if connection.text == "XXX": connection.click() …
-1
votes
1 answer

Python Selenium wedriver iterate over form

I'm trying to automate a form assertion with a list of data, however I'm struggling on when and how to use "WebDriverWait" or driver implict wait. My list is 1000 strings. When I run a sample of a 100, less than 100 are captured correctly. The code…
-1
votes
1 answer

Trying to click each element in the list

@Test public void homework() throws InterruptedException { driver.get("http://www.localhost/litecart/admin/"); driver.findElement(By.cssSelector("td [name = username]")).sendKeys("admin"); driver.findElement(By.cssSelector("td [name =…
-1
votes
2 answers

How to fix StaleElementReferenceException?

I am trying to iterate between all the options of a drop down and it works fine with the first option. After second option, I get stale Element Exception. Below is the trace: org.openqa.selenium.StaleElementReferenceException: stale element …
1 2 3
11
12