Variable path during spying
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-10-16 01:44 PM
Hi,
I have to spy an element of webpage, but the path is variable.
Say path is TABLE(1)/TBODY)/TR( x )/TD(1)/TABLE(1)/TBODY)/TR(1)/TD(1)/
The value of x varies from 0-9. How can i implement it?
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-10-16 02:09 PM
Hi,
Try keeping the value of variable attribute as ""Dynamic"" and pass the required value.
Regards,
Ravinder Saini
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-10-16 03:34 PM
Use a calculation to set a data item called Path, eg ""TABLE(1)/TBODY)/TR("" & [Row Number] & "")/TD(1)/TABLE(1)/TBODY)/TR(1)/TD(1)/""Then as Ravi says, inject the path value from the diagram into the dynamic attribute. See page 14 in https://portal.blueprism.com/system/files/Browser%20Automation%20Guide.pdf
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-10-16 03:45 PM
Thanks a lot. I missed on this logic.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-11-16 08:20 PM
I wanted to offer an alternative solution that we use here in house:
We replace the variable with a throw away character for instance:
[txt_Path] = TABLE(1)/TBODY)/TR(@)/TD(1)/TABLE(1)/TBODY)/TR(1)/TD(1)
And just call a Replace on that character. This lets you contain the dynamic path in one variable no matter how many dynamic parts there are to it, instead of having to split it up a bunch.
For your Dynamic Path element: Equal =
Replace([txt_Path],""@"",[num_Index])
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-03-17 07:21 PM
Thankx for your input John. Unfortunately, it doesn't work on my side. I got this message ""Internal : Error - Highlighting results - Failed to parse the path"" when I write this in the Application Modeller /Attributes: /HTML/BODY(1)/IFRAME(2)/HTML/BODY(1)/FORM(1)/DIV(8)/DIV(1)/DIV(1)/TABLE(1)/TBODY(1)/TR("" & [Counter] & "")/TD(2)/A(1).
Did you write the path the same way?
