Selenium XPath Tutorial #2 - Relative Vs Absolute XPath

  Рет қаралды 71,936

Software Testing Mentor

Software Testing Mentor

Күн бұрын

Пікірлер: 12
@vijaykumarthimblikv2530
@vijaykumarthimblikv2530 3 жыл бұрын
Very beautifully explained sir❤u cleared all my confusions on Xpath🙌 Am very happy after watching this session ❤😍
@softwaretestingmentor
@softwaretestingmentor 3 жыл бұрын
Thank you Vijay! I am glad my work is helpful! Regards, Manish
@radhikaagarwal58
@radhikaagarwal58 4 жыл бұрын
Hello Sir, Thanks for such wonderful videos! I am enjoying my learning with the help of your videos. Keep posting!
@softwaretestingmentor
@softwaretestingmentor 3 жыл бұрын
Welcome and keep watching.
@ayushirajvanshi9754
@ayushirajvanshi9754 3 жыл бұрын
Hello Sir, thankyou for the amazing video. Can we determine xpath in Internet Explorer as well using CTRL+F ?
@jobanpreetsingh2370
@jobanpreetsingh2370 10 ай бұрын
very well explained
@softwaretestingmentor
@softwaretestingmentor 10 ай бұрын
Thanks for liking. Keep watching and sharing.
@manoj_mafiosi
@manoj_mafiosi Жыл бұрын
**Understanding Absolute and Relative XPath in Selenium - Notes:** - Introduction: - Absolute XPath contains the complete path from the root element to the desired web element. - Relative XPath starts from the middle of the HTML DOM structure. - Absolute XPath: - Starts with a single forward slash, like "/HTML/body/nav/a[2]". - Prone to failure if there are HTML DOM structural changes. - Not recommended for robust automation. - Relative XPath: - Starts with a double forward slash, like "//input[@name='first_name']". - More resilient to HTML DOM structural changes. - Recommended for stable and reliable automation. - Absolute XPath Example: - Absolute XPath for a specific div element: "/html/body/div[2]/div[3]". - Relative XPath Example: - Relative XPath for the input field with name attribute "first_name": "//input[@name='first_name']". - Advantages of Relative XPath: - Less prone to breaking with HTML DOM structural changes. - Offers stability and reliability to automation scripts. - Conclusion: - Absolute XPath contains the complete path from the root node, but it's not recommended for robust automation. - Relative XPath starts closer to the desired element, making it more adaptable to changes. - For stable and reliable automation, it's advisable to use relative XPath.
@manjushanetragaonkar1043
@manjushanetragaonkar1043 2 жыл бұрын
Hello sir I have one question Where we are using absolute x path???
@TienTrinh-nr3hx
@TienTrinh-nr3hx 3 жыл бұрын
thank u so much ^^
@Itech6969
@Itech6969 Жыл бұрын
so why use absolute xpath when its better to use relative?
@rishikeshshah7294
@rishikeshshah7294 Жыл бұрын
Thanks for making such a nice tutorial. I enjoy your teaching method. I tried to locate the first name text box by relative xpath //input[@name='first_name']. It is not possible because this is inside shadow root. I found the way to get to this element using getShadowRoot() method of selenium. // getting elements under shadow root WebElement id_field= driver.findElement(By.xpath("//dw-de-signup-form")) .getShadowRoot().findElement(By.cssSelector("dx-input.full-name-field")) .getShadowRoot().findElement(By.cssSelector("input#input")); id_field.sendKeys("Tester");
Selenium XPath Tutorial #3 - XPath Starts-with Function with Examples
7:16
Software Testing Mentor
Рет қаралды 59 М.
Selenium XPath Tutorial #1 - Introduction to XPath | Basic XPath Syntax
16:07
Software Testing Mentor
Рет қаралды 126 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 93 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 134 МЛН
What Is the Difference Between Absolute and Relative XPaths?
5:18
The Testing Academy
Рет қаралды 16 М.
Why Agent Frameworks Will Fail (and what to use instead)
19:21
Dave Ebbelaar
Рет қаралды 89 М.
Selenium XPath Tutorial #7 - XPath Axes Methods | Parent, Child, Self
12:31
Software Testing Mentor
Рет қаралды 60 М.
Selenium WebDriver Tutorial #12 - What are Locators in Selenium WebDriver
19:39
Software Testing Mentor
Рет қаралды 83 М.
Handle Dynamic Google Search Using Dynamic XPath - WebDriver Session - 15
21:51
Naveen AutomationLabs
Рет қаралды 167 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 93 МЛН