When you hit the F12 key, and then click on ‘Open DevTools’, at the top you will find an icon that allows you to see the HTML of your page.

Click on the icon I highlighted and then click on your combo box. Does the combo box have a <select>
tag or something else? If it is not a <select>
tag, then you will have to get your options in a different way. The ‘selectOptionByIndex’, ‘selectOptionByValue’ or ‘selectOptionByLabel’ will only work on a <select>
tag.
If you have an <input>
field instead of a <select>
, then you will likely have to make two objects for each drop-down. One would be the input, another would be the “drop-down arrow” that likely accompanies it. Then you click on the “drop-down arrow” and then review all the items in the list as I state in my thought bubble below.
Maybe like:
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
WebDriver driver = DriverFactory.getWebDriver();
List<WebElement> menuList = driver.findElements(By.xpath('id("ContextMenuHolder")/ul[not(contains(@style,"display: none;"))]/li/a/span[2]'))
WebUI.verifyMatch(menuList.get(0).getText(), "Type", false)
WebUI.verifyMatch(menuList.get(1).getText(), "Name", false)
WebUI.verifyMatch(menuList.get(2).getText(), "Created on", false)
menuList.get(2).click();
WebUI.waitForPageLoad(10)
Another way you can do this is with parameterization. In my example below, I created a Test Object with a pathway that provides a list of items (I created the Test Object, “span_MenuOption Index” in my OR with the pathway as listed and the option’s position within the list I replaced with a variable, “index”).
xpath = id('ContextMenuHolder')/ul[not(contains(@style,"display: none;"))]/li[${index}]/a/span[2]
WebUI.verifyElementText(findTestObject('myPage/span_MenuOption Index', ['index' : 1]), 'Type')
WebUI.verifyElementText(findTestObject('myPage/span_MenuOption Index', ['index' : 2]), 'Name')
WebUI.verifyElementText(findTestObject('myPage/span_MenuOption Index', ['index' : 3]), 'Created on')
WebUI.click(findTestObject('myPage/span_MenuOption Index', ['index' : 3]))
Just a note that you have to be careful with your list of web elements starting from 0, and your Test Object starting from 1.