Vani
July 31, 2018, 5:38pm
#1
I have a dropdown list in which the option i wanted to select keeps changing its position, so i cannot go by ‘selectOptionByIndex’
Example of my dropdown list options:
Gatter-01/repository
Clums-90/summary.
WebUI.selectOptionByValue(findTestObject(‘Page_586/From’),’*90*’,true)
Should the above statement return the second option in my dropdown?
i can be wrong, but i think regexp should look like:
WebUI.selectOptionByValue(findTestObject(‘Page_586/From’),’.*90.*’,true)
1 Like
Vani
July 31, 2018, 6:11pm
#3
It worked. Thank you very much.
Hi Andrej, I have similar case: How to handle scenario 3 … ?
_// Scenario 1 : Working _
WebUI.selectOptionByLabel(findTestObject(‘Product’), ‘Air Lines’, false )
_// Scenario 2 : Working _
WebUI.selectOptionByLabel(findTestObject(‘SQ/Quote_Info_tab/Product’),’.*Air.*’,true )
// Scenario 3 : Not Working since ' a ’ is lowercase in ‘air’
WebUI.selectOptionByLabel(findTestObject(‘SQ/Quote_Info_tab/Product’),’.*air.*’,true )
WebUI.selectOptionByLabel(findTestObject('SQ/Quote_Info_tab/Product'),'.*[Aa]ir.*',true)
not sure about this, but can work too :
WebUI.selectOptionByLabel(findTestObject('SQ/Quote_Info_tab/Product'),'(?i).*AIR.*',true)
(?i) is for - ignore case
2 Likes
Andrej Podhajský said:
WebUI.selectOptionByLabel(findTestObject('SQ/Quote_Info_tab/Product'),'.*[Aa]ir.*',true)
not sure about this, but can work too :
WebUI.selectOptionByLabel(findTestObject(‘SQ/Quote_Info_tab/Product’),’(?i).AIR. ’,true)
(?i) is for - ignore case
Both your solution worked like a charm. kudos …
tutku
September 27, 2018, 7:54am
#7
How to do it in mobile? Because I am working on Ipad testing. and I clicked dropdown menu but I could not get their info.
1 Like
tutku said:
How to do it in mobile? Because I am working on Ipad testing. and I clicked dropdown menu but I could not get their info.
i have the same problem. Any ideas?
tutku, Ann
try to bring your question to mobile part of forum … this thread is closed (had BA) so you have smaller chance to get right answer here…