Showing results for 
Search instead for 
Did you mean: 

(Hypothetical)blue prism application modeler - XPATH having a div tag whose value changes from 1 to 50. How can I spy this elements??

Level 3

(Hypothetical Question) Blue prism application modeler - XPATH having a div tag whose value changes from 1 to 50. How can I spy this element? .

A: Can we use the wildcard action in application modeler for the Xpath to identify this element.


HI Abhi,

Can you please explain in detail for the better understanding in order to provide correct solution.

Note: Please explain along with the screen shot.

Best Regards, Devendran Venkatesh RPA - Technical Architect | Riyadh 11413, Kingdom of Saudi Arabia

Level 7

Hi Abhi,

If it's a single element that you're looking for then you can make use of wildcard in the place where you have that change of number. If it's a table structure and if you want all the values to be read then using a counter you can read individual row and append into a collection at the process level.

Babjee Vangipurapu
Senior RPA Developer

Hi Abhi,

The statement is correct, but it is advisable and important to try to identify the element using other attributes such as class name, ID, or other unique identifiers that do not change dynamically, whenever possible.

Leonardo Soares RPA Developer América/Brazil

HI Abhi Sachdev,

If you have 50 fields and only difference is div tag value like you mentioned 1 to 50. BOT will try to identify 50 fieds and throw exception indicate more than one element identified(It all depends on the website you are trying generally speaking this is how it works, but it depends on how UI built)

If you use the combination of Wildcard in xpath and Match index value as 1 it will identify the first value no matter what.

As other members mentioned its  recommended to identify using other attributes.

If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

Level 8

@abhi sachdev

You can always use XPath Expressions (XPath 1.0) in your Web Path/XPath to locate elements that change dynamically. By using a relative element, you can find elements that have no unique attributes from other elements and that may move around the page.

Take for instance your Thread on this community's Thread list. It's very easy to find the subject of the thread but it is not so easy to find the element that holds the number of replies to the thread. There is no unique attributes of the "number of replies" element. But you can zero into it by using the following XPath expression:


What the XPath expression does is finds the first anchor element with a title attribute that starts with "(Hypothetical)" and then finds the first span element where the aria-label attribute starts with "Replies" that follows that anchor element.

Blue Prism works beautifully with XPath Expressions and all our developers now use XPath Expressions on every Chrome or Edge project.

The added benefit to using XPath Expressions is that you can easily write them and test them using the DevTools in Chrome and Edge. You can see for yourself by:

  1. opening up this Community Thread list Blue Prism Product
  2. pressing Ctrl-Shift-I in Chrome or Edge
  3. going to the "Elements" tab in DevTools
  4. pressing Ctrl-F
  5. paste the above XPath Expression into the find box
If you keep setting the Threads list to 50 per page you will see that over the next few days that one expression will keep finding that number of replies element until it eventually drops off the top 50.
Micheal Charron
Toronto, Ontario