searl
(Scott Earl)
January 16, 2018, 1:42pm
1
Hi Guys
I’m trying to build a process whereby the first step is to initially click into a hyperlink from a html table row, and then it goes into another page, does some actions and returns to the original page with the table.
I’ve got the page with the actions to work without issue, but I need to somehow get it to identify the same button in the next row when it returns to the table page.
I can see it is identifying the selector as:
"<html title='Debtstream - new files awaiting confirmation' /><webctrl parentname='f_confirm' tableRow='1' tag='A' />"
whereby each selector changes by 1 based on the table row. Is there any way I can scrape this value out as a variable, or something else, so that my process can identify the same button in the next row and click it? Image of the HTML table page below.
Thanks
KatKon
January 16, 2018, 3:31pm
2
As I understood, You want to get value from tableRow=‘1’. I would transform this selector to string and then use Regex:
yourSelectorInString = "<html title='Debtstream - new files awaiting confirmation' /><webctrl parentname='f_confirm' tableRow='1' tag='A' />"
yourValueInString = Regex.Match(yourSelectorInString.ToString,“\d+”).Value.ToString
It will returns “1” for this case. You can convert it to Integer and increase it +1.
searl
(Scott Earl)
January 16, 2018, 3:31pm
3
Would I be right in thinking the Find Children activity will be needed and then an assign to assign it to a variable?
vvaidya
(Vinay Vaidya)
January 16, 2018, 6:59pm
4
Few ways:
What if you datascrape that specific column? Are you able to get the Urls? If so, you can use foreach loop and use Navigate to.
Use Find Children and loop all the children, use one of below queries in for each to directly get the links ( did not test) or do GetAttribute inside foreach for “Tag” and perform Click only for “A”
children.Where(Function(s) s.Get("href") isnot string.Empty)
children.Where(Function(s) s.Selector.ToString.Contains("tag='A'"))
to create a dynamic selector inside the loop
"<html title='Debtstream - new files awaiting confirmation' /><webctrl parentname='f_confirm' tableRow='"+rowNum.ToString()+"' tag='A' />"
1 Like
searl
(Scott Earl)
January 17, 2018, 3:15pm
5
Hi Guys
Thanks for the replies, I think I need to clarify on what I need though.
I need the robot to be able to distinguish between each of the rows in the table above and click on the 3 dots hyper-linked in each row.
action 1 = click the 3 dots in row 1
action 2 = click the 3 dots in row 2
action 3 = click the 3 dots in row 3
and so on.
The amount of table rows changes daily, so it also will need some logic in there to know when it hits the end of the table.
Forgive me, my programming skills are quite basic.
Thanks again.
ddrdushy1
(Dushyanth)
January 18, 2018, 1:24am
6
use find children activity and select the entire table as a target.
change the scope property of find children activity to FIND_DESCENDANTS .
change the Filter property to <webctrl tag='A' />
.
use for each activity to loop through the child elements.
change the typeArgument of for each activity to UiPath.Core.UiElement .
to verify use highlight activity inside the for each loop and change the Selector->target
as Item.Selector.toString .
write the logic based on the child element highlighted.
hope this will helps you…
5 Likes
searl
(Scott Earl)
January 18, 2018, 3:06pm
7
Thanks for the replies, helpful as always.
I’ve tried to run this with the filter set to tag A but there are other anchor tags on the page and it is picking these up first.
Is there a method when I can get it just to look at the tableRow element as this is the only distinguishable thing on specific to the row.
searl
(Scott Earl)
January 18, 2018, 3:26pm
8
Credit Control.xaml
Attached for reference, current state.
KatKon
January 20, 2018, 10:57pm
9
I would try like that. But I’ve done this “in the air”, I mean I couldn’t really see the app, so it might not be completely working.
GoThroughRows.xaml (9.0 KB)
1 Like
ddrdushy1
(Dushyanth)
January 22, 2018, 12:24am
10
How many A tag in a single row?
searl
(Scott Earl)
February 7, 2018, 12:39pm
11
Hi Guys
Apologies for the delay.
I’m looking at tackling this a different way now, I used a recording sequence to see if it can click the selector when I pass the variable defined at the start of the process for the starting row into the selector, and then increase that variable by 1 at the end to loop back through and do all rows through the table.
However it fails on the Action Click ‘TD’ as it is timiig out. I don’t know if this is because it can’t find the selector as I am doing it wrong?
Attached is project as it is now.
Thanks Guys, help is appreciated.
Credit Control.xaml (12.6 KB)
searl
(Scott Earl)
February 7, 2018, 12:42pm
12
Just the one anchor tag per row.
arivu96
(Arivazhagan A)
February 7, 2018, 3:11pm
13
HI @searl ,
Please refer my previous post
Hi @UipathNewbie,
Use Find Children Activity to the all the element.
Use For Loop to loop through the all the elements.
inside the loop using click activity click the elements.
it will navigate to detail information and using screen scarping/Extract Structured data extract all the information’s and click button.
Loop will continue.
For Example Find Children
Filter-> "<webctrl tag='DIV' class='cldt-summary-full-item' parentclass='cl-list-element cl-list-element-gap' parentid='classifiedsCont…
Hi @UipathNewbie,
Please refer the below xaml file, i just opened the website and clicked each of product and go inside and press back button to go to next product.
ExtractData.xaml (13.6 KB)
Regards,
Arivu
Regards,
Arivu
searl
(Scott Earl)
February 19, 2018, 3:22pm
14
Thanks for all the help guys, got really confused with using selectors (find it hard to get my head around them), ended up doing it as follows:
Data Scrape Web table column URLs.(amount of rows change every day)
Write Range to Excel Sheet.
Use a flow decision to read through the spreadsheet and load each link in the URL bar/hit go.
Perform the sequence on each link and select return link to go back and repeat until the end of the spreadsheet, when a complete dialogue is shown.
searl
(Scott Earl)
February 19, 2018, 3:24pm
15
Wouldn’t of stumbled my way to this without the help given though, so thanks again!
1 Like