I have a dropdown list in which the option i wanted to select keeps changing its position, so i cannot go by ‘selectOptionByIndex’. Moreover, on the right side of the names, there’s always the status of the party (Validated / Not Validated) that keeps changing because of our tests.
So party names would be seen in the drop down as: “Heroes in Town (Validated)” or “Heroes in Town (Not Valdiated)”.
So I used the code below:
WebUI.selectOptionByLabel(findTestObject('OR_SFC Auto-Approval/Page_Dashboard Viewing Vyon Burstin/select_Heroes In the USA (Vali'),
'.*Heroes in Town.*' , true)
Now I want to do the same thing but “Heroes in Town” is a global variable from my Profile.
It would be something along the line:
global String partyName = "Heroes in Town"
WebUI.selectOptionByLabel(findTestObject('OR_SFC Auto-Approval/Page_Dashboard Viewing Vyon Burstin/select_Heroes In the USA (Vali'),
.*GLOBAL.partyName.* , true)
But it gives me syntax error. I don’t know how to proceed further. Any help would be appreciated.