I can see why elements are not picked up by the tool. Normal xpath's don't apply here.
Try a "Run JavaScript" activity and script you actions using lines like:
document.querySelector('book-app').shadowRoot.querySelector('#input').value=''...'
(I only tested it in chrome, not in the Studio)
I think it's either that, image recognition, or sending keystrokes.
------------------------------
David Fredriksson
------------------------------
Original Message:
Sent: Tue March 15, 2022 06:20 AM
From: nordine vandezande
Subject: Automate a website which uses Shadow DOM
Hi David
thanks for your interest.
The web app that I need to automate is not publicly accessible but I found a website with similar Shadow DOM object, cfr https://books-pwakit.appspot.com/explore
I am unable to wait for an element or to set a value to the Search field. I have tried selectors based on full Xpath, CSS, ...
defVar --name bElementExists --type BooleanwebStart --name TEST --type "Chrome"webNavigate --url "https://books-pwakit.appspot.com/explore"webWaitElement --selector "XPath" --xpath "/html/body/book-app//app-header/app-toolbar[2]" bElementExists=valuelogMessage --message "Element exists: ${bElementExists}" --type "Info"webSet --value hello --selector "CssSelector" --css "#input" --simulatehumanwebClose --name TEST --leavebrowseropen
------------------------------
nordine vandezande
Original Message:
Sent: Tue March 15, 2022 04:25 AM
From: David Fredriksson
Subject: Automate a website which uses Shadow DOM
Hi Nordine!
Can you add an example of an url and what elements you are trying to access? I'm not sure I've heard about this technique before but I've worked a lot with RPA and have come across some other dynamic frameworks.
------------------------------
David Fredriksson
Original Message:
Sent: Mon March 14, 2022 12:43 PM
From: nordine vandezande
Subject: Automate a website which uses Shadow DOM
Hi
does anyone has any experience in using IBM RPA against a website which heavily uses Shadow DOM (for instance sites which are build with Nuxeo CMS)?
I am not a web developer and to be honest, I heard about Shadow DOM for the first time today.
It seems to be a technique to encapsulate some functionalities used in web application but as a result these components do not have a "normal" selector which can be used while automating.
For the moment I am stuck so I am hoping that there is someone who has some tips&tricks and can point me to the right direction.
Thanks in advance,
------------------------------
nordine vandezande
------------------------------