dr1992
November 8, 2022, 9:22am
1
Hey there,
I am trying to use an ‘element exists’ for a partially complete variable. The website I’m using has a vehicle model followed by a manufacturer year in brackets. The model should always be unique, but the year can be anything.
I am trying to do an ‘element exists’ to find it in the list as I have the model as a variable. I am struggling to get it to find the vehicle using the variable/wild match as a selector but don’t seem to be having any luck (I think the syntax is wrong).
Can anyone please help? pModel is the variable - how would I need to write the below to be able to guess the (eg:) ‘(2017)’ after it?
"<webctrl src='ebrokerlogin.html' tag='FRAME' /><webctrl id='lstModel' tag='SELECT' /><webctrl aaname='" + pModel + "' tag='OPTION' />"
Thanks a lot!
ppr
(Peter Preuss)
November 8, 2022, 9:33am
2
we recommend the following:
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
when setting a default value for a particular test case the also the selector stand alone validation can be done e.g. for dev / check purpose
maybe some spaces other chars are leading to the break. The mentioned year we dont se handled
One thing you can try (example for the {{}} variable approach as described above:
<webctrl src='ebrokerlogin.html' tag='FRAME' />
<webctrl id='lstModel' tag='SELECT' />
<webctrl aaname='{{pModel}}*' tag='OPTION' />
we inserted the *
for wild card
feel free to
share some screenshots on the details
to use find children as another approach of existence check for drop down options
Hello @dr1992
Please confirm there is no space in the variable, pModel. You can try
pModel.Trim
and check it once.
dr1992
November 8, 2022, 9:36am
4
Hey,
There would be a space, but what I’m trying to do is this, example:
The variable pModel = Red Car
The website list = Red Car (2017)
I am trying to get the selector to be the variable name plus a wild match to guess the year/brackets but I can’t quite get the syntax right.
dr1992
November 8, 2022, 9:41am
6
I tried this but it just gives me an error saying it can’t convert to a string aha
ppr
(Peter Preuss)
November 8, 2022, 9:46am
7
share some screenshots please
dr1992
November 8, 2022, 9:59am
8
Ahh I’ve sorted it! Thanks for your help.
system
(system)
Closed
November 11, 2022, 9:59am
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.