Selenium XPath Tutorial #10 - XPath Axes following, following-sibling

Поділитися
Вставка
  • Опубліковано 1 січ 2025

КОМЕНТАРІ • 13

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

    Notes: Selenium XPath Tutorial #10 - XPath Axes `following` and `following-sibling`
    1. Introduction:
    - These methods select nodes appearing after the context node in the HTML DOM.
    2. `following` Method:
    - `following` selects nodes appearing after the context node in the DOM.
    - XPath format: `//tagname[@attribute='value']//following::tagname`.
    - All nodes after the current node are selected.
    3. `following-sibling` Method:
    - `following-sibling` selects nodes with the same parent as the context node.
    - Nodes should appear after the context node.
    - XPath format: `//tagname[@attribute='value']//following-sibling::tagname`.
    4. Example Using Chrome Developer Tools:
    - Inspect dropdown element to demonstrate `following` and `following-sibling` methods.
    5. Example Scenario:
    - Select `option` element with value `AG` and find all `option` elements that appear after it.
    6. XPath Examples:
    - For `following`: `//option[@value='AG']//following::option`.
    - For `following-sibling`: `//option[@value='AG']//following-sibling::option`.
    7. Benefits and Usage:
    - `following` and `following-sibling` are useful when web elements lack unique attributes.
    - Understanding their appropriate usage enhances web element locating strategies in Selenium automation.

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

    thank you so much

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

    Thank you sir

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

    What is the difference between following and descendant ?

  • @dilawarkhan4085
    @dilawarkhan4085 4 роки тому +1

    great content as usual sir, did you discuss frames in any video?if yes kindly share link

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

      Hi Dilawar, Please find complete playlist here: "ua-cam.com/video/5LV4z_-91WY/v-deo.html"
      Please follow the tutorials in order so you do not miss any parts. Regards,Manish

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

    getting confused what is the difference between descendant and following xpath, both looks same. please let me know the answer asap.

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

      descendant selects elements which are on the level below the current node, like children, grandchildren etc... Following on the other way selects elements that are on the same level, but appear next to each other.

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

    the site is not working for inspecting

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

    sir you did not implemented the past 4 lectures, too much confusing this and the last 4 lectures.

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

      Hi Dilawar, Please find complete playlist here:
      "ua-cam.com/video/5LV4z_-91WY/v-deo.html"
      Please follow the tutorials in order so you do not miss any parts. Regards,Manish

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

    screen got blurred after 5.30min

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

      Hi Rajshri, it’s not blurred just colour overlay is done by purpose to highlight the final xpath. Regards, Manish