Handling StaleElementReferenceException in Selenium Python (Selenium Python)

preview_player
Показать описание

In this session, I have explained, Handling StaleElementReferenceException using Selenium Python as part of Selenium Python Training series.

Unable to join our telegram group using the above link, you can ping me on my telegram number 9908895533

Join this channel to get access to perks:

Also check our other 30 Plus Full Free Courses below with proper learning order:

#1 Software Testing (Manual) with Live Project

#2 300 Plus Software Testing Interview Questions with Video Answers

#3 170 Plus Software Testing Types

#4 50 Plus Software Testing Tools

#5 Selenium Java (Full Crash Course) - Learn in 30 days

#6 Selenium Java Detailed Course with Live Project

#7 Selenium 4 Java Course (2022-23)

#8 Selenium Java Interview Questions

#9 Core Java Made Easy (Full Course)

#10 150 Java Programs for Interview with Video Solutions

#11 SQL Full Course (Beginners to Advanced)

#12 Python Programming Made Easy (Full Course)

#13 Selenium Python Full Course

#14 Python Interview Questions

#15 Security Testing Basics

#16 Mobile Testing Made Easy

#17 SelectorsHub Full Course for Selenium

#18 JavaScript Made Easy Full Course

#19 CSharp Made Easy Full Course

#20 Basic Web Technologies (HTML,CSS,JS,DOM,XML,SQL)

#21 - Cucumber BDD in Depth (Full Course)

#22 - Extent Reports in Depth (Full Course)

#23 - POI API in Depth (Full Course)

#24 - TestNG in Depth (Full Course)

#25 - API Testing using Postman (Full Course)

#26 - Kubernetes Made Easy (Full Course)

#27 - Docker Made Easy (Full Course)

#28 - New Selenium IDE TNG (Full Course)

#29 - SoapUI Full Course

#30 - Selenium Java - Framework Factory
Рекомендации по теме
Комментарии
Автор

Thanks for better explanation of the exception.

KrAsHeDD
Автор

Your case is very easy but When I worked for US client I have a New Jersey Government website Where I need to click first advance filter then select date, then enter from date & to date and then listing bills are showed.
( This Whole process are only DOM manipulation, No new URL just dynamically changed DOM).

I saved all tr rows element but when i click any listing page bills to open their detail page and for getting the data & when I do back or in second forloop my those tr elements are stale.

I need to make fresh new DOM every time after I click on any bills anchor tag for detail page.
& the irony is anchor tag doesn't have href attribute url 😂 it has onclick event with complex Javascript code.
So I need those DOM at any cost to execute onclick event.

I am Using Python with Selenium.

So I make common function and call inside forloop which every time with new forloop iteration make new fresh DOM and I click detail page get the data.. Again new forloop, again create fresh DOM from scratch & So on..

It works like this.. ✌️

DhavalAhir
Автор

sir if we dont take a object then also its showing the exception but the testscript is passed.

soumyamohanty
welcome to shbcf.ru