Click elements 1/3

Hi

I am having problems trying to get an element in a program we use, for example the element could be 1/3… I can get to the stage were I can identify that there is 1/3 however I can not get the robot to identify that it has 3 tasks to do, any ideas?

@rachelmcelhone : Could you elaborate the request and share some samples to answer your questions :slight_smile:

@rachelmcelhone, Hi

Why don’t you build it to work for all three activities, your workflow within Try Catch and check the “continue on error” box. Normally if there is one activity the robot will throw an error when it gets to the second or third one that doesn’t exist, but if you put it within try catch and check that box instead of throwing an error it will move on. this is not the best solution, it will slow your process down a bit. but will work.

you can also adjust the timeout in try catch to make it wait for at least 5 seconds and then move on.

Hi Senzo

this was just an example, there could be 1/100 files that need changes made too.

Atm my work flow can identify how many row there are eg 1/3 using a get attribute then a write line bill_terms.ToString so it will display whatever the ’ / ’ the amount is, however the next stage would be to get the robot to follow a process going by the ‘/ 10’ the last digit eg here 10.

How would i go about getting the last number?

this was just an example, there could be 1/100 files that need changes made too.

Atm my work flow can identify how many row there are eg 1/3 using a get attribute then a write line bill_terms.ToString so it will display whatever the ’ / ’ the amount is, however the next stage would be to get the robot to follow a process going by the ‘/ 10’ the last digit eg here 10.

How would i go about getting the last number?

@rachelmcelhone, okay i feel like i do not understand the process.

anyway use an assign activity maybe initialize a varible totalNumberOfTasks you can make it a string and then take that terms.ToString and assign it to that variable, then use a for each activity, or a while loop say for example while counter < Cint(totalNumberOfTasks) do the work and then increment counter by 1

Here is an example before the if statement

please advise where i am going wrong

You can use two more click activities to click on ‘>’ button.

  1. You can use the “Element Exists” activity to check if the">" button exists.
  2. IF Activity- If it exists, then perform iteration through the page else just take the data from 1st page. Use If Activity to check this.

Hi @rachelmcelhone,

If I understand the problem correctly… you may try the following solution:

In the first Assign activity, I just defaulted bill_terms to “1/3” on mine for testing purposes. However, on yours, since you’re scraping it, no need to include the Assign activity. The While activity ensures that the tasks will be done 3 times in this case. Hope this solves your issue. :slight_smile: