Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

How to make a stable selector for UI element when accessing sites serving javascript? Is XPath an option?

Really struggling trying to make a stable selector  for an UI element from a website that serves javascript.


If I inspect the element I get the below. Even if I try to use "Starts with" to take into account the ever changing ID's I have no joy.

body > > > form > div > > nav > div > div > nav > div.navigation-bar-row-container--ok56Syj6ZI13oF-j9zyMK.home-action-container--3YQ3r2P8OlSMcLYYo6GIBj > div > > div > div > div > > div > div > div > div > div.horizontal-container--2arCxSk94tV8g1nxne5CfI.row-overflow-hidden--18lLh3eRez7ryXzkjRI_0E > div > div.horizontal-scroll-container--Siuhx108-1XhIiyrv34fL > div > div:nth-child(3) > div > a > div.caption--OYuFEPeGjRdYeRklti5fB > span > span

So I'm starting to wonder if it's because there's no proper HTML generated but instead it comes via javascript.


How can I combat this? Can I use XPath when making my selector? Or can I run a Javascript-function to click an UI element?


Really hoping someone can guide me the right way.... Really at a loss here.


Thanks in advance.



Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Solution Authors
Top Kudoed Authors
Users online (2,588)