I want to loop through using help text selectors, but there are elements below also and it should scroll when the element is passed

Here im going to pass the HELP TEXT in excel and loop through it. But there are more when we scroll. So it should loop through those elements as well.
The flow the while passing the help text it should see if the Value “Simple Trust” is Checked or Unchecked then write line.

It should also get Text of the element and write it.

how should i do it.
MicrosoftTeams-image (113)

MicrosoftTeams-image (112)

You don’t have to scroll. UiPath can see page elements that are off the bottom of the screen.

Read Range into a datatable
For Each Row in Datatable

  • Get Attribute “checked” (replace ST:Simple Trust in your selector with CurrentRow(“column name”).ToString

It sometimes doesnt scroll. I will try and let you know

It doesn’t need to scroll, but it may depending on whether you’re using hardware events, simulate type, etc.

MicrosoftTeams-image (114)

Is this correct. It is unable to get attribute and check/uncheck

Hi @Bhushan_Nagaonkar

Use extract datatable activity to extract the data as datatable.
Iterate the datatable with For each row in datatable.
In that activity use If condition if matches the condition
Inside the If condition use the click activity instead of check\uncheck activity.
Store the currentrow in a variable and pass the variable in the selectors of the click activity.
If you want to scroll use mouse scroll along with the click activity.

Hope it helps!!

If you’re looping through a datatable that’s not correct. You have to edit the text of the selector. Copy/Paste it from the selector property in the activity into Notepad. Then edit that last part…

helpText=‘" + CurrentRow(“Helpt”).ToString + "’ text…

If you are using the check/uncheck activity you don’t need to Get Attribute first with an If. The Check/Uncheck activity does that part for you. It’s not like a Click where it just Clicks it no matter what. If you tell it to check the box it checks it only if it’s not already checked.

I dont want to check/ uncheck. I just want to see if it has been checked or not.

Ok. I will try and let you know.

Then change the click activity to check\uncheck activity but in activity make the action to check.
If it is already checked it wouldn’t do anything if it is unchecked it will check the option.

Hope you understand!!

By the way, another method that sometimes people find easier to read, is the String.Format method. Say your selector is:

"<webctrl aaname='some name' />"

And you want to replace ‘some name’ with a variable. You can just do…

String.Format("<webctrl aaname='{0}' />",CurrentRow("Helpt").ToString)

You can also do multiple replacements:

String.Format("<webctrl aaname='{0}' innertext='{1}' />",CurrentRow("Helpt").ToString,SomeOtherVariable)

The problem is if we remove automation ID or change it is unable to take the value. Even though we make it dynamic

Ok, understood will try and let you know

Is it working for you @Bhushan_Nagaonkar . If it’s working let me know.

No its not because of automation id selector. Cant even do dynamic

Hi @Bhushan_Nagaonkar

I found a solution to your query. Use the get attribute activity to get the attribute here take the attribute of checked. The output of attribute is saved in string datatype and change it to Boolean datatype.

Take an If condition and check the output attribute is true or false
I have done the workflow for your understanding, check the below workflow.
Excel_Demo.xaml (23.4 KB)

Hope it helps!!

I never said to remove those things. I’m just showing how to make a dynamic selector for the one line of the selector that you need to be dyamic.

https://docs.uipath.com/studio/standalone/2023.4/user-guide/dynamic-selectors

I tried to make it dynamic it didnt happen. But I tried other method it worked. Thanks for your help and time.

Appreciate it.

Show us what your selector is when you tried to make it dynamic.

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