Mystery of StaleElementReferenceException in Selenium WebDriver

  Рет қаралды 50,499

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

If you are a Selenium developer than you would have surely faced this mysterious exception called “StaleElementReferenceException“
Why exactly it occurs?
~~This has been my favorite interview question since last many years and most of the time candidates gets confused it with NoSuchElementException. In case you have never worked on a dynamic ajax based application then there could be a chance that you have never faced it.
Read full blog available here:
www.naveenautomationlabs.com/2...
~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
kzbin.info%20Au...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/COJqZQ4enmEt4JA...
vimeo.com/ondemand/webservice... Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
kzbin.info%20Au...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/COJqZUPB02r5sB7...
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautomationlabs.com/p...
API Course: www.naveenautomationlabs.com/p... ➡️Get Our Courses✔️
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautomationlabs.com/p...
API Course: www.naveenautomationlabs.com/p...
-------------------------------
✔️SOCIAL NETWORKS
Facebook: / naveenqtpexpert
Twitter: / naveenkhunteta
Blog: www.naveenautomationlabs.com
--------------------------------
Support My Channel✔️Or Buy Me A Coffee
Paypal: paypal.me/naveenkhunteta
Google Pay: naveenanimation20@gmail.com
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة

Пікірлер: 48
@soumyajit443
@soumyajit443 2 жыл бұрын
Amazing ! You have made it so clear by showing the exact reason for which the exception appears.
@PradipYogi59
@PradipYogi59 6 жыл бұрын
Awesome man...You r one of the Automation testing legend...Keep it up....n thanks for videos
@hellosasmitasgreenworld1896
@hellosasmitasgreenworld1896 5 жыл бұрын
Hi Naveen i understood this "StaleElementException" but in my project manually we are not refreshing the page. In my project For create user page, we have one Orga Id and Unit Id As per OrgaId unit Id will get load. So after giving OrgaId automatic page will refresh and unit id will show in select drop down. I tried with implicit wait also but still getting "TimeoutException" otherwise "StaleElementException" kindly give me some solution for this error. Thank you.
@ashwinumbarkar6625
@ashwinumbarkar6625 2 жыл бұрын
Thank you Naveen.
@kavithaks971
@kavithaks971 3 жыл бұрын
Your explanation is simply Superb.
@santhoshk8095
@santhoshk8095 6 жыл бұрын
amazing explanation sir..Thank You..
@sriramnagarajanit
@sriramnagarajanit 6 жыл бұрын
Thank you so much Naveen :), crisp explanation
@prabakarm5025
@prabakarm5025 6 жыл бұрын
thanks naveen. My doubt regarding stale element has came to end
@aravinda4199
@aravinda4199 5 жыл бұрын
Iam getting after selecting the drop down value my that page is reloading at the time iam getting stale element exception , how to handle it ??
@arpitarjaria2784
@arpitarjaria2784 2 жыл бұрын
Amazing mystery of staleelement exception thanks Naveen
@real_hello_kitty
@real_hello_kitty 4 жыл бұрын
Mysteries make QA more interesting 🧐. Like detective stories. 😎
@nagasaimaddula56
@nagasaimaddula56 2 ай бұрын
Amazing , clear explanation
@athilakshmi5379
@athilakshmi5379 4 жыл бұрын
Can you please make a video on how to document the test plan and test strategy for a new feature say flight feature creation for make my trip application...( assuming already bus and train booking features are available)
@samyapattnaik
@samyapattnaik 6 жыл бұрын
In 7.42 min the action is being performed on the button click. But price getting refreshed in another web element. This is where I m confused. How will I get stale element exception??
@BeautifulLifeKamesh
@BeautifulLifeKamesh 3 ай бұрын
Got good clarity by this explanation
@ananyaanu9436
@ananyaanu9436 6 жыл бұрын
Thanks Naveen ☺️
@sandeepduve7252
@sandeepduve7252 6 жыл бұрын
Very nice explained
@sauravmahata2401
@sauravmahata2401 6 жыл бұрын
great video thanks @naveek
@roshnray6566
@roshnray6566 2 жыл бұрын
Thanks Sir for explaining actual reason i.e ID
@anilleo18
@anilleo18 6 жыл бұрын
Thanks Naveen
@SuperDufferBoy
@SuperDufferBoy 4 жыл бұрын
Great explanation 👍
@thaleshbhardwaz
@thaleshbhardwaz 3 жыл бұрын
wow, a deep dive session
@mworld4537
@mworld4537 Жыл бұрын
All your videos have made to show the exact reason
@RohitSingh-br3xd
@RohitSingh-br3xd 5 жыл бұрын
Thanks Naveen . Could you please make video on how we can handle such kind of exception. have faced such questions in interview many times.
@neeraj9kumarpathak
@neeraj9kumarpathak 4 жыл бұрын
Great video 👍
@chanduvanam7961
@chanduvanam7961 5 жыл бұрын
So, how can we handle this stale element exception?
@thebolt1806
@thebolt1806 4 жыл бұрын
Excellent 👍
@hanumanthak6661
@hanumanthak6661 2 жыл бұрын
Thank you so much Naveen for detailed explanation! in this case what kind of exception we get if element is disabled after refresh? is it NoSuchElementException or StaleElementReferenceException?
@mailtoeanyeany2693
@mailtoeanyeany2693 5 жыл бұрын
Naveen, your sessions are informative, but they are long. Requesting you to please squeeze them a bit. Thanks for your good work.
@zionerick9414
@zionerick9414 3 жыл бұрын
You prolly dont give a shit but if you're stoned like me atm you can stream all of the new movies and series on InstaFlixxer. I've been watching with my girlfriend for the last weeks :)
@dominicbronson5053
@dominicbronson5053 3 жыл бұрын
@Zion Erick definitely, I have been watching on instaflixxer for years myself :D
@banti000
@banti000 6 жыл бұрын
Thanks Naveen.. so after every refresh selenium will generate its internal reference Id, which will not match with previous reference Id for all pages including ajax ?
@naveenautomationlabs
@naveenautomationlabs 6 жыл бұрын
yes :)
@banti000
@banti000 6 жыл бұрын
Naveen AutomationLabs Thank you. :) can you please explain coverage of ajax, js in selenium. 📺
@meghasandesam
@meghasandesam 6 жыл бұрын
Hey Naveen...Are you doing well? Your voice is different from previous videos.
@arkaimps
@arkaimps 6 жыл бұрын
Thanks Naveen for the video and the blog also you have wriiten on this.. Is there any way to handle this error? Does JavaScriptExecutor helps to handle
@mikethomas6323
@mikethomas6323 5 жыл бұрын
One of the best explanation of the solution I found: kzbin.info/www/bejne/r4q0o6ejg9Npi9E
@theknowledgejunction19
@theknowledgejunction19 2 жыл бұрын
Big fan 🙌
@shaileshchaudhary6621
@shaileshchaudhary6621 6 жыл бұрын
thanks, good explanation and can you provide Flipkart payment by using selenium Webdriver
@avinash..7130
@avinash..7130 6 жыл бұрын
Thanks a lot Naveen.. Learning so much using your tutorial. And please explain us how to handle this exception?.
@avinash..7130
@avinash..7130 6 жыл бұрын
We can use Try-Catch block and try to identify the element in try block if the exception is Stale element reference. But I would like to know by using Explicit wait or Fluent Wait as you are mentioned in the video in between. Thank you..
@54akhilesh
@54akhilesh 3 жыл бұрын
Thank you so much sir :)
@naveenautomationlabs
@naveenautomationlabs 3 жыл бұрын
Most welcome!
@dheerajsingh6568
@dheerajsingh6568 5 жыл бұрын
Great Naveen ..... One Q ... Then how can we handle staleElementException in Selenium ?? By using a function defined in Explicit ??
@mikethomas6323
@mikethomas6323 5 жыл бұрын
One of the best explanation of the solution I found: kzbin.info/www/bejne/r4q0o6ejg9Npi9E
@Shibu11229
@Shibu11229 2 жыл бұрын
Thanks for the clear explanation with the unique ID. I have a python selenium script that goes to a page, enters data and then clicks a submit button. Another page loads and the script clicks a search button. This is performed through a loop repeatedly and it works for approximately 10-40 times but it always fails at some seemingly random point with the stale element reference exception. I am searching for the button and clicking it on the very next line. Is it possible that the unique ID of the element is changing from one line of my code to the next? If so how do I address it? SearchButton = WebDriverWait(driver, 15).until(EC.element_to_be_clickable((By.CSS_SELECTOR, '.button-label'))) SearchButton.click()
@shrutipatne7884
@shrutipatne7884 6 жыл бұрын
How to overcome stale element exception
@mikethomas6323
@mikethomas6323 5 жыл бұрын
One of the best explanation of the solution I found: kzbin.info/www/bejne/r4q0o6ejg9Npi9E
How to use HashMap in Selenium WebDriver || Interview Question
35:00
Naveen AutomationLabs
Рет қаралды 46 М.
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 9 МЛН
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 78 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 43 МЛН
How to Handle Stale Element Exception in Selenium with Java
15:36
How to debug Selenium Framework Code using Eclipse Debugger
45:51
Naveen AutomationLabs
Рет қаралды 67 М.
How to handle hidden webelements in Selenium Webdriver
21:19
Mukesh otwani
Рет қаралды 125 М.
How to handle Calendars using Selenium WebDriver | Selenium |
1:03:35
H Y R Tutorials
Рет қаралды 35 М.
How to Become Genius in XPath in Selenium  - Session -18
39:48
Naveen AutomationLabs
Рет қаралды 714 М.
What is Selenium WebDriver Architecture?
50:38
Naveen AutomationLabs
Рет қаралды 149 М.
Taking ScreenShot ONLY for Failed Tests in Selenium using TestNG Listener
32:12
Naveen AutomationLabs
Рет қаралды 116 М.
Это - iPhone 16 и вот что надо знать...
17:20
Overtake lab
Рет қаралды 137 М.
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2,1 МЛН
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 5 МЛН
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 5 МЛН