Hi, I am struggling to define the selector variable for this webpage to perform inputs.
I have searched through the forum, taking note that I should modify the expression, but no luck so far.
Any help and advice would be much appreciated.
Hi, I am struggling to define the selector variable for this webpage to perform inputs.
I have searched through the forum, taking note that I should modify the expression, but no luck so far.
Any help and advice would be much appreciated.
hi,
you can pass the selector to variable and give the variable name in this editior. it will take automaticallyā¦
in above image i have selector now i defined in variable and passed as below.
Hi @COOLBOT,
There are two ways to modify(Adding variables or wildcards) the selector.
As @venkat4u mentioned, the selector can be stored in a variable
Another way is you can provide the selector as string(enclosed in double quotes) in the Selector field.
E.g. ā<webctrl aaname=āPart ID Title Loan ID *ā parentid=āloanpart-tableā tag=āTABLEā /><webctrl isleaf=ā1ā tableCol=ā5ā tableRow='ā + iRowStr.ToString + āā tag=āTDā />ā
If you need to change the attributes, click on Open in UI Explorer. Modify the attributes and click on Save.
Thanks,
Saranya K R
Thank you guys for the inputs. However, I am still stuck. I understand that I have to āincorporateā the variable into this string:
Hello @COOLBOT You can Edit the selector in as a string instead of opening the selector builder if you want to add a variable to to a selector.
Please note that doing this makes UIPath recognize the value as a string instead of a selector, so you wonāt be able to edit it as a selector after adding a variable.
Before:
"<html title='staticvalue'/>"
After:
"<html title='" + dynamicValue + "'/>"
Hi Ranjith,
Hope I understood you correctly.
The selector string is as below. When I varies
ā[0]ā in the above string, the selection changes as what I desired.
Assuming your variable name as String_value
String_Value = ā1ā
Create new string variable for selector and in assign activity use the below.
string_selector = "<webctrl id = 'poDetailItemDatas["+String_Value+"].unitPrice' tag = 'INPUT'>"
If your value is not string then use (toString) to convert into string.
string_selector = "<webctrl id = 'poDetailItemDatas["+int_value.tostring+"].unitPrice' tag = 'INPUT'>"
Refer this xaml. sample.xaml (7.1 KB)
Hi Ranjith,
Thank you very much. Thatās exactly what I need and it works like a charm. Cheers!!
Hi everyone,
You can now define your variables for selectors directly in Studio.
Please check our official documentation here:
As well as this short tutorial on our Forum:
I took the liberty to change the solution flag to this post to let our users know about this feature
Old solution post is this one.