Skip to main content

I have fetched the table using get table in recorder package. For the corresponding type WI5 I want to click on the search icon in the action and perform some steps ...also the table is across multiple page so I want to handle that too dynamically.How to do this

 

@soumyadeep_c 

Start with a Loop... While object exists. Which object? The Next button (>) at the end of the page list. In theory, the Next button will only be visible when there is a next page available. 

Then you can process each "page" of data by capturing the table and performing an action on that data. 

After processing that page, click the Next button. Remember to fully process the last page -- the page without the Next button -- so this has to be done outside the Loop. 


Ok and how to click the corresponding search action for a specific work item WI5

@soumyadeep_c 

Start with a Loop... While object exists. Which object? The Next button (>) at the end of the page list. In theory, the Next button will only be visible when there is a next page available. 

Then you can process each "page" of data by capturing the table and performing an action on that data. 

After processing that page, click the Next button. Remember to fully process the last page -- the page without the Next button -- so this has to be done outside the Loop. 

 


Hi ​@soumyadeep_c ,

 

Instead of capturing the Table, the best approach here will be capturing the Serach icon within the Table rows within a loop. 

 

By using a counter, you can modify the DOMXPath of the Search icon as shown below. so that, it will dynamically select each of those within the table.

 

/html/body/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[$nCounter.Number:toString$]/td[1]/a[1]/button[1]

 

Now coming to the loop, as ​@Aaron.Gleason mentioned, you can use the Loop→ While with the Object Exists condition for this. From the screenshot provided, I can see that there is aicon near to the pagination part which will disappear as soon as you hit the last page. So, by capturing that icon and passing it to Loop-While will perfectly work for you. That is, it will loop till that icon exists in the page (till the last page).

 

 

Let me know if this is not clear enough. Hope this will help.


Hi ​@soumyadeep_c ,

 

Instead of capturing the Table, the best approach here will be capturing the Serach icon within the Table rows within a loop. 

 

By using a counter, you can modify the DOMXPath of the Search icon as shown below. so that, it will dynamically select each of those within the table.

 

/html/body/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[$nCounter.Number:toString$]/td[1]/a[1]/button[1]

 

Now coming to the loop, as ​@Aaron.Gleason mentioned, you can use the Loop→ While with the Object Exists condition for this. From the screenshot provided, I can see that there is aicon near to the pagination part which will disappear as soon as you hit the last page. So, by capturing that icon and passing it to Loop-While will perfectly work for you. That is, it will loop till that icon exists in the page (till the last page).

 

 

Let me know if this is not clear enough. Hope this will help.

I have though off using the ncounter but how to use that exactly ..cant understand the logic

 


Hi ​@soumyadeep_c ,

 

Instead of capturing the Table, the best approach here will be capturing the Serach icon within the Table rows within a loop. 

 

By using a counter, you can modify the DOMXPath of the Search icon as shown below. so that, it will dynamically select each of those within the table.

 

/html/body/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[$nCounter.Number:toString$]/td[1]/a[1]/button[1]

 

Now coming to the loop, as ​@Aaron.Gleason mentioned, you can use the Loop→ While with the Object Exists condition for this. From the screenshot provided, I can see that there is aicon near to the pagination part which will disappear as soon as you hit the last page. So, by capturing that icon and passing it to Loop-While will perfectly work for you. That is, it will loop till that icon exists in the page (till the last page).

 

 

Let me know if this is not clear enough. Hope this will help.

I have though off using the ncounter but how to use that exactly ..cant understand the logic

 

 

 

First identify the dynamic part in the DOMXPath of the Search icon. This you can do by capturing 2 -3 search icons and compare their DOMXPaths. After that, replace the dynamic part with the Counter just like I had shown in my previous response. Towards end of the loop, just increment the counter so that, bot can select the next search icon during the next iteration.

 

 

 

 

Note: As I checked, the Table Row (tr) part in the DOMXPath is the one changing for each of the icons. So, you need to replace its value with the Counter.


Hi ​@soumyadeep_c ,

 

Instead of capturing the Table, the best approach here will be capturing the Serach icon within the Table rows within a loop. 

 

By using a counter, you can modify the DOMXPath of the Search icon as shown below. so that, it will dynamically select each of those within the table.

 

/html/body/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[$nCounter.Number:toString$]/td[1]/a[1]/button[1]

 

Now coming to the loop, as ​@Aaron.Gleason mentioned, you can use the Loop→ While with the Object Exists condition for this. From the screenshot provided, I can see that there is aicon near to the pagination part which will disappear as soon as you hit the last page. So, by capturing that icon and passing it to Loop-While will perfectly work for you. That is, it will loop till that icon exists in the page (till the last page).

 

 

Let me know if this is not clear enough. Hope this will help.

I have though off using the ncounter but how to use that exactly ..cant understand the logic

 

 

 

First identify the dynamic part in the DOMXPath of the Search icon. This you can do by capturing 2 -3 search icons and compare their DOMXPaths. After that, replace the dynamic part with the Counter just like I had shown in my previous response. Towards end of the loop, just increment the counter so that, bot can select the next search icon during the next iteration.

 

 

 

 

Note: As I checked, the Table Row (tr) part in the DOMXPath is the one changing for each of the icons. So, you need to replace its value with the Counter.

I can understand this but how to make sure after each loop the counter again becomes 0 to recalculate


Hi ​@soumyadeep_c ,

 

Instead of capturing the Table, the best approach here will be capturing the Serach icon within the Table rows within a loop. 

 

By using a counter, you can modify the DOMXPath of the Search icon as shown below. so that, it will dynamically select each of those within the table.

 

/html/body/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[$nCounter.Number:toString$]/td[1]/a[1]/button[1]

 

Now coming to the loop, as ​@Aaron.Gleason mentioned, you can use the Loop→ While with the Object Exists condition for this. From the screenshot provided, I can see that there is aicon near to the pagination part which will disappear as soon as you hit the last page. So, by capturing that icon and passing it to Loop-While will perfectly work for you. That is, it will loop till that icon exists in the page (till the last page).

 

 

Let me know if this is not clear enough. Hope this will help.

I have though off using the ncounter but how to use that exactly ..cant understand the logic

 

 

 

First identify the dynamic part in the DOMXPath of the Search icon. This you can do by capturing 2 -3 search icons and compare their DOMXPaths. After that, replace the dynamic part with the Counter just like I had shown in my previous response. Towards end of the loop, just increment the counter so that, bot can select the next search icon during the next iteration.

 

 

 

 

Note: As I checked, the Table Row (tr) part in the DOMXPath is the one changing for each of the icons. So, you need to replace its value with the Counter.

I can understand this but how to make sure after each loop the counter again becomes 0 to recalculate

 

As per the DOMXPath, the row count is starting from 2 to 11 on each page. So, you can put a condition to check the counter is greater than 11 or not. Accordingly, put a logic to reinitialize the same back to 2.