Complete Xpath from Basic to Advance | 14 Xpath Function | All Xpath AXES | Xpath tutorial

  Рет қаралды 99,089

Automation Zone

Automation Zone

Күн бұрын

This will be one complete tutorial that will cover Everything in XPaths.
Demo page 1 : theautomationzone.blogspot.co...
Demo page 2 : theautomationzone.blogspot.co...
Topics are as follows :
Into :(0:00)
Basics :(1:36)
Using OR & AND :(8:12)
innerText or text function :(11:20)
Parent / Child is Unique :(12:53)
Xpath with Index :(18:10)
Absolute vs Relative :(21:07)
Advance - Elements as an Attribute (23:02)
Part 2 & Part 3 :- XPath Functions
Contains :(25:52)
Starts-With :(29:17)
Position :(30:42)
Last :(32:34)
Count :(34:13)
Ignore Space - normalize-space :(36:35)
Ignore Case - translate (41:00)
Ignore Space + Ignore Case :(46:00)
String-Length :(49:00)
Floor and Round :(50:30)
Not :(53:05)
substring-before | Substring-after :(55:20)
Part 4 : AXES
AXES intro :(58:34)
parent :(1:00:37)
ancestor and ancestor-or-self :(1:02:36)
child and descendant :(1:05:32)
following and following-sibling :(1:08:28)
preceding and preceding-sibling - same and above
Example :(1:12:25)
XPath Basic : • Xpaths in Selenium | X...
XPath Functions Part 1 : • Advance Xpaths | Xpath...
Xpath Functions Part 2 : • Advance Xpath | Ignore...
XPath Axes : • Xpaths Axes | Advance ...
Code Snippet :
Xpath in Selenium
===================
//*[@id='value'] - Any Elements by id
//*[@name='value']- Any Elements by name
//*[text()='value']- any Elements by text
//input[@id='value']- input Elements by id
//div[text()='value']- input Elements by text
//input[@id='value' and @name='value'] - two or more attributes
//input[@id='value' or @name='value'] - two or more attributes
//div[@id='value']/.. - one element up
//div[@id='value']/input - one element down by tag
//div[@id='value']/div/input - two element down by tag
//div[@id='value']//input - any level inside the element
//div[@id='value']//input[1] - first element inside an element wit tag
//div[@id='value']//input[@id='value'] - element inside an element with tag and attribute
Elements as attributes
//div[@id='value']/..
//*[div[@id='value']]
//div[@id='value']/../..
//*[*[div[@id='value']]]
Xpath Contains and Positions and more
============================
contains()
starts-with()
last() - tables
position() - use checkboxes in tables
count() - tables is an example
Xpath Ignore Case and Whitespaces and more
============================
normalize-space() - example with spaces
translate() - replace example
not() - take any example
floor()
round()
string-length(string)
substring-before(string1, string2)
substring-after(string1, string2)
Xpath Axes
===========
ancestor
ancestor-or-self
attribute
child
descendant
descendant-or-self
following
following-sibling
parent
preceding
preceding-sibling
self

Пікірлер: 205
@furkatsultonov9976
@furkatsultonov9976 Жыл бұрын
I give you the biggest like button and I would give thousands of like buttons with just one click if it was possible )) I found everything related to XPATH concept in one video tutorial with the highest quality that I have ever found so far. Thank you for the tutorial and keep up the good work!
@Automationzone
@Automationzone Жыл бұрын
Thank you so much !!
@brandonhunter3036
@brandonhunter3036 Жыл бұрын
Yeah this is completely underrated. Frankly better quality than many paid tutorials out there and far better explanations given. Very well done!👏👏
@Automationzone
@Automationzone Жыл бұрын
Thanks a lot @brandon
@kendriip
@kendriip 3 жыл бұрын
This is a underrated video and am telling you this saved me hours of possible research.
@Valentin439
@Valentin439 3 жыл бұрын
Yep. It helped me so many times with this information
@jeembour
@jeembour 3 жыл бұрын
Best video on the subject ever. Thank you so much!
@gyohza
@gyohza 10 ай бұрын
I didn't really even need to learn XPath, but you made this such a breeze to go through and I'm so glad I did. Thanks!
@abhin7508
@abhin7508 3 жыл бұрын
Thank you for making this Video. It is very useful especially those who are into automation testing. And thanks for adding timelines for individual topics.
@jetray5914
@jetray5914 2 жыл бұрын
This was super super helpful, I will definitely be referring to this as a cheat sheet for a long time!! thanks so much!
@patriotir
@patriotir Жыл бұрын
Thank you so much for this great video! I've read so many tutorials, but you explained it very well. great job
@mariatahir7686
@mariatahir7686 2 жыл бұрын
Your Tutorial is amazing containing all the information which I was confused about. Thank you so much.
@rupakumari9704
@rupakumari9704 3 жыл бұрын
best tutorial ever. very informative. very nicely explained !!
@tarunkumar-gz1fn
@tarunkumar-gz1fn 9 ай бұрын
One of best video on xpath. Cleared most of my doubts. Thank you.
@FlyingDutchman5705
@FlyingDutchman5705 Жыл бұрын
It's the best tutorial on Xpaths. Thank you sir!
@Mery_Abaeva
@Mery_Abaeva 2 жыл бұрын
You saved my time and efforts, thank you so much!
@santoshkumarsahoo3894
@santoshkumarsahoo3894 Жыл бұрын
Thank you so much for making this video, After watching this video any one can make any X-path ,no need for any other video /class to join
@vinayakadam8656
@vinayakadam8656 2 ай бұрын
This is really an amazing video which im really unaware we can write these type of xpaths in here, really greatvideo all thanks to you.
@dhanashreeize
@dhanashreeize Жыл бұрын
i swear man...i was looking for this...thank u thank u thank u....! none of the youtuber has explained in such depth...!
@Automationzone
@Automationzone Жыл бұрын
Thank you so much for such kind words
@nisarahmedqae
@nisarahmedqae 3 ай бұрын
this tutorial is so much exciting. covered all my doubts in a single video. i havent seen this kind of video on xpath before. thankyou so much sir
@aflyingtoaster6096
@aflyingtoaster6096 3 жыл бұрын
thanks man , you just saved me hours of research
@rarunkumar2005
@rarunkumar2005 3 жыл бұрын
Thanks a lot for your clear explanation on xpath.
@johnguyenecom
@johnguyenecom 10 ай бұрын
This is the best vid I ever seen.Easy to understand
@DamoOne
@DamoOne Жыл бұрын
Great tutorial. Thank you!
@patss5446
@patss5446 3 жыл бұрын
This video has given me so much confidence... thanks a lot brother
@raghavendrahk9275
@raghavendrahk9275 Жыл бұрын
Bro you are simply awesome .I got to know many things which i didn't know earlier. appreciate your effort 👏👏.
@3VAudioVideo
@3VAudioVideo 3 жыл бұрын
Excellent Tutorial! It provided great coverage, awesome examples and all done at a very good pace! Wish everyone could do FANTASTIC tutorials like yours! Thanks SOOOOO MUCH!!!
@Automationzone
@Automationzone 3 жыл бұрын
Wow, one of the best comments I have got so far.. it's ppl like you who motivate me to make more content.. thanks a lot for taking the time out to comment on my videos, I Highly appreciate it..
@3VAudioVideo
@3VAudioVideo 3 жыл бұрын
@@Automationzone I've been doing QA Automation since 1996 (SilkTest, WinRunner, QTP, some LoadRunner, some Soap UI Pro, Test Director), and now learning Selenium with C# and perfecting MySQL (for holding data-driven test case data, test results and list of test case information so filtered tests are driven from the database). Next is Java for JMeter and Selenium. Plus already have it so test results and steps are written to html files with screen shot links embedded. Next ,need to create a web page users can go to to view the results and to kick off and schedule test runs from the web. So I've been looking at lots of tutorials for years now and seriously, yours are are VERY VERY GOOD! I would put yours on par with "Programming with Mosh" but I like your a little pace better. So glad I found your channel. Already subscribed!
@patilnilesh9668
@patilnilesh9668 2 жыл бұрын
Simple and informative liked his effort and teaching skill keep up this good work.
@TazMusicProductions
@TazMusicProductions Жыл бұрын
This is great. Helped me tremendously. Just started a script 2 weeks ago I was lost.
@Automationzone
@Automationzone Жыл бұрын
Thanks. Means a lot
@vivekkulkarni5081
@vivekkulkarni5081 2 жыл бұрын
Thanks a lot sir you had helped me lot in clearing my doubts.
@louielee3583
@louielee3583 2 жыл бұрын
Amazing video, thank you!
@nandashivaprasad6159
@nandashivaprasad6159 2 жыл бұрын
AWESOME IS THE WORD FOR YOU ... You explained it so well .. I could have not asked for anything else .
@Automationzone
@Automationzone 2 жыл бұрын
Thank you Nanda for you kind words. Do subscribe for more content 👍
@sherxdavid
@sherxdavid Жыл бұрын
This is indeed underated video tutorial, keep up the good work and hope to see more updated videos as alot has changed since this was posted, thank you so much!!!
@Automationzone
@Automationzone Жыл бұрын
Thank you..will try to keep up with new content. Thank you for your motivational words !! 😃
@blackcloud5157
@blackcloud5157 3 жыл бұрын
best tutorial ever!!! I searched at lest 30 minutes for something that's easily understandable . Thank you!
@sushma2223
@sushma2223 3 жыл бұрын
Same here thank dude
@vaibhavathawale677
@vaibhavathawale677 3 жыл бұрын
Very nice explanation... Easy to understand. Thanks.
@abhinavkale4632
@abhinavkale4632 4 ай бұрын
great content. Found everything here.
@sulaimanNabi
@sulaimanNabi 2 жыл бұрын
VERY HELPFUL !!! You made it very simple for the beginners. Thank you so much.
@Automationzone
@Automationzone 2 жыл бұрын
Thank you Sulaiman, do subscribe for more such tutorials 👍
@lovepreetkaur2676
@lovepreetkaur2676 5 ай бұрын
Really appreciate the effort for creating the example pages where we can practice. It was really really helpful. will look forward to new videos from you. It saved a lot of time and Thank God, I got this video soon and didnt waste time on other tutorials. I feel confident that I can implement this now :)
@syronox5357
@syronox5357 2 жыл бұрын
thank you this was very helpful
@skillguunarcade302
@skillguunarcade302 Жыл бұрын
excellent job. contains very good information.
@mahidhars6778
@mahidhars6778 2 жыл бұрын
Thanks a lot sir . The video was very informative .
@lalithamocherla8110
@lalithamocherla8110 2 жыл бұрын
Thanks.. very well explained and finally found a best video in utube for xpath🤗🤗🤗 👏👏💯
@loretalobo3552
@loretalobo3552 4 жыл бұрын
That heirachy chart was really easy to understand. This covers almost all of xpath..Thanks a lot for making it so easy to understand.
@Automationzone
@Automationzone 4 жыл бұрын
Thank you @Loreta, i am glad that the xpath heirachy chart was helpful. Initially i was at a crossroad, to add the chart or not, now looking at your comments i am glad that i did add it.
@renne2467
@renne2467 Жыл бұрын
What a wonderful video ❤
@gudia7702
@gudia7702 Жыл бұрын
Best xpath video so far….thank you for nice presentation!
@Automationzone
@Automationzone Жыл бұрын
Thank you so much
@SirOreo62
@SirOreo62 Жыл бұрын
Excellent presentation. I was well organized, easy to understand and follow. You explain concepts clearly and effectively. Much appreciated.
@Automationzone
@Automationzone Жыл бұрын
Thank you !!
@preetk4690
@preetk4690 3 жыл бұрын
Best tutorial. thanks
@vampirekabir
@vampirekabir 3 жыл бұрын
best tutorial ever!!
@RameshRamesh-me4gm
@RameshRamesh-me4gm 3 жыл бұрын
You are amazing!!
@vedantapreetham7383
@vedantapreetham7383 Ай бұрын
Excellent teaching
@vamshikiran36
@vamshikiran36 4 жыл бұрын
Thanks, very informative. And the explanation with examples is awesome
@Automationzone
@Automationzone 4 жыл бұрын
Thank you @Vamshi, i am glad that you found my explanations useful. This encourages me to add more videos to the playlist
@sushma2223
@sushma2223 3 жыл бұрын
Thank you so much 🙏🙏🙏
@devanarayanababu1996
@devanarayanababu1996 3 жыл бұрын
Top notch Content!
@MomchiBro
@MomchiBro Жыл бұрын
Great explanation man! Watched numerous videos before this one and i wasn't able to understand the xpaths good. Now i feel confident!! Keep up the good work! Subscribed
@Automationzone
@Automationzone Жыл бұрын
Thanks for the good words man!
@jeffrey8154
@jeffrey8154 3 жыл бұрын
One thing I do want to say before you read the rest of the text.Your explanation of the Xpath concept is the best video I have come across yet. I really wish you was showing a larger screen area of the HTML so we can see the context.a good example of where a larger area would have helped is at 21:00. I can't seethe HTML tree so I could clearly under stand the index and the context. The text above isn't really as important to show the full body of text if you are busy explaining the HTML.
@willer2k
@willer2k 3 жыл бұрын
thank you very much
@murugananthamn6880
@murugananthamn6880 3 жыл бұрын
Good informative video!!
@haideralihassan5053
@haideralihassan5053 3 жыл бұрын
Very Learning Video.
@creatur
@creatur 2 жыл бұрын
Thanks man ❤
@f.a5148
@f.a5148 Жыл бұрын
i have watched a lot of videos, but this video is unique thanks a lot brother.
@Automationzone
@Automationzone Жыл бұрын
Thank you for ur support 😊
@sauravmaity7490
@sauravmaity7490 2 жыл бұрын
This is very well curated. Loved it ❤
@Automationzone
@Automationzone 2 жыл бұрын
Thanks Saurav !! So subscribe for more tutorials 👍
@shitalpawar4512
@shitalpawar4512 Жыл бұрын
Amazing session
@mohitchoudhary9008
@mohitchoudhary9008 3 жыл бұрын
Amazing, best
@treesay5951
@treesay5951 3 жыл бұрын
Thanks a lot😊
@wuajaz91
@wuajaz91 3 жыл бұрын
Thanks, after watching this video I am able to handle with web scraping faster. In my opinion adding some demo sites for testing is a superb idea! What a shame that not so many people have watched it. ;)
@jyotsnakolla4158
@jyotsnakolla4158 2 жыл бұрын
Perfect Enough
@kumbharsangita6391
@kumbharsangita6391 Жыл бұрын
superb explaination ..in simple word..
@Automationzone
@Automationzone Жыл бұрын
Thank you
@victorferreirapereira1502
@victorferreirapereira1502 Жыл бұрын
Such a great content!
@Automationzone
@Automationzone Жыл бұрын
Thank you !!
@MdRahaman-pj9rc
@MdRahaman-pj9rc Жыл бұрын
Excellent and excellent. Very grateful to You.💕💕
@Automationzone
@Automationzone Жыл бұрын
Thanks
@srikanthsunkara
@srikanthsunkara 10 ай бұрын
Wow Great Brother 🎉🎉🎉🎉
@dineshkumbhare3882
@dineshkumbhare3882 2 жыл бұрын
Wow really nice video....
@wisegeek7756
@wisegeek7756 Жыл бұрын
Perfect xpath course ever. thnx
@Automationzone
@Automationzone Жыл бұрын
Welcome @wise geek !
@poreshrautofficial7076
@poreshrautofficial7076 Жыл бұрын
Thank you sirr
@pragadeeshas
@pragadeeshas 2 жыл бұрын
Look like deep dive into an ocean 🌀🌊🏊 Hats off for the video
@Automationzone
@Automationzone 2 жыл бұрын
Thats a unique comment. Thanks Progadeesh for your support. So subscribe for more such content 👍
@user-vm7we6bm7x
@user-vm7we6bm7x 2 жыл бұрын
nice pronunciation and perfect explanation continue watching at 41:36
@samratjulme8418
@samratjulme8418 2 жыл бұрын
thank u so much sir.............👌👌👌👌👍👍👍👍👍👍👍
@qaz8661
@qaz8661 2 жыл бұрын
Thank you!!
@Automationzone
@Automationzone 2 жыл бұрын
👍
@preeti3911
@preeti3911 2 жыл бұрын
Hi. Thank you for such easy explaination. Really appreciate your efforts. 👌😃
@Automationzone
@Automationzone 2 жыл бұрын
Thank you Preeti for your support. Do subscribe for more content 👍
@nagalakshmikothuru6603
@nagalakshmikothuru6603 Жыл бұрын
Thank u very much, very much useful
@Automationzone
@Automationzone Жыл бұрын
So glad it was useful. Thanks!
@chandanmahato3437
@chandanmahato3437 2 жыл бұрын
really awesome training Brother.
@Automationzone
@Automationzone 2 жыл бұрын
Thanks Chandan, do subscribe for more tutorials 👍
@suhaibalrabee9399
@suhaibalrabee9399 Жыл бұрын
Thanks!
@Automationzone
@Automationzone Жыл бұрын
@Suhaib - You are the first Person to Super Thank Me !! I will remember your name buddy !! Will be sure to mention you in the upcoming video :)
@suprabathj7843
@suprabathj7843 3 жыл бұрын
Nice one
@divyanshuanand3396
@divyanshuanand3396 Жыл бұрын
your videos are of great help..plz come up with more frequency
@Automationzone
@Automationzone Жыл бұрын
Thanks. I agree, I need to be more consistent.
@Funnyvideos____2
@Funnyvideos____2 Жыл бұрын
This video is very helpful
@Automationzone
@Automationzone Жыл бұрын
Thank you 😊
@jayasandeepaagadu5660
@jayasandeepaagadu5660 Жыл бұрын
Super bro thank you soo much really
@Automationzone
@Automationzone Жыл бұрын
Welcome 😊
@pjumesh
@pjumesh Жыл бұрын
Really cool.. nice explanation...
@Automationzone
@Automationzone Жыл бұрын
Thank you! 😊
@Fewerwordsmoretimes
@Fewerwordsmoretimes 2 жыл бұрын
I like it
@41_hrishikeshpawar8
@41_hrishikeshpawar8 Жыл бұрын
Indeed a very great and useful tutorial. It would be good if the tutorial started with 3-4 mins of theory about XPATH, like what it is and its uses. But anyways we can google. Thank you for this tutorial.
@Automationzone
@Automationzone Жыл бұрын
Ya.. that's a good thing to have.. will make a note of this.
@yugash4474
@yugash4474 Жыл бұрын
Bro... you literally saved me bro. I didn't skipped even once in this vedio. It was that good 💯 Thanks a lot. I'll definitely forward this vedio to others who need this
@Automationzone
@Automationzone Жыл бұрын
Thanks a lot !!
@ageresequituresse
@ageresequituresse 10 ай бұрын
bro, bro, hey bro, but bro, dude, bro bro
@Automationzone
@Automationzone 10 ай бұрын
Bro , yo bro, yo yo bro yo bro bro
@joshuamarcano350
@joshuamarcano350 2 жыл бұрын
Fire !
@Automationzone
@Automationzone 2 жыл бұрын
Thanks bro!!
@hetalpatel45
@hetalpatel45 2 жыл бұрын
really nice in depth video, thank you , can you make video on css pls
@Automationzone
@Automationzone 2 жыл бұрын
Here u go - kzfaq.info/get/bejne/l7N8eLF1vJa1e3k.html
@user-bc8su2vi1s
@user-bc8su2vi1s 5 ай бұрын
Good session 🙂
@Automationzone
@Automationzone 5 ай бұрын
Thank you
@yaswanthd7693
@yaswanthd7693 6 күн бұрын
Super
@akhilaarelly2771
@akhilaarelly2771 2 жыл бұрын
explain about preccendig sibling sir
@mv8167
@mv8167 Жыл бұрын
Great job, best Locator video yet. I have a question, if you would help. I gave a 5-column by the 50-row table. I need to find a name in the 5th column and then return the matching 1st and second column data using the the Xpath or CSS locator. is this using ./ and ././?
@Automationzone
@Automationzone Жыл бұрын
This is one way we can implement this A table is made of three tags Table --> Table Row ( TR ) --> Table Data ( TD ) there might be more tags in between this.. but these will always be there Step 1 - get the TD with ur data String elementText = "element_text_value"; WebElement element = driver.findElement(By.xpath("//td [ text() = '" + elementText + "']")); Step 2 - find the Row it belongs to WebElement row = element.findElement(By.xpath("./ancestor::td[1]")); note u can combine step 1 and 2.. but try not to do that.. it will be difficult to debug if needed. Step 3 Now u have the row.. find ur TD via index after u get the list of elements in that row List data = row.findElements(By.xpath("//td")); data.get(0).getText(); data.get(1).getText();
@smbdekort
@smbdekort Жыл бұрын
good vid thx for the knowledge, only thing is you typed at 42:10 bxcd while you said axcd and which it should be if I understand correctly by your explanation and the context
@Automationzone
@Automationzone Жыл бұрын
Yes, that was a mistake on my side. Glad u liked the content!!😃
@mulanisahil640
@mulanisahil640 3 ай бұрын
why my web element is not highlighted when I using key ctrl + F
@DeadSilence315
@DeadSilence315 Жыл бұрын
I actually feel like I understand how to do this now, thank you so much! I have a question along the lines of your string length example. In the following example, how would I write an xpath for the width being greater than 40px? I'm successfully using the below path, but I'm curious if there's a better way: [contains (@class,'grid-wrapper') and not (@style='width: 40px;')] Thank you!
@Automationzone
@Automationzone Жыл бұрын
Try this.. not sure if it will work.. but work around these lines [contains (@class,'grid-wrapper') and (number(substring-before(substring-after(@style, 'width:'),'px;')) > 39 )]
@DeadSilence315
@DeadSilence315 Жыл бұрын
@@Automationzone this worked on the first try, thanks again!
@panth5501
@panth5501 10 ай бұрын
Awesome content, just one critic, I don't think you understand what word 'particular' means : )
@Automationzone
@Automationzone 10 ай бұрын
Haha.. I am not sure what to reply 😅
@bhangra20001
@bhangra20001 3 жыл бұрын
//div[@class="v-input v-text-field v-text-field--single-line v-select theme--light"]. i try to use the index but no luck in figuring out how to select a specific drop down.
@nagchess
@nagchess 2 жыл бұрын
For more information, pls refer d link kzfaq.info/get/bejne/g8VkipOhmdmxZmg.html
@nikhileshm.s8868
@nikhileshm.s8868 3 жыл бұрын
when I click on the demo page 1 link and press F12 for opening the xpath console, it going to airplane mode but not opening the console please help.
@Automationzone
@Automationzone 3 жыл бұрын
You may be using a laptop where function keys have alternative use. Like turn off screen, wifi, brightness etc. U might have to press the function key + F12 U can turn this feature off from the bios I guess. Do look at the laptop manual for more details
@krishnabhanushali5690
@krishnabhanushali5690 5 ай бұрын
At the time of explaining the syntax for xpath, why didn't you covered use of *, I felt like you are reading it from somewhere
@shankarraj3433
@shankarraj3433 2 жыл бұрын
Hi, what is the main difference between these two XPaths. //div[@id='B2']/following::* => (1 of 228) //div[@id='B2']//following::* => (1 of 236)
@ezugwukelechi9632
@ezugwukelechi9632 2 жыл бұрын
Thanks for this video. Please, how can one use XPath to extract comprehensive product data details from multiple pages of an e-commerce products website? Please reply 🙏
@Automationzone
@Automationzone 2 жыл бұрын
Could you give me one example. I was anyways thinking of making a data extraction video from a website
XSLT XPath Tutorial
1:08:20
arbitrarytechnology
Рет қаралды 44 М.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 111 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,8 МЛН
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 84 М.
Xpaths in Selenium | Xpath Locators | Relative Xpaths - Xpath Tutorial 1
26:05
How to Become Genius in XPath in Selenium  - Session -18
39:48
Naveen AutomationLabs
Рет қаралды 715 М.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
pixegami
Рет қаралды 256 М.
Automate your job with Python
6:07
John Watson Rooney
Рет қаралды 389 М.
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 111 МЛН