Katalon Studio selecting Option Twice, Triggering Alert

Have a test that is running like so.

WebUI.selectOptionByIndex(findTestObject(‘Page_test/select_1010’), 5)
WebUI.selectOptionByIndex(findTestObject(‘Page_test/select_1010’), 6)
WebUI.selectOptionByIndex(findTestObject(‘Page_test/select_1010’), 9)

I’ve also tried selectOptionByValue and selectOptionByLabel, but Katalon is selecting the first value twice after it selects the second value. It should select 5, 6, and then 9.

Can you share the HTML for the select element AND all its OPTION elements too?

You can use WebUI.selectOptionByIndex(findTestObject('Page_test/select_1010'),'5,6,9')
See Param ‘range’ from the doc

Hi. I tried this and that didn’t work.

I can’t. It executes find in Edge, but not in Chrome or in FireFox.

Why? Is it a top-secret government site or something? If you can’t share, we can’t figure out what’s wrong. :confused:

Like @Russ_Thomas has said, we ideally need to see the HTML of the available options, before as well as after you select one of them. My guess is that maybe after you select an option from the list, that option then disappears from the HTML, which is throwing off your subsequent selections.

But again, we can only guess without seeing what you are working with.

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