cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic html path

VratHimbo
Level 6
Hi all,
i've a problem with a dynamic html path.
My goal is to click dynamically a text in a web page, starting from an excel file.
I can take the Path of the entire table in which I have to select and i have the "Value" of my selection.
I tried to pass this Path with wildcard and Value in selector but it doesn't find any elements.
The difference between my Path (Table path) and selection inside this table is TR(*)\TD(*)

How can i manage that dynamically, since I will not have to make the same choices and that the order of them could change in the future?

Thanks in advance

------------------------------
Vrat Himbo
------------------------------
6 REPLIES 6

Denis__Dennehy
Level 15

Wild cards do not work with the HTML path so if that is the field you want to use you need to calculate what the field values are within the path somehow.

The xpath field that is available in some of the new interfaces (Chrome / Edge) does accept wildcards.



------------------------------
Denis Dennehy
Head of Customer Success, EMEA
Blue Prism Ltd
Europe/London
------------------------------

Hi Vrat

If you know the full path of the table you want to identify items in then you need to dynamically set the path and the row so it iterates through each row in the table. In application modeller make a note of the full path then set this value to Dynamic, in you object create a read stage to read the value of the first item in the table and add in the path as the parameter. In this you should have a row number being generated by a data item and it would look something like this "/HTML/BODY(1)/FORM(1)/DIV(8)/DIV(1)/DIV(2)/DIV(2)/DIV(2)/DIV(2)/DIV(1)/DIV(1)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/DIV(1)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/TABLE(1)/TBODY(1)/TR("&[Table row number]&")/TD(3)/DIV(1)"

Compare the read item to what you are looking for and if it matches you use a navigate setting the parameter to be the same as above and if not then a calculation stage to increase the row number and retry the read stage. You would just loop this until you find the correct item. Hope this helps



------------------------------
Michael ONeil
Technical Lead developer
Everis Consultancy
Europe/London
------------------------------

Hi and thanks for the reply.
I've seen that approach on BP university, but my question is: i've multiple table and about 3/4 hundred choice.
If the selection is the last one, I'll have to cycle many tables for many many times. It will be very slowly.
or I'm doing something wrong?
Thx

------------------------------
Vrat Himbo
------------------------------

Hi Vrat

Unfortunately yes you would need to cycle through each row to find the one you are looking for. You could try spying it and using the get table function in the navigate stage but this doesnt always work, or possibly use get item and if you know the row you need you can enter the item number to get it but again you would need to test these out to see if they work for you. If you do use the html approach the upside is even looping through each row it should be fairly fast when running through the scheduler.

------------------------------
Michael ONeil
Technical Lead developer
Everis Consultancy
Europe/London
------------------------------

Thanks a lot sir...your info helped me a lot..

------------------------------
Mohamed Azharudeen
------------------------------

That's good to know Mohamed 🙂

------------------------------
Michael ONeil
Technical Lead developer
Everis Consultancy
Europe/London
------------------------------