Cannot select in dropdown list

Hi, im newbie in Katalon. Please understand some things maybe difficult for me but I am open for new learnings.

I have this problem where I cannot select in drop down list, been struggling this for two days now. :grimacing:

Here is the error message:

and here is the html

I have tried a lot things already based on the topics that i read from this furom.
I tried to select by value
I tried to create object with this //ul[@id=‘select2-categoryIdNew-results’]/li[50]/ul/li

Hi @jojuban,

This approach might be a bit technical one but its worth to try. Take time to read and try it on your side.

Hope that helps. . . :smiley:

Assuming you have static id, you can try the following xpath to the select (no preceding slashes, nothing else needed):

And you should use (not sure of the full TestObject pathway):
WebUI.selectOptionByLabel(findTestObject('dd_select_category'), 'USERGROUP', false)

I often copy and paste the label straight from the HTML so that I capture the correct spelling of the drop-down items.

Thank you. I cannot define the specific id of the item because it’s not static but fortunately I resolved it already by typing first the item in the dropdown and then select the result item.

WebUI.setText(findTestObject(‘Object Repository/Governance/Group Management/Page_Grouptocancel/input_Close menu_select2-search__field’),

WebUI.delay(2)‘Object Repository/Governance/Group Management/Page_Grouptocancel/li_WORKSTATION’))‘Object Repository/Governance/Group Management/Page_Grouptocancel/span_WORKSTATION’))