What is XPath | How to create XPath | for Beginners

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

КОМЕНТАРІ • 225

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

    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 Рік тому +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

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

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

    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 роки тому +3

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

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

    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  10 місяців тому

      Glad to know it was helpful

  • @HariHaran-sl1pg
    @HariHaran-sl1pg Рік тому +2

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

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

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

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

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

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

      Most welcome.. humbled

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

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

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

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

  • @vempadapuvenkatesh9304
    @vempadapuvenkatesh9304 3 роки тому +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  3 роки тому +2

      So nice of you Vempadapu

  • @schunchu
    @schunchu 2 дні тому

    Thank you, Nice explanation, clear and concise

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

    VERY VERY CLEAR EXPLATION.THANK YOU SIR.

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

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

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

    Excellent information, very clearly explained. Thanks!

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

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

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

    Very good explanation. Thank you

  • @mateuszkozowicz9888
    @mateuszkozowicz9888 9 місяців тому +1

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

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

      Glad it helped Mateusz

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

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

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

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

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

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

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

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

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

      You are most welcome Dhrubajyoti

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

    Very informative video.

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

      Glad it was helpful Ritesh

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

    Super teaching skills Mr Raghav Pal

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

    very nice explanation sir

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

    Great Session! Thank you Raghav!

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

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

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

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

  • @user-qv8pp4vo6h
    @user-qv8pp4vo6h Рік тому

    Thanks for this tutorial, it was extremely helpful!

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

    extremely educational and properly described- thanks @raghav

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

    Very clear explanation thank you

  • @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/

  • @user-yh4rf9oc4g
    @user-yh4rf9oc4g 18 днів тому

    Nice lecture sir

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

    Best vid for xpath basic

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

      Glad to read your message Abhi

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

    Nice and clear demo.. Thank you !!!

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

    Thanks for this wonderful session

  • @RamyaAnandanAnandan
    @RamyaAnandanAnandan 17 днів тому

    Thank you soo much for this video

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

    Best video yet! Thankyou so much

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

      You're so welcome Patrick

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

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

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

      Glad to hear that Kyrylo

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

    Very informative. Thank you

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

    Thank you for this very useful video!

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

      Glad it was helpful!

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

    Great video, thank you!

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

      Most welcome Felipe

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

    Thank you so much sir. Very clear.

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

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

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

    Thank you Raghav! I enjoy your video

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

      Glad to hear that Svetlana

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

    Thanks for sharing! Very good info!

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

    Bro you are awesome thank you very much

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

    Very Good Explanation....

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

    Very helpful

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

    Thank you sir and good 👍 explanation

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

    Informative! Good job!

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

    Thank you so much ❤🔥

  • @tural.ahmatov
    @tural.ahmatov Рік тому

    Thank you, that is quality content!

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

    Nice way to explain 👍

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

      Keep watching Shashikant

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

    Clarity 💯

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

    thank you sooo much!!

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

      You're welcome Meria

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

    Thank you sir

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

    Man, you're the best!

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

    Thank you for this video

  • @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

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

    Thank u
    Really u're great♥️

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

    thank u soooooo much bro

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

    Thanks so much

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

    Thank you

  • @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

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

    Thank you soo much bro!!

  • @kotarohan
    @kotarohan Місяць тому

    Thanks

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

    very helpful

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

    Muito obrigado, me ajudou muito. tks

  • @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

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

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

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

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

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

    Thank you

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

    Thank u

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

    Subscirbed, liked and thank you.

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

      Welcome aboard Sam

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

    Thank you!!

  • @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

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

    Awesome, thanks

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

    Thank you!

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

    thank u

  • @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

  • @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

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

    Thank you!

  • @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!

  • @AshtoshAgarwal
    @AshtoshAgarwal 3 дні тому

    9:00 Thanks

    • @RaghavPal
      @RaghavPal  21 годину тому

      Most welcome Ashtosh

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

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

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

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

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

    Broooo thank you

  • @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

  • @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/

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

    I need small real time project for beginners and simple

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

      Hi Maya, will need to check online

  • @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

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

    Tq sir

  • @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

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

    How can I pass dictionary value inside xpath ?

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

      I will need to check on that

  • @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

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

    👍

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

    No one writes xpath, generating xpath in cmpny too?

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

      Mostly, but having knowledge on xpath will help

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

    3:11 doesn't it count from 0?

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

    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

  • @MaryCarr-o9h
    @MaryCarr-o9h 4 дні тому

    Shad Bypass

    • @RaghavPal
      @RaghavPal  4 дні тому

      did not get your question Mary