Currently i am trying to download the attachment in the website as per screenshot below:
I am using the do while loop method and assign activity to download all the attachment. However, i dont want to download everything in the browser, i want to exclude those description with " Other" from downloading.
May i know how can i do that and sorry that if this is simple question as i still quite new on the Uipath.
You can use a Get Text inside that Do while loop to get the description for the current row.
The selector for this activity needs to be dynamic for tableRow number for example, in which you need to assign a contor that is incremented at each loop.
After getting the needed text then you can check wheteher it is equal to “Other” or not with an if activity, and based on that you can download it or not.
May i know how to do the following action? If i want to exclude more items, like " Others" and " Unsigned", how to make it in this case?
“After getting the needed text then you can check whether it is equal to “Other” or not with an if activity, and based on that you can download it or not.”
First you need to identify the number corresponding to your first row, which is not always 1, in my example I have used a table that starts with rows from number 2 so my contor is initialized to 2.
The selector for Get text should look like this:
In the tablerow field you have to pass the contor variable to check the description for each row.
After getting the text in the if condition is verified whether it is in those two cases mentioned above. If it is true than don’t save the file, in the other case Click save.
It may be necessary to use a dynamic selector for Click save also, by passing the contor in the tableRow field.
After verifying this condition you need to assign contor+1.
In the Do While you need to put the maximum rows that are visible on that page as a condition
I am trying to replicate the same thing. But it prompt out the error after reaching row 21 as row 21 onwards got nothing ady. It is because i set the condition less than 24.
May i know how to do the following:
“You need to adjust the selector to match all the visible descriptions but with the contor assigned in the TableRow field.”
You can omit the css-selector and the src link, and verify inside the UiExplorer if it is valid.
These fields may change so it is better to omit them.
After that you can verify in the UiExplorer if the resulting selector is valid for all the elements on that column by changing the tableRow index.
If the result is valid for all the occurences you can pass the selector to your activity but with the tableRow index replaced by the contor variable.
It seems like there is a problem with the TableRow number for index 13.
Because I cannot view the page, the only suggestion I could give to you is to adjust the selector from the error message by clicking repair and indicating the row on which the error occured.
You can use ElemenExist activity to verify if that element on that specific row exists or not.
For example if there are 13 rows use elementexist with the same selector for GetText and in if activity check if it is true or false, if it is true then proceed with the other actions, if not, this means you passed over the last row item, in this case, 14.
In the Do While Condition use ElementExistVariable=True to work only if the row number exists.
Great suggestion, i also plan to do this one but i not sure how to do it in the complex way.
Basically now i plan to restructure the process as follow
Detect the element exist for the first row (save button) ,
2.1. if yes for element exist, then check the condition whether have the wording " Other" or “Unsigned”.
2.2 If no element exist , then go to second row.
If wording consist of "other " or “unsigned” , skip and go to the second row
If wording does not consist of "other " or “unsigned” ,click the save button.
For screenshot above part, it will check for each row until the end right?Meaning if the dont have element exist , it will check for next row until the row (set by condition)?
2. While for this part, the condition we set as True . May i know the rationale behind on this? Is it more suitable than we set number of row in this case?
Many thanks again for the design…It really a brilliant design and dynamic.
ElementExists outputs true if the element is found on the screen, in our case it searches for each description text on the row, beginning with row 1, 2,… and it ouputs false when the element is not found. In this case, as shown in the screenshot, that means that we have reached the end of the table, we have passed over the maximum nr of rows, because at each step we increment the contor used in our dynamic selector.
The condition is RowDescription=True because we need to perform the actions inside the Do While loop only if the element is visible, if it turns False then we need to exit the Do while loop because we don’t have any rows left on the screen to process.