How to handle

Поділитися
Вставка
  • Опубліковано 15 вер 2024
  • #ShadowDom #NaveenAutomationLabs
    In this video, I have explained How to handle #ShadowDom elements in Selenium
    What is ShadowDom & ShadowRoot in DOM
    How to query ShadowDom elements using querySelector
    How to create shadow Dom element using JavaScript and execute it using JavaScript Executor in Selenium
    GIT REPO FOR THIS EXAMPLE:
    github.com/nav...
    ~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    www.youtube.co...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
    t.me/joinchat/...
    Paid courses (Recorded) videos:
    naveenautomati...
    For Java & Selenium - naveenautomatio...
    For API (Manual + Automation) - naveenautomatio...

КОМЕНТАРІ • 112

  • @shankumondal2881
    @shankumondal2881 3 роки тому +6

    From no other available internet resources we can get a so clear explanation ever.
    Thank you Naveen.
    👍

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

    After 12 hrs of debugging SF, I learnt what shadow doms are and got my CI tests working.

  • @najiriyas7394
    @najiriyas7394 7 місяців тому +2

    Very good explanation about shadow dom.. Thank you so much 😊

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

    That's the right way how to explain concepts...Thanks for this video

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

    Thanks Naveen. This is new concept for me. Learned new things today

  • @SarangHoley
    @SarangHoley 3 роки тому +3

    Awaited topic got covered, Thanks Naveen For this 😊👍

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

    Most awaited topic... Thanks Naveen 👌

  • @KuldeepKumar-wu7xx
    @KuldeepKumar-wu7xx 3 роки тому +2

    Thanks for sharing Naveen, its very helpful..!!

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

    Request you to please explain how to locating elements in shadow DOM using selenium *python*. Thank you Naveen..!!

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

    Thank You Sir ji...very informative...I was lost and your videos helped me understand.

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

    Thank you Naveen!! This helps me a lot 🙏🏻could run my application successfully 😇

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

    Learned a new and much awaited topic !! Thanks Naveen :)

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

    Thanks, Naveen. This is a new concept for me. Learned new things.

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

    Amazing explanation of shadow dom. Thanks Naveen

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

    That's great!! Thank you, Naveen for the video. Please demonstrate how to scroll inside shadowroot element

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

    I wanted to automate chrome:downloads section once, but I never knew why I was not able to interact with the element. With this video now I know the reason.
    Thank you for the video Naveen ❤️

  • @DinuVijayan
    @DinuVijayan 3 роки тому +5

    Thanks Naveen for this wonderful video. But a question, while using document.querySelector should we traverse through each node or can we use something relative like relative XPath?

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

    This is so amazing... Thank you so much Sir

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

    Very helpful for accept all cookies banner.. Thanks Naveen...

  • @asifsaleem7086
    @asifsaleem7086 3 роки тому +5

    Javascript error : cannot read property 'shadowroot' of null ............... i facing this all the time plzzz help

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

      I am getting the same error. Please help me with the solution if you found it.

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

    Thanks Naveen for this video. It helped me a lot

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

    Thanks a lot Naveen.....👍👍👍

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

    Thanks for this topic... Really helpful

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

    Thanks Naveen. It's a very informative video. I followed this and it worked perfectly for me in chrome but the same code doesn't seem to work for Safari. It would be really helpful if you can make a similar video for Safari as well.

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

    Thank you very much for this video. Helped me a lot

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

    Beautifully explained in details..

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

    Excellent 👌

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

    Great!!!! thank you so much!

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

    Thank you so much made that video brother

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

    Thanks Naveen.... This is very helpful....
    Does this work in headless mode..?
    It's working in UI mode but I am facing issue while executing this in headless mode in chrome...

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

    Thanks for your quick response 👍 👏 👌 😀

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

    Shadow-root ( user-agent) is open shadow-root or closed. Can we automate shadow-root (user-agent) elements??

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

    Good one👍

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

    Excellent Naveen.... I would like to know what is the purpose of shadow elements...

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

    Is youtube ad video an example of shadow DOM? If yes, what element is it referencing?

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

    Getting error - org.openqa.selenium.JavascriptException: javascript error: Cannot read property 'click' of null

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

    Dude I love you. You saved me

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

    Thanks for covering this topic

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

    Thank you for the video! How to use waits for dynamically loading elements present under Shadow DOM?

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

    It's such a helpful video thanks Naveen a lot., Team, Please tell me how use get text from a shadow.please it's urgent!!!

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

    Hi naveen,this was good session.Using this iam trying to operate on drop down but its not woking. It will be good if the session is made on the drop down with out using the select tag inside a shadow root. Thank you

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

    Great

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

    Thank you so much naveen

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

    Great topic coverage Naveen !!! Thanks a lot... I followed the steps and created JS query in my project, it is working in console, but in test script it is failing with error "Cannot read properties of null (reading 'shadowRoot')". I'm working on selenium 3 with Java. Can you please help??

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

      Hi Bhushan, I am also getting the same error may i know whether the issue is fixed and if yes could pls share how it got fixed?

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

    Hi Naveen, can u pls share a video on how to perform scroll if we have shadow dom

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

    Sir please create a video where script is selecting shadow root drop-down options.

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

    great sir!! cud u pl let me kno how can we use webdriverwait with jse as we are not using driver directly

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

    Hi Naveen,
    Thank you for covering this topic. Accessing elements inside a shadow DOM works fine for Chrome browser, but it fails for firefox with error “circular object reference”. Did you come across this error by any chance? If yes, how did you resolve it?

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

    Thank you so much

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

    copy js path is life saviour :)

  • @pavankumar-wn9to
    @pavankumar-wn9to 3 роки тому +1

    Hi Naveen,. I can see shadow root element is opened but still seeing can not read property 'shadowRoot' of null...any idea on this?

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

      Same error did you find a solution ?

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

    Hi Naveen, How are you?
    I have a question, lets say that inside the shadow-root there is a also.
    it is a text box where I have to paste a text message. I am facing problems to get there. do you have any idea on how to do it?
    Also I am trying to handle a dropdown, which I now how to do it with normal xpath elements using JAVA API, but how to do it using JS path?
    Please help me :)
    Have a good day Naveen, thank you so much for your videos, it has been helping me a lot

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

    Hi sir.. after using the same way am getting JavascriptException in the console...

  • @alifurRahman-xn9ns
    @alifurRahman-xn9ns 2 дні тому

    for me js xpath is disable what should do for copy for direct

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

    Thank you that helps

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

    does protractor and cypress with TypeScript support shadow DOM?

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

    Thank's naveen for this video and your're QA community support, and one more I unable to join you're telegram group . How I would join you're Telegram group

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

    Hi Naveen, thank you for the great video it helps a loooot. But I still have problem. I have many shadow root like this DOM. I click one element then navigate to other page. then I was going to locate element. but some reason I cannot locate any element on that new page. I tried reasign jse again or created new one still cannot locate any element from that page. What should I do?
    Can you advise?

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

    can you please explain, how it can be done for Webdriver IO?

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

    Thanks Naveen for explaining it so well. But in my DOM case, after shadow-root I have all the html tags with section only as below
    Shadow-root (open)

    Goes on...
    I need to select the section part 2..how can I do that?? Could you please help me with this??

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

      It worked with section.2... Please ignore the question. Thank You!

  • @user-bm8ou1xr6o
    @user-bm8ou1xr6o 10 місяців тому

    Hey Naveen, how to apply webdriver wait or any other wait for that instance for shadowDOM elements? PLEASE HELP. My webpage is not loaded and the script is already performing click function

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

    Hello,
    I have a drop-down value in shadow root that I need to select.
    Tried with JS path like you suggested, but the value keeps changing, as it is dynamic.
    Any way that I can search the value through text?
    Please let me know.
    Thank you in advance.
    Below is my output from console :
    document.querySelector(‘eds-select’).shadowRoot.querySelector(‘div > ng-select > ng-dropdown-panel > div > div > div > span’)
    Span contains the text that I am trying to select

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

    Hi Naveen, Could you please teach how to insert shadow DOM elements in list. This is required for my work. Please help. I am using JSPath to identify the shadow DOM elements.

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

    Hi Naveen .In application we used Angular and web component with Shadow DOM. Can you please suggest which tool is good for this UI automation

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

    hi Sir, is it possible to create one video like this using python and selenium webdriver and another one with Python Robot Keyword framework as well

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

    Hi Naveen,
    How Can we use shadow root in Implicitly/Explicitly wait.

  • @YOGESHKUMAR-ce9cd
    @YOGESHKUMAR-ce9cd 10 місяців тому

    Even though I follow the same steps in my project the "Check button" is not clicking. Kindly help me on this. what will be the issue?

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

    Hi Naveen Please share some websites where shadow DOM is Implemented

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

    If input is uploading a file,how can we handle inside nested shadow in python selenium

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

    How can get list of elements by document.queryselectorAll() with selenium ?

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

    Hi Naveen, I followed the steps mentioned to write the path for shado dom element. but getting "org.openqa.selenium.JavascriptException: javascript error: Cannot read properties of null (reading 'shadowRoot')" error

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

    HI Naveen, Telegram link provided in description is not working. Could u tell the group name.

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

    How to make list of shadow root elements.
    Is it possible?

  • @NehaKumari-hn4uk
    @NehaKumari-hn4uk Рік тому

    If anyone reading this comment please reply I am automating rahulshetty ecommerce website when I don't use page object model its work perfectly but when I try to automate using page object design pattern the same program doesn't work

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

    how can we use waits without driver as we using JSE,pl help naveen

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

    Naveen Sir.
    I'm trying tp automate Service Now developer Instance.
    However when I login and come to Start Building page, the Shadow root does not handle.
    I tried with same method - putting in console and checking out
    but getting error: javascript error: Cannot read properties of null (reading 'shadowRoot')
    Kindly suggest....

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

    How to do shadow dom with python selenium?

  • @kirankumar-ek5mr
    @kirankumar-ek5mr 3 роки тому

    Hi Naveen how to open real web cam.. fake camera not working for me.. it just masks with green color in camera.. will you please help me out.. tried all kind of stuffs..

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

    Hi Naveen, can we automate shadow-root(user-agent)?

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

    Hi Naveen
    i tried this shadow dom in my application its working for textbox when tried it on select item its working could you please give me some idea on this

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

    Can you help me please... I need to open one downloaded file by clicking on it but that is not working...

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

    can you please help me in this, iam getting this elow error-------- raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot read properties of null (reading 'shadowRoot')

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

    There is no better way to get the elements? I think there are too many chain calls

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

    Hello @Naveen
    I'm facing an issue about the stale element under shadow root, do you have any idea/suggestion? thank you in advance!

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

    Hi there, I have a test that, I have to select an icon (web element) which will be displayed only when I mouse hover to it , then I have to inspect it.can someone help me out how to do it...before mouse hover to it, it shows another data, by mouse hovering to it I get a icon, which I should click and carry out other process

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

    Need same flow but with Shadow Dome close

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

    Hello sir, How to do gettext of shadow dom element?

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

    How to come out from shadow root after driver switch inside?

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

    HI Naveen can we do similar in webdriverio

  • @MatheusPereira-nn9dj
    @MatheusPereira-nn9dj Рік тому

    este conteudo deveria ter legendas urgentemente porque nao se tem muito sobre no youtube

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

    Hello Naveen...I am able to enter the value but i am not able to see them in input field on UI but when i go and see in the inspector, under value tag the value is getting stored but not displaying on UI
    what could be the issue, appreciate anyone's help🙏🙏🙏

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

      Since you already got the WebElement by casting the shadow DOM object you can use .sendKeys() method with it.

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

    is there any way for shadow root closed?

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

    I tried the same way but neither it is throwing error nor entering any text in the textbox

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

      Hi Rahul, I am getting the same username cannot be empty. You resolved it?

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

    GIT REPO FOR THIS EXAMPLE:
    github.com/naveenanimation20/ShadowDOMHandle

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

      Hi Naveen
      Script was working but ...text which passed as attributes were not displayed as text and looks like predefined text...any idea on it...

  • @gordonmccarthy5152
    @gordonmccarthy5152 Рік тому +2

    when i use this code i got exception " org.openqa.selenium.JavascriptException: javascript error: Cannot read properties of null (reading 'shadowRoot') any solution for that