xPath of dropdown has input tag so Katalon is giving error

Hello,

I am trying to select an element from dropdown that has input tag. My code is -

WebUI.selectOptionByIndex(findTestObject(‘Layer Search Objects/Page_Map/div_select features from’), 1)

xPath of the element is: //input[@id=‘layer_optTypes’]

Error that i am getting is -
Caused by: org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been “select” but was “input”

That’s right - the clue is in the name, selectOption. It requires an HTML SELECT element containing HTML OPTION elements.

There are many similar questions on this forum: Search results for 'dropdown' - Katalon Community

If you don’t find a solution, please provide more information: