Element exists but with wildmatch?

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!

we recommend the following:

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


and check it once.


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.

have a look here:

I tried this but it just gives me an error saying it can’t convert to a string aha

share some screenshots please

Ahh I’ve sorted it! Thanks for your help.

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