Making Dynamic Controls

Hi Team,
I would like to know if we can make the Control as Dynamic.
For Example if my Control consists of HTML field ‘colname=2’ which is a control in a HTML Table and i want to read value in each Column for the same row.
How can i make colname value dynamic which can be changed at runtime.
For example in Uipath, Blue Prism, variable can be passed into the Controls field whose value is to be made dynamic.
For example ‘colname=’ + var
Do we have similar kind of functionality available here also.
Thanks,
Pravesh

1 Like

@Pravesh2891 after experimenting with the appmask functionality, I realized that I can use the Display Message or the Console Write action, so as to view the Control captured through UISpy as plain text.
The selector as plain text returned a value similar to this:

domcontainer{<{<{<SelectorSeparator>}>}>}uia3:// a[value="emailAddress"]

I assumed that if I provide that text value on the ‘Control’ field of a web action it would work. And it did!

Then I set a part of the selector as a variable and provided it on the Control field. It worked as a charm!

This is the script I have created as an example. It is not necessary to import any appmask so as to run it.

call web
function web
set ListOfOptions to ['Cognitive','Cryptography','Email','Outlook','System']
WebAutomation.LaunchChrome Url: 'https://robin-language.org/docs/robin-the-rpa-language/standard-modules' \
WindowState:BrowserWindowState.Normal ClearCache:False ClearCookies:False BrowserInstance=> Browser
loop foreach value in ListOfOptions
    WebAutomation.FormFilling.PressButton BrowserInstance: \
    Browser Control: 'domcontainer{<{<{<SelectorSeparator>}>}>}uia3:// a:contains("'+value+'")'
    wait 2
end
end

3 Likes

Thanks for sharing the same
Let me try the same will update you if i am able to accomplish the same or not

1 Like

@jokoum, that’s totally ingenious. Just tried it, works like a charm!
Best regards,
burque505

2 Likes

I was looking for this. If I hadn’t found it I would have posted the question.
Curious mind do find new ideas. Thanks @jokoum.

2 Likes