What is XPath | How to create XPath | for Beginners

Поділитися
Вставка
  • Опубліковано 22 лис 2024

КОМЕНТАРІ • 225

  • @octobertoy5651
    @octobertoy5651 3 роки тому +66

    Your tutorials are everything, especially for someone like me who can not afford school... you have helped me so much!! You Are The Absolute Best Period!

    • @RaghavPal
      @RaghavPal  3 роки тому +1

      You are so welcome!

    • @anthonywright5275
      @anthonywright5275 2 роки тому

      Hi October, I see you have interest in XPath, may I ask what profession it is that you work in or seek?

  • @StephenBeale
    @StephenBeale 2 роки тому +18

    Thanks for this, very clear.
    My notes below in case they help others:
    1:16 what XPath is - a query language
    1:50 Examples of where we can use XPath
    2:08 Extracting a value using XPath
    2:40 Defining the specific book element to access by giving the position
    3:30 Examples of XPath tools online (links also in description
    3:50 XPath Generator for testing/generating XPaths
    4:55 Tool 2 - XPather for formatting/prettifying/indenting
    5:52 XML Toolbox - click on the element/node to create XPath for
    6:35 Absolute XPath - starts from the route and goes to the end node (slow, complex)
    7:08 Relative XPath - a better alternative to the above
    7:48 Relative XPath not affected by 'breaking' changes while Absolute XPath will break
    8:20 Example inspecting DOM in Google
    8:55 Testing Relative XPath in Google with Chrome Dev Tools
    9:55 Creating XPaths for tools like Selenium
    10:15 Summary of points covered

    • @RaghavPal
      @RaghavPal  2 роки тому +2

      Thanks a lot Stephen, will add this in video description as well

  • @atulrawat36
    @atulrawat36 Рік тому +1

    If its related to tech knowledge then there is always an Indian guy who can explain it better. Finally found the video that actually helped me find the xpath.
    Thank you

    • @RaghavPal
      @RaghavPal  Рік тому

      Glad to know it was helpful

  • @elliehan9240
    @elliehan9240 2 роки тому +4

    This is by far the best xpath tutorial for beginners. Athough I have used xpath for several years, I can still learn something from this video.

    • @RaghavPal
      @RaghavPal  2 роки тому

      I am so happy & humbled to see your message Ellie

  • @omerchannel
    @omerchannel 3 роки тому +4

    Very well explained, no lengthy content, just crisp and precise, hats off

  • @HariHaran-sl1pg
    @HariHaran-sl1pg 2 роки тому +3

    bro literally explained my 2hrs lecture in 10 mins..kudos

  • @mahmoudshahnazi8374
    @mahmoudshahnazi8374 2 роки тому +1

    Thank you Raghav. This was a great tutorial for me to review different aspects of XML.

  • @CarChroniclesChannel
    @CarChroniclesChannel 9 місяців тому

    This is the best explaination with no time wasting... thank you so much

    • @RaghavPal
      @RaghavPal  9 місяців тому

      Most welcome.. humbled

  • @ismersh
    @ismersh 3 роки тому +1

    It's clear and step by step explanation. Thank you.

  • @luking4freedom181
    @luking4freedom181 2 роки тому

    in germany we would call you "ehrenmann". Love your tutorials.

  • @vempadapuvenkatesh9304
    @vempadapuvenkatesh9304 4 роки тому +5

    You are such a sweet tutor. much love for ur knowledge and simplicity. Waiting for more videos like this from u sir!!

    • @RaghavPal
      @RaghavPal  4 роки тому +2

      So nice of you Vempadapu

  • @tarvinder91
    @tarvinder91 3 роки тому +4

    Extremely helpful content. This is so easy to understand from your video. Great work

  • @tomcha75
    @tomcha75 Рік тому

    Thank you for the very clear and step by step explanation!

  • @neha8789
    @neha8789 3 роки тому +1

    VERY VERY CLEAR EXPLATION.THANK YOU SIR.

  • @ayubkhan-safi
    @ayubkhan-safi 3 роки тому

    Searched for XPATH and what a brilliant and sample tutorial I found.

    • @RaghavPal
      @RaghavPal  3 роки тому +1

      So happy to see this Ayub. Can find all here - automationstepbystep.com/

  • @daedalusjones4228
    @daedalusjones4228 Рік тому +1

    Excellent information, very clearly explained. Thanks!

  • @schunchu
    @schunchu 2 місяці тому

    Thank you, Nice explanation, clear and concise

  • @kenzakhelkhal7931
    @kenzakhelkhal7931 2 роки тому

    Extremely helpful video explained in easy way!
    I appreciate ur efforts Thank u

  • @pradeepbabu194
    @pradeepbabu194 Рік тому

    Your Way of Explanation is very good , Easy to understand..!! Have you done videos on Workday..?

  • @mansipathak9294
    @mansipathak9294 2 роки тому

    Great Session! Thank you Raghav!

  • @rhacker0007
    @rhacker0007 3 роки тому

    Super teaching skills Mr Raghav Pal

  • @MikeDuffyMedia
    @MikeDuffyMedia 2 роки тому +1

    Awesome, very helpful, short and packed with helpful information!

  • @mateuszkozowicz9888
    @mateuszkozowicz9888 Рік тому +1

    Thank you for your help I really needed it and now I get it.

  • @patrickmcauliffe7162
    @patrickmcauliffe7162 3 роки тому

    Best video yet! Thankyou so much

    • @RaghavPal
      @RaghavPal  3 роки тому

      You're so welcome Patrick

  • @rahulvakh
    @rahulvakh Рік тому

    extremely educational and properly described- thanks @raghav

  • @meganburch4344
    @meganburch4344 2 роки тому

    Thank you SO MUCH for this information. VERY HELPFUL!! Thanks!!

  • @abhimeher
    @abhimeher 3 роки тому

    Best vid for xpath basic

    • @RaghavPal
      @RaghavPal  3 роки тому

      Glad to read your message Abhi

  • @dhrubajyotibharali7176
    @dhrubajyotibharali7176 3 роки тому

    it's really helpful and easy to understand thanks for this tutorial Sir

    • @RaghavPal
      @RaghavPal  3 роки тому

      You are most welcome Dhrubajyoti

  • @NoemiDiMartino-m5u
    @NoemiDiMartino-m5u Рік тому

    Thanks for this tutorial, it was extremely helpful!

  • @MasterMeto-j9d
    @MasterMeto-j9d 11 днів тому

    very good explaination bro!

  • @riteshkumar2686
    @riteshkumar2686 6 місяців тому

    Very informative video.

    • @RaghavPal
      @RaghavPal  6 місяців тому

      Glad it was helpful Ritesh

  • @husaintahir5214
    @husaintahir5214 2 роки тому

    You Are a good tutor..... thank you

  • @donpornrodkrajub5234
    @donpornrodkrajub5234 Рік тому

    Very good explanation. Thank you

  • @mypointofblue5260
    @mypointofblue5260 2 роки тому

    Thanks for sharing! Very good info!

  • @audunoklevik4435
    @audunoklevik4435 2 роки тому

    Informative! Good job!

  • @higiniofuentes2551
    @higiniofuentes2551 Рік тому

    Thank you for this very useful video!

  • @kishoresrinivas2104
    @kishoresrinivas2104 2 роки тому

    very nice explanation sir

  • @SE3_65_Bhupendra_Yadav
    @SE3_65_Bhupendra_Yadav 3 місяці тому

    Nice lecture sir

    • @RaghavPal
      @RaghavPal  3 місяці тому

      Thanks and welcome

  • @damithdilanka661
    @damithdilanka661 3 роки тому

    Very clear explanation thank you

  • @vnktravi
    @vnktravi Рік тому

    Very informative. Thank you

  • @umeshka9544
    @umeshka9544 2 роки тому

    Thanks for this wonderful session

  • @felipepardosuarez2364
    @felipepardosuarez2364 11 місяців тому

    Great video, thank you!

    • @RaghavPal
      @RaghavPal  11 місяців тому

      Most welcome Felipe

  • @marcohfm
    @marcohfm 3 роки тому

    Man, you're the best!

  • @svetlanamazhaykina6918
    @svetlanamazhaykina6918 3 роки тому

    Thank you Raghav! I enjoy your video

    • @RaghavPal
      @RaghavPal  3 роки тому

      Glad to hear that Svetlana

  • @himalierangika4131
    @himalierangika4131 3 роки тому

    Nice and clear demo.. Thank you !!!

  • @elg_
    @elg_ 2 роки тому

    Clarity 💯

  • @xyzabc6898
    @xyzabc6898 3 роки тому

    Very Good Explanation....

  • @sagarck1881
    @sagarck1881 2 роки тому

    Thank you so much sir. Very clear.

  • @tural.ahmatov
    @tural.ahmatov 2 роки тому

    Thank you, that is quality content!

  • @gilsonsouza8159
    @gilsonsouza8159 3 роки тому

    Hi Raghav Pal, What to do when xpath or ID doesn't work in the current page?
    for example, the page has everything is there just like a normal page.
    but when I select the element that I want and >right click> copy> copy xpath and try to search for it "Ctrl F" it does not show any results. how can I figure that out?
    Thank you so much, your videos always helped me a lot!!!

    • @RaghavPal
      @RaghavPal  3 роки тому +1

      Hi Gilson, in that case you can use parent child or hierarchy to generate xpath. Some helpful videos - ua-cam.com/play/PLhW3qG5bs-L83gLEZVIDHOvgTTz27po_0.html

  • @sauravbisht4127
    @sauravbisht4127 2 роки тому

    Thank you so much sir u r a life saviour❤️

  • @arvenfal
    @arvenfal 4 роки тому

    Thanks for the video, it's helped me with current task

    • @RaghavPal
      @RaghavPal  4 роки тому

      Glad to hear that Kyrylo

  • @xtosti1531
    @xtosti1531 Рік тому

    Супер !!! Спасибо!!!

    • @RaghavPal
      @RaghavPal  Рік тому

      Наиболее желанный

  • @shashikantverma3215
    @shashikantverma3215 3 роки тому

    Nice way to explain 👍

    • @RaghavPal
      @RaghavPal  3 роки тому

      Keep watching Shashikant

  • @mayayadhu
    @mayayadhu 2 роки тому

    Thank you sir and good 👍 explanation

  • @RamyaAnandanAnandan
    @RamyaAnandanAnandan 3 місяці тому

    Thank you soo much for this video

    • @RaghavPal
      @RaghavPal  3 місяці тому

      Most welcome Ramya

  • @amolgaikwad7146
    @amolgaikwad7146 Рік тому

    I am going to use this tutorial for
    RPA object extraction
    Is it right way to go with !!

    • @RaghavPal
      @RaghavPal  Рік тому

      It will help for any XML based app or doc

  • @pmak6074
    @pmak6074 3 роки тому

    Thank for the video! What are you doing about Sedna DataBase (clean XML without SQL DB)?

    • @RaghavPal
      @RaghavPal  3 роки тому

      Will need to check on that

    • @pmak6074
      @pmak6074 3 роки тому

      @@RaghavPal Ok! Thank's!

  • @jhansimahasivaraju3701
    @jhansimahasivaraju3701 2 роки тому

    Very helpful

  • @muhammad.rafi2012
    @muhammad.rafi2012 3 роки тому

    thanks for the session, just wondering if in the future another book is added on the book 2 place, then your xpath wont be valid anymore for that particular query, so how to deal with that smartly that it wont be broken, should there be any changes in the payload

    • @RaghavPal
      @RaghavPal  3 роки тому +1

      Hi Rafi, very good question, and this is why we use dynamic xpaths with regular expressions. Can check more here - ua-cam.com/play/PLhW3qG5bs-L83gLEZVIDHOvgTTz27po_0.html

  • @Rohitkumar-vq1yk
    @Rohitkumar-vq1yk 2 роки тому

    Bro you are awesome thank you very much

  • @meriaphan
    @meriaphan 7 місяців тому

    thank you sooo much!!

    • @RaghavPal
      @RaghavPal  7 місяців тому

      You're welcome Meria

  • @kajolgupta8847
    @kajolgupta8847 3 роки тому

    Thank you for this video

  • @poorenglish3107
    @poorenglish3107 3 роки тому

    have you course video about python + selenium tool + pytest frame work for automation ?

    • @RaghavPal
      @RaghavPal  3 роки тому +1

      Yes, can check here - automationstepbystep.com/

  • @pasinduvinsuka
    @pasinduvinsuka 11 місяців тому

    Thank you so much ❤🔥

    • @RaghavPal
      @RaghavPal  11 місяців тому

      You're welcome!

  • @gehadmohsen9399
    @gehadmohsen9399 3 роки тому

    Thank u
    Really u're great♥️

  • @mattyb4evr
    @mattyb4evr 3 роки тому

    Awesome, thanks

  • @devikothapalli9967
    @devikothapalli9967 3 роки тому

    Thank you soo much bro!!

  • @akashlakra7182
    @akashlakra7182 3 роки тому

    very helpful

  • @dcal1736
    @dcal1736 3 роки тому

    You give to simple of examples. In the bookstore xml file add multiple authors to a single book and use XPath to return all authors for that book. Why does it only return only the first occurrence whenever there are multiple authors for a book. Thanks.

    • @RaghavPal
      @RaghavPal  3 роки тому

      Hi, depends on the xml and xpath used, I will try to add some more examples

  • @beekasmagar483
    @beekasmagar483 2 роки тому

    Thank you sir

  • @jackiema5888
    @jackiema5888 3 роки тому

    Thank you!!

  • @NaveenPrabuSelvaraj
    @NaveenPrabuSelvaraj 3 роки тому

    When you clicked title element, the xpath generated in that website has lang element also. Is it necessary to have that element also?

    • @RaghavPal
      @RaghavPal  3 роки тому

      Hi Naveen, although I cannot recall, but should not be necesary

  • @yasashreeakula4923
    @yasashreeakula4923 3 роки тому

    Hello, i need to check where the icon on my webpage is closed or open. how can i choose are create a locator.

    • @RaghavPal
      @RaghavPal  3 роки тому

      Hi Yasashree, although I do not know entirely about your app and scenario, I can say that if the DOM XML of your app changes with open or close status, you can just verify that property using xpath

  • @CuteWorld614
    @CuteWorld614 4 роки тому

    Thank you!

  • @No-kj1ku
    @No-kj1ku 3 роки тому

    Thanks so much

  • @sasikaamarasinghe5966
    @sasikaamarasinghe5966 3 роки тому

    Thank you!

  • @ArchieeeUX
    @ArchieeeUX 2 роки тому

    Thank you

  • @RaviRaathod
    @RaviRaathod Рік тому

    thank u soooooo much bro

  • @rtsaibr
    @rtsaibr 2 роки тому

    Thank you

  • @AnushreeChakraborty68
    @AnushreeChakraborty68 3 роки тому

    How can I pass dictionary value inside xpath ?

    • @RaghavPal
      @RaghavPal  3 роки тому

      I will need to check on that

  • @ramyap2362
    @ramyap2362 3 роки тому

    Hi,can u please help me for handling snackbar using appium java

    • @RaghavPal
      @RaghavPal  3 роки тому

      Hi Ramya, not much info on this, will need to check online

  • @j.g.8860
    @j.g.8860 2 роки тому

    Pretty good video, although introducing XPath you did not describe the notation utilized. Mentioning arrays and the query notation but not describing what they mean can be confusing to those who might be unfamiliar. Otherwise, great job

    • @RaghavPal
      @RaghavPal  2 роки тому

      Hi, I will check on that

  • @kotarohan
    @kotarohan 4 місяці тому

    Thanks

    • @RaghavPal
      @RaghavPal  4 місяці тому

      Most welcome Rohan

  • @codingwithsam4992
    @codingwithsam4992 5 місяців тому

    Subscirbed, liked and thank you.

    • @RaghavPal
      @RaghavPal  5 місяців тому

      Welcome aboard Sam

  • @karanduhoon5788
    @karanduhoon5788 3 роки тому

    Broooo thank you

  • @panadolization
    @panadolization 3 роки тому

    Hi sir, i tried exactly like your tutorial, but when i run in eclipse, there an error "The method xpath(String) in the type By is not applicable for the arguments (void)". Hope you can help

    • @RaghavPal
      @RaghavPal  3 роки тому

      Hi Haney, looks like you are not able to pass a valid object, Pls check your code again, You can do debugging

  • @Kalapud1
    @Kalapud1 4 місяці тому

    Thank u

  • @rogeriomaximo
    @rogeriomaximo 3 роки тому

    Muito obrigado, me ajudou muito. tks

  • @kritishah1659
    @kritishah1659 3 роки тому

    Sir, i am not able to verify xpath for those element which are inside shadow root in dom. DevTools showing 0 matching node. How can i verify if it is wrong or right?

    • @RaghavPal
      @RaghavPal  3 роки тому

      Hi Kriti, will need to see some examples on how to handle shadow root dom. I will also plan to add a session

    • @kritishah1659
      @kritishah1659 3 роки тому

      @@RaghavPal sure sir thank you for reply.

    • @kritishah1659
      @kritishah1659 3 роки тому

      On Google search, sir i got to know devtools doesn't support shadow dom and xpath also. There is a tool Selectorshub which support shadow dom and it gives the right count.

    • @RaghavPal
      @RaghavPal  3 роки тому

      It will be helpful

  • @bsnehalbablu45
    @bsnehalbablu45 4 роки тому

    Tq sir

  • @vishamdookia3088
    @vishamdookia3088 3 роки тому

    thank u

  • @rahulsharma7990
    @rahulsharma7990 2 роки тому

    Can anyone please help me here ?
    I want to run two xpath together and store the value, I am not sure if it is possible.
    My one xpath is fetching City and second is state
    //div[(text()='city')]/following-sibling::div
    //div[contains(text(),'state')]/following-sibling::div
    As xpath is telling name of city and state is provided in next div of city and state. I want to run both and capture output in string format.
    On side note: both xpath is working fine for me.
    City
    London
    state
    England

    • @RaghavPal
      @RaghavPal  2 роки тому

      Hi Rahul, will need to check some examples online

  • @subs7v7n3
    @subs7v7n3 3 роки тому

    3:11 doesn't it count from 0?

  • @mayayadhu
    @mayayadhu 2 роки тому

    I need small real time project for beginners and simple

    • @RaghavPal
      @RaghavPal  2 роки тому

      Hi Maya, will need to check online

  • @nagwag123
    @nagwag123 10 місяців тому

    No one writes xpath, generating xpath in cmpny too?

    • @RaghavPal
      @RaghavPal  10 місяців тому +1

      Mostly, but having knowledge on xpath will help

  • @ishanpal9779
    @ishanpal9779 4 роки тому

    👍

  • @GLORYWAVE.
    @GLORYWAVE. 4 місяці тому

    8:33 its html not xml..

  • @samuelhicks8277
    @samuelhicks8277 Рік тому

    ppl on the tv gone say forward slash all they want, im gonna keep calling it an up slash

  • @deigratia86
    @deigratia86 2 роки тому

    helpful as fuck. 🤙