How to I get around a ServiceNow overlay?

In the past I used Ui.Vision RPA to automate filling tickets in ServiceNow. It appears that the newest version of ServiceNow has some sort of overlay that blocks interaction. I can reference the fields and dropdowns using xpath but nothing happens. I have also tried using the built-in recorder in chrome devtools to verify that I have the correct references. I do, but even playing back those recordings timeout. I may be wrong but it seems like ServiceNow has some sort of overlay which prevents automation from interacting with the form. Has anyone else experienced this?

Hi, can you post a screenshot of the situation?

Did you try to use XClick + Image or XClickText?

the issue here is that ServiceNow is now using shaddowRoot. And those are undetectable with xpath.
We are using here ServiceNow as well, and I ran into the same issue.

The only way around this is to use JavaScript with the “executeScript” kantu command.
With javascript you can then target those hidden tags below the Shadow-root.

Below is an example I posted a while ago how to do it

That should help.

NOTE: Whenever possible avoid xClick or any of those command that are using the visual UA for detection on the browser surface. They are very unreliable as they do not target the elements properly all the time. Especially if you browser zoom is not set to 100%. They don’t find them at all if you can’t see the elements in the browser window because you have to scroll down. They are just trouble.

1 Like

For me the biggest drawback of XClick is that the browser has to be in foreground and I cant do anything else on my machine while the macro runs. So I agree that using XPath is the preferred option. However, in defense of XClick I have to say that:

  • Browser zoom = 100% is a requirement as stated in the docs. For XClickText it is not needed.
  • Indeed, XClick only works on the currently visible part of the website. That is also in the docs. What I sometimes do is to first do a normal Click somewhere nearby, to make the page scroll to the right location, then do the XClick on the button.

ServiceNow has an API. If you have a username and password you could use the API to create and edit tickets. I know this is a ui.vision forum but if the goal is automation, RPA is not the only tool you have.