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

StaleElementReferenceException when I try to click the "n others" in "Liked by someone and n others" of an Instagram post, using Selenium and Python

So as you know, when you open a post on Instagram on Desktop, it will show "Liked by someone and 400 others". I am trying to click the "400 others" button using selenium, so that I could then go on to scrape the followers' names. I retreived the…
0
votes
1 answer

Not navigating pagination3 and getting stale element exception

I need to navigate pages and check services on each page down or up, but while navigating page 3 is showing error message as stale element exception. I have tried with this code but it's not working fine , someone please help me on this. public…
0
votes
3 answers

My java/selenium project suddenly giving errors but the elements are still there on the web application. Anyone know how to solve this?

My java/selenium project suddenly giving errors but the elements are still there on the web application. So im getting some weird stuff suddenly. Everything was working fine till this morning. I've executed these tests like 1000 times before and…
0
votes
1 answer

Getting StaleElementReferenceException when iterating through a list of WebElements

I was trying to automate the following scenario: go to amazon.com search for headphones add all the bestsellers in the first results page to the cart The steps I've followed to script this scenario: go to amazon.com enter the text "headphones" in…
0
votes
1 answer

Looping through a list of webelements with selenium (python) to retrieve attribute produces StaleElementReferenceException

I use selenium webdriver to do a search on a website which gives me multiple pages with several links on each page. My goal is to create a list of all links the search produced. It works fine for the first page but when I'm on the second page the…
0
votes
1 answer

selenium fire StaleElementReferenceException

i try to make a web crawler with selenium. My program fire a StaleElementReferenceException. I thought that were because i crawl a page recursive and when a page have no more links the function navigate to next page and not previously to the parent…
0
votes
1 answer

JSON Status Mapping for Stale Element - Selenium and Java

I wrote a script and received a stale element error. I know what the problem is, but I don't know how to fix the script. I am writing a script to do the following via FireFox: 1), Launch google.com, 2), type "pluralsight", 3), submit, 4), click…
0
votes
1 answer

Cannot click on stale element using Selenium in Python

I would like to preface this question by saying that I have viewed all the other questions on this topic and attempted to implement the solutions but am still having no success. I am trying to click on the plus button in the recommendations screen…
0
votes
0 answers

python: selenium, submit a form multiple times

I want to submit the form on this site https://nhqrnet.ahrq.gov/inhqrdr/data/submit for all possible combinations and download all excel files. My code runs successfully for one iteration but once it gets to the 2nd iteration it returns the error…
0
votes
1 answer

Where am I mistaken with my Explicit Wait | Expected Conditions | wait.until syntax?

I fixed my previous problem with sys.argv (depends on how the .cmd file call the script). Now I'm stuck with another trouble : selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to…
0
votes
2 answers

Selenium web scraping with "next" button clicking results in duplicate values

I'm using selenium and BeautifulSoup to scrape data from a website (http://www.grownjkids.gov/ParentsFamilies/ProviderSearch) with a next button, which I'm clicking in a loop. I was struggling with StaleElementReferenceException previously but…
0
votes
2 answers

Can't fix StaleElementReferenceException (element not attached to document)

I'm currently trying to do some Selenium webscraping but I keep running into this error: StaleElementReferenceException: Message: stale element reference: element is not attached to the page document The code is supposed to, on…
0
votes
1 answer

StaleElementReferenceException in get text with

I have try all available solving WebDriverWait wait6 = new WebDriverWait(driver, 500); wait6 .until(ExpectedConditions.presenceOfElementLocated(By.xpath("(//i[@class='material-icons'])[" + j + "]"))); I have application where I need to…
0
votes
2 answers

staleElementReference error on action class

As we use action class for usually Click event. Somehow I am getting exception on each action class usage. It throws StaleElementReference exception on every action method, Not working for single instance. Element does not able to click while…
0
votes
1 answer

Calling a webelement second time in Page Object with Page Factory design pattern gives stale element exception

We have a UI framework with Page Object and Page Factory design patterns. In one of my Page Object classes I have defined a webelement and calling it. In my test step class, I am calling this webelement once when this is on one page and I am…