How to write XPath for Hidden and Invisible dropdown elements: SelectorsHub

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ย. 2020
  • In this video, you will learn how you can quickly write the XPath for hidden dropdown elements and for those elements which got disappeared from the DOM after inspecting.
    SelectorsHub helps to generate, write and verify the XPath & cssSelector.
    SelectorsHub is the complete new way to generate, write and verify the XPath and cssSelectors.
    Checkout SelectorsHub primary Sponsor TestProject- A FREE end-to-end test automation tool.
    bit.ly/Sh_TestProject
    Please be a patron and support SelectorsHub to run it FREE forever.
    Even 1-5$ (a coffee cost) per month will be a great help.
    / sanjaykumar_s. .
    SelectorsHub-
    1) It suggests all possible XPath and cssSelector functions while typing like smart editor along with their occurrences to complete Selectors quickly. Now you need not to copy and paste attribute values from DOM anymore to build XPath and cssSelector.
    2) Generate all types of possible selectors in single click.
    3) Copy XPath, cssSelector and JS path from the context menu itself. No need to open DevTools and SelectorsHub tab anymore.
    4) Feature to customise contextMenu.
    5) Feature to disable and enable SelectorsHub in contextMenu
    6) It gives robust unique relative cssSelector and XPath.
    7) It also supports shadowDOM, iframe, frame and SVG elements.
    8) It gives the proper error message like what is wrong in your xpath and cssSelector.
    9) It also gives the index based xpath in auto suggest.
    10) It has the feature to generate selector with the desired attribute.
    11) You can also generate selectors with driver command.
    12) You can customise the UI as you want.
    13) All the config will be saves in local so next time when you open it, it open with your configs.
    14) To copy the Selector's value, just click on copy icon or the Selector's Header.
    15) To edit Selector's value, just click on selector's value, it will put the value in box where you can edit it and verify.
    Please follow video tutorial to make the best use of SelectorsHub.
    • SelectorsHub 2.0 detai...
    If you face any issue or feedback, feel free to reach out to me at selectorshub@gmail.com
    Please find the change log here-
    www.selectorshub.com/changelog/
    For more details please checkout homepage-
    www.selectorshub.com/
    Very simple steps to use the tool-
    1. Open DevTools.
    2. On right side, the last sidebar tab is SelectorsHub. Click on it.
    3. Here it show all possible selectors for inspected element. For whichever element you want to generate selector, just inspect that and it will generate all possible selectors for that element.
    4. To build own XPath or cssSelector, start typing in the selector input box.
    5. SelectorsHub will automatically suggest all attributes and everything to complete Selectors quickly. Now you need not to copy and paste attribute values anymore. With this you can save huge amount of time.
    6. After typing just press enter.
    7. It will high light all matching node and list down them in the SelectorsHub tab.
    8. It will also scroll the web element to viewable area.
    9. To copy selectors value, click on copy icon.
    10. To edit selector value, click on that selector value.
  • บันเทิง

ความคิดเห็น • 58

  • @robertofierro223
    @robertofierro223 3 ปีที่แล้ว +3

    thank you for this material, this guide helps me a lot to understand dropdown behavior. Greetings from Chile :D

  • @Maverism
    @Maverism ปีที่แล้ว +1

    Hi Sanjay sir thank you so much for your unconditional support your trick has worked wonders for me...

  • @shreyashpathak2645
    @shreyashpathak2645 2 ปีที่แล้ว +1

    Really Helpful, Thanks For the Solution

  • @BajiC
    @BajiC 2 ปีที่แล้ว +1

    It indeed helpful brother.
    Thankyou

  • @shehzad1589
    @shehzad1589 2 ปีที่แล้ว +1

    Thanks bro ... it really helped me alot

  • @rraviteja
    @rraviteja 3 ปีที่แล้ว +1

    Thank you very much.

  • @naveenkumarroyal3346
    @naveenkumarroyal3346 2 ปีที่แล้ว +1

    Thank You Bro. I blocked with some issue. This Videos plotted a way to clear it.

  • @blitzstar9333
    @blitzstar9333 3 ปีที่แล้ว +1

    Thanks it really helped!!

    • @SelectorsHub
      @SelectorsHub  3 ปีที่แล้ว +1

      Glad to hear that. Please share SelectorsHub with your colleagues.

  • @zafaryabkhan5013
    @zafaryabkhan5013 2 ปีที่แล้ว +1

    You are great Sanjay 👍

    • @SelectorsHub
      @SelectorsHub  2 ปีที่แล้ว

      Your welcome. You can join my live training to learn more concepts about xpath etc here - selectorshub.com/selectorshub-training/

  • @hassam361
    @hassam361 ปีที่แล้ว +3

    You have guided to select iFrames using selenium switch_to command, but after selecting there is a need to unselect the frame as well to start working with elements in the default screen, for this we need to type driver.switch_to.default_content() inorder to unselect the selected frame. Thanks

  • @liamaluca
    @liamaluca 2 ปีที่แล้ว +1

    thank you very much! Do you help a lot!

    • @SelectorsHub
      @SelectorsHub  2 ปีที่แล้ว

      Your welcome. You can join my live training to learn more concepts about xpath etc here - selectorshub.com/selectorshub-training/

  • @padminibhavyat.m.9992
    @padminibhavyat.m.9992 ปีที่แล้ว +3

    Thank you! But even in debugger mode, I get the tag and when I click on the div to expand, it disappears. So I am getting an empty list.

  • @FelpBR
    @FelpBR 10 หลายเดือนก่อน +1

    Thank you❤

  • @techytalks7270
    @techytalks7270 2 ปีที่แล้ว +1

    thanks!

  • @user-mw9yg7un6s
    @user-mw9yg7un6s 3 หลายเดือนก่อน +1

    Hi it is very useful but what to do if I have to get xpath for a suggestion which occur while searching any item through search box in flipkart , because as soon as I right click that suggestion it get gets disappear .

    • @SelectorsHub
      @SelectorsHub  3 หลายเดือนก่อน

      With the help of SelectorsHub Debugger feature you can inspect any kind of dynamic drop-down, suggestions dropdown and dynamic element. Here I have shown flipkart example- th-cam.com/video/nB8QA68PwvQ/w-d-xo.htmlsi=ubhYW2XurKMS_HvP

  • @CSX7450
    @CSX7450 ปีที่แล้ว

    Just freeze the page from sources in devtool and your dropdown will not going to collapse. And you can check and find any element locator.

  • @VarunKumar-yx5nj
    @VarunKumar-yx5nj 3 ปีที่แล้ว +1

    Hi actully in some popover dropdowns when we rightclick on the dropdown element,that element will get selected.so how to handle that one

    • @SelectorsHub
      @SelectorsHub  3 ปีที่แล้ว

      Use SelectorsHub debugger feature for that.

  • @ajitpandey5229
    @ajitpandey5229 2 ปีที่แล้ว +1

    Sir in gobibo when I am click on from and enter the suggestion then it is showing the autosuggestion but when right click then its disappear.
    how to find xpath of such element

    • @SelectorsHub
      @SelectorsHub  2 ปีที่แล้ว

      Please follow this video-
      th-cam.com/video/CW00y97mXBA/w-d-xo.html

  • @shailendrapandey4321
    @shailendrapandey4321 ปีที่แล้ว +1

    Sir what if as we right click on the element and download starts and we are not able to inspect the element

    • @SelectorsHub
      @SelectorsHub  ปีที่แล้ว

      Sure, you can use the SelectorsHub Debugger feature for such elements. Follow this tutorial - th-cam.com/video/TlnTG641i_o/w-d-xo.html

  • @harmansingh-bq2rm
    @harmansingh-bq2rm 2 ปีที่แล้ว +1

    what if there is ::after pseudocode in the ::after and the dropdownlist only appears when we click on the arrow which is ::after and it is not interactable when we try to automate it even with the selectorshub

    • @SelectorsHub
      @SelectorsHub  2 ปีที่แล้ว +1

      This is a pseudo element which can’t be located through locators as you mentioned well. So for this you will have to figure out if there is any element on which by clicking dropdown will appear.

    • @harmansingh-bq2rm
      @harmansingh-bq2rm 2 ปีที่แล้ว

      @@SelectorsHub yes its an arrow inside a div tag and i don't know any other way to find it other than inspect tool. Its not an anchor tag, or any other clickable element, when i use the inspect element arrow it focuses to the :after code on html section.
      Thank you for your quick response btw.

    • @SelectorsHub
      @SelectorsHub  2 ปีที่แล้ว +1

      @@harmansingh-bq2rm please connect with me on SelectorsHub slack channel, i will help you on this

    • @harmansingh-bq2rm
      @harmansingh-bq2rm 2 ปีที่แล้ว

      @@SelectorsHub Where do i find that channel

    • @padminibhavyat.m.9992
      @padminibhavyat.m.9992 ปีที่แล้ว

      @@harmansingh-bq2rm I am facing the same issue. Were you able to find a workaround for this?

  • @UnpluggedGuru
    @UnpluggedGuru 2 ปีที่แล้ว

    Help me for delete delivered pdf file on web whatsapp via vba.🙏🏻

  • @harshithareddy2376
    @harshithareddy2376 2 ปีที่แล้ว +1

    But in my application on right click, drop-down is disappearing.how can I get xpath for this elements.could anyone have solution for this, please let me know

    • @SelectorsHub
      @SelectorsHub  2 ปีที่แล้ว

      Yes you can use debugger feature of SelectorsHub. Please checkout the debugger feature

  • @gayathrikannan5314
    @gayathrikannan5314 ปีที่แล้ว

    How to select drop-down value if drop-down is in shadow root

  • @vasanti_kulkarni_YT
    @vasanti_kulkarni_YT 2 ปีที่แล้ว +1

    The organization with which I am working won’t allow us to download and use this … is there any other way

    • @SelectorsHub
      @SelectorsHub  2 ปีที่แล้ว

      Sure you can easily get it unblocked and also you can try on firefox. On firefox, they must have not blocked.
      Follow this video to get it unblock-
      th-cam.com/video/wH3qbioP_3w/w-d-xo.html

  • @theglorioussapphiremonkey4750
    @theglorioussapphiremonkey4750 3 ปีที่แล้ว +1

    Hi my dropdown gets double click even if its just single click so yeah the contents are still hidden.. any ideas pls?

    • @SelectorsHub
      @SelectorsHub  3 ปีที่แล้ว

      I will have to look into the dropdown. Please connect on SelectorsHub slack group.

    • @theglorioussapphiremonkey4750
      @theglorioussapphiremonkey4750 3 ปีที่แล้ว

      @@SelectorsHub where is the group located? Fb group?

    • @SelectorsHub
      @SelectorsHub  3 ปีที่แล้ว

      @@theglorioussapphiremonkey4750 bit.ly/SH_Slack

  • @harshithasyamala558
    @harshithasyamala558 2 ปีที่แล้ว

    Not working for my application

  • @jackshanvenujan3115
    @jackshanvenujan3115 3 ปีที่แล้ว

    But this is not working for all drop list

    • @SelectorsHub
      @SelectorsHub  3 ปีที่แล้ว +1

      Yes for that SelectorsHub has debugger feature. Please find the tutorial for it here
      th-cam.com/video/ypWrpy920ug/w-d-xo.html

  • @SimamkeleMangcu
    @SimamkeleMangcu 2 หลายเดือนก่อน

    it's not helpful because everytime i right click, the options of the drop downs they disappear

    • @SelectorsHub
      @SelectorsHub  2 หลายเดือนก่อน

      Pls use SelectorsHub Debugger feature. You can follow this tutorial- th-cam.com/video/nB8QA68PwvQ/w-d-xo.htmlsi=t7dLPwP8IiF0Z7PP

  • @YashchiK
    @YashchiK ปีที่แล้ว

    nothing new functionality/ If your element drop down list or info gets from your cookies - this method is not worked

  • @kiranbaladora4308
    @kiranbaladora4308 2 ปีที่แล้ว

    copy doesnot copy anything for me

    • @SelectorsHub
      @SelectorsHub  2 ปีที่แล้ว

      For which website? Could you please connect slack channel.

  • @filipandrevski2298
    @filipandrevski2298 11 หลายเดือนก่อน

    Hi.
    So i have the xpath:
    //a[normalize-space()='Ambassador Program']
    And how to write the method so Selenium can open that link:
    driver.findElement(By.xpath("//a[normalize-space()='Ambassador Program']")).click();
    ?
    Thank you for the answer.

    • @filipandrevski2298
      @filipandrevski2298 11 หลายเดือนก่อน

      It's OK, I figured it out. I solved it :) Thanks anyway