cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamically spy repeated similar Web Elements

SiddharthAbiram
Level 3
Hi All,
Greetings. 

I am working on automating a process flow in a Web Application. Below is a screen shot of the web page that I am working with.
35104.png

Scenario:
  • The element "Approval Pending" is repeated twice here.
  • This element can be repeated multiple times within the page.
  • I want to make the automation bot in blue prism to pick up the latest element which comes at the last of this page. 

Issues Faced:
  • I could not use an Xpath in this case as the position may vary.
  • If I use the Element name (Web Text) it says the obvious error that there are multiple similar elements.
  • I also couldn't use "Match Index". 

I am unware whether this issue has already been solved. If yes, please post a link to the discussion. Else could anyone please provide their valuable inputs on how to approach this problem.

Thanks
Siddharth.
1 REPLY 1

Hi Siddharth,

You can actually use a dynamic XPath function to get this thing sorted I believe. I will show you an example. Below I am using an XPath expression like: (//td[text()='Software Engineer'])[last()]

35103.png

So here if you see the last() function is going to return the last element where the TD tag that is recurring can have the text as 'Software Engineer'. Similarly, check which tag it is that has that text by inspecting the web element and replace the td tag in the above XPath expression with the tag that you get. This should solve your problem.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

If the answer resolves your query, please mark it as the Best Answer so that others can easily track the right answer.

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Senior Consultant - Automation Developer
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional

----------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.