I already read the following article to learn the usage of “UiPath.Core.FindChildren” activity,
but I could not solve my problem yet, so I hope you to help me to solve my problem.
what I want to know is how to select td tag in every row of the following table,
and my last goal is to click a link in the second td tag in every row of the table.
<table>
<tr>
<th >aaa</th>
<th>bbb</th>
<th>ccc</th>
<th>ddd</th>
<th>eee</th>
<th>...</th>
....
</tr>
<tr>
<td class="NUMBER">1</td>
<td class="PROJECT_NAME"><A onclick=javascript:display(0,1,0) href="#">title1</A></td>
<td class="BID_METHOD"> </td>
<td class="DOCUMENT_LIST"><a onclick=javascript:display2(0,3,0) href="#"><img src="button.gif" /></a></td>
<td class="classname4"> </td>
<td class="classname5">...</td>
....
</tr>
<tr>
<td class="NUMBER">2</td>
<td class="PROJECT_NAME"><A onclick=javascript:display(0,1,0) href="#">title1</A></td>
<td class="BID_METHOD"> </td>
<td class="DOCUMENT_LIST"><a onclick=javascript:display2(0,3,0) href="#"><img src="button.gif" /></a></td>
<td class="classname4"> </td>
<td class="classname5">...</td>
....
</tr>
<tr>
<td class="NUMBER">3</td>
<td class="PROJECT_NAME"><A onclick=javascript:display(0,1,0) href="#">title1</A></td>
<td class="BID_METHOD"> </td>
<td class="DOCUMENT_LIST"> </td>
<td class="classname4"> </td>
<td class="classname5">...</td>
....
</tr>
<tr>
<td class="NUMBER">4</td>
<td class="PROJECT_NAME"><A onclick=javascript:display(0,1,0) href="#">title1</A></td>
<td class="BID_METHOD"> </td>
<td class="DOCUMENT_LIST"><a onclick=javascript:display2(0,3,0) href="#"><img src="button.gif" /></a></td>
<td class="classname4"> </td>
<td class="classname5">...</td>
....
</tr>
....
</table>
I use “UiPath.Core.FindChildren” activity to get rows of a table in a webpage as
a variable “ReturnedChildren” - Variable type: IEnumerable.
The properities is following…
“UiPath.Core.FindChildren”
Input
- Filter:
"<webctrl tag='TR' />"
Target
- selecter:
"<html htmlwindowname='AccepterGoodsMenu2' title='{WEBPAGE_TITLE}' />
<webctrl aaname='WEBTABLENAME*' tag='TABLE' />"
Output
- Children:
ReturnedChildren
And use “UiPath.Core.Activities.ForEach<UiPath.Core.UiElement>” like this.
Foreach row in ReturnedChildren
Highlight Element: row
It runs fine that “Highlight” activity highlight every row(<tr></tr>) in the table.
And what I really want to know is how to select <td>'s in every row of the table.
My final goal is to click a link in the second “td” in every row of the table.
Foreach row in ReturnedChildren
Foreach td in row
System.Activities.Statements.WriteLine
Text: row.???????????????? <- "How can I write here?"
Hope this community help me, and whom is having same problem as me.
Thank you in advance.