Take action if there is text in the field

Hello,
I want to automate the process, but I don’t know how to go about it. My robot has to go through all the lines on the web page, but when it encounters a file size, it has to download it.
image
When the field is empty, it is supposed to bypass it.
I’m new in UiPath Studio X, please understand.
Thank You.

Hi @sullivanne

First for going through all the lines, you can check the selectors and there you can find something like RowNumber like that, if you have that you can create an Int32 variable

You can use Get Text activity to get the text from that line and then you can use IF condition to check if it is empty or not

Hope this may help you

Thanks,
Srini

1 Like

@sullivanne
Use get Text Activity inside attach browser/use browser/application activity through selecting this element in variable StringText.
After getting text putt If condition and put condition like this.

Not StringText.ToString IsNullorEmpty

use then block to proceed further

1 Like

Hi @sullivanne

Try like this

Not String.IsNullorEmpty(CurrentRow("YourColumn").ToString)

1 Like

Hi @sullivanne

  1. Extract the datatable
  2. For each row in datatable
  3. if Not(string.IsNullOrEmpty(row(“Rozamiar pliku”)) or String.IsNullOrWhiteSpace(row(“Rozamiar pliku”)))
  4. assign var1 = row(“Rozamiar pliku”).tostring
  5. use click activity and pass the in the aaname attribute using strict selector to download

Hope it helps.

1 Like

Hey, thank you very much! :blush:


I did as you wrote, but the robot does not see the second extension if there are two in the table. The robot clicks only on the first extension. What am I doing wrong?

@sullivanne

In 1st click activity open selector properties Use strict selector and within use variable in the “aaname” attribute to click other links also.

1 Like

Hi @sullivanne

Change the selector of click activity anchor to strict selector and pass the variable in the “aaname” attribite.

Hope it helps.

1 Like

@sullivanne

Not for the target, change it to the strict selector for anchor.
Assign the anchor to the left side data.

1 Like

@sullivanne

You have already extracted datatble right, give the currentrow(“left colName”) to a variable and pass that variable in the “Id” attribute.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.