Use regular expression to select a specific value on a dropdown

Frcc78bis

Client
Регистрация
06.07.2017
Сообщения
49
Благодарностей
2
Баллы
8
Hello Guys,

I'm trying to select a value on a dropdown.
My variable is "Géomètre/Topographe", so it's working fine. (see second image).
But, imagine my variable is only "Géo".
So I want to use regular expression (regex) to find the right <option> and to select it. The one that contains "Géo".
I tried to put regex on the "What" textbox on zenno but it's not working.

I search the forum and internet for a solution but didn't find one. I'm sure it's possible !
Can someone please help me ??

Thanks a lot
 

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
915
Баллы
113
If u set something in selecteditems, u need to know FULL RIGHT value.
For get this value, u can use RegExp like this I think:
(?<=<option>).*?GEO.*?(?=</option>)

For get from source code or dom, and only then set it gotten variable in field value for Selected Items.
 

Frcc78bis

Client
Регистрация
06.07.2017
Сообщения
49
Благодарностей
2
Баллы
8
ok thx for the tip
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)