| || |
Use of a wildcard in a selectOption target string?
Does anyone know how to select an option of a SELECT when the list of options and their spelling is dynamic?
I have a SELECT control that dynamically lists items from a database. It concatenates a user applied name with a serial number. The user's name part can change to a set of 1 to 24 alphanumeric characters. The serial number will not change. I'd like to make selections base on the serial number only so the test does not break because of a name change.
I want to change the fragile statement like this:
selectOption( ":ctl00_Main_ddController_select-one", "DefaultName - 33333000" );
to a statement that uses a wildcard for the user's name part, like this:
selectOption(":ctl00_Main_ddController_select-one", "* - 33333000");
The above wildcard statement does not work. I don't know if it is my syntax or if its not possible. Can anyone offer assistance?