Loop Through and Click Through the Tickets in Browser

Hi everyone,

I am automating the ticket fill-up process on a browser.

On the browser, there is a table listing all the tickets in rows and related info in columns.

What I hope to automate is that if the related ticket info satisfies certain conditions, then click into the ticket and fill up the ticket based on SOP; if not, click into the next ticket in the table.

How can I use UiPath to automate the looping through (clicking through the tickets) part?

The table is as below.

Thanks in advance.

@Rebecca_Liao

Welcome to forums,

First use DataScrapping wizard, to scrape the contents, then you can check the conditions

Place a Click activity and scrape the selector of the WorkItem Link and find the dynamic selector

Hope this may helps you

Thanks

@Rebecca_Liao
lets assume that the table is offering applicable selectors. Once you have calculated the Work Item ID the link (a element) Selector can be dynamized with following approach using aaname or innertext attribute ithout any col or row selector tags:

1 Like

Hi,

I used Data Scraping to scrap and build the table, and used a for loop to read the work item number and ticket info (stored into variable).

Then, within the for loop after the data scraping, I used an if statement to check the conditions and tried to click into the tickets if the conditions are satisfied:

Is this the process you mentioned here?

However, I was not able to create the dynamic selector in the click activity:

How should I solve this problem?

@Rebecca_Liao

Check the title is same? If not you have to make it dynamic

Hope this may helps

Thanks

set default value for evaluation purpose for the variable WorkItemNumber. It can check if it can be applied for one case. later it will use the real value from the loop

Hi,

Thanks for the help.

I used the Data Scrapping tool to scrap the table and used a for loop to read the Work Item Number and necessary ticket info:

Then, within the for loop, after the info is read, I used an if statement to check conditions and if the conditions are satisfied, I tried used a click activity to click into the ticket.

I tried to use the stored variable from above WorkItemNumber as a dynamic selector, so that for each row, it will click through the WorkItemNumber above.

However, it’s not valid:

image

Is there a way to achieve this?

@Rebecca_Liao
compairing to the selector screenshot above
i guess there is no name attribute. it is aaname or innertext. Have a check or share fully expanded right section from the a element selector.

as mentioned set a default value for the variable for evaluation purpose. And check parent selector as well

Hi,

Thanks for replying.

Here’s the fully expanded right section.

There’s no a name column. In order to use the stored variable WorkItemNumber from the scrapping table in the click activity. How should I organize the components and place the stored variable?

You will define a string variable WorkItemNumber and give 32839970 as default value for selector evaluation
in the loop the value from datarow will be assigned to WorkItemNumber before doing the click

the last selector line could look like:

<webctrl tag='A' innertext='{{WorkItemNumber}}' />

give a try on it

Hi,

I set the default value to WorkItem which I used in the dynamic selector.

However, it’s still not working.

WorkItemNumber is the variable in the data scrapping table (Column: “Work Item” and row = row).

Is this what you meant by in the loop the value from datarow will be assigned to WorkItemNumber?

Thanks!

i dont know all your implementations but would expect something like:
Assign activity with WorkItemNumber = row(“WorkItem”).toString.Trim

ensure WorkItemNumber is of datatype String (and not generic value) and also is in the right scope with a default value of an workitem present in the current development scenario / webpage

Hi,

Thanks! will try later and see.

One other question, do you know the usual reasons that data scraping tool produces no data (0 rows of data)?

if the datascraping and/or the column selectors are misleaded then null is returned. So we have to postedit the data extract config. Reasons are sometimes to strict selectors eg failing on dynamic parts or alternating informations (e.g. css classes).

maybe following link can helop for introduction on some details behind the scenes:

Hi,
Thanks for the reply.

I successfully scraped the Data Table from the inbox page.

I only scraped two columns: WorkItemNumber and Description.

Then, I used the for loop to get the WorkItemNumber and Description from the Data Table:

Then, I used text manipulation to extract parts from the description for building the conditional logic later:

Then, I set up a If statements to specify the conditions. Here, I used the WorkItem = row(“WorkItemNumber”).toString.Trim, and in the click activity I tried to use the WorkItem as a dynamic selector.

However, the selector is still not working:

Am I doing in the correct way?

try with the most minimal reliable selector at first:

<webctrl tag='A' innertext='{{WorkItemNumber}}' />

all other mentions from above on e.g. setting default value for this test and that it has to be present on the page for this itemnumber is also to fullfill as conditions for the evaluation check

Hi,

Yes, I set default value for WorkItem.
I tried the most minimal reliable selector you wrote, but still it was not working.

image

What is the following line trying to do?

WorkItem = row(“WorkItemNumber”).toString.Trim

I stored the column Work Item Number into variable WorkItemNumber when reading the Data Table scrapped.