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.
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
Arnel
January 29, 2021, 6:16am
2
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.
Hi there Guys,
LONG POST AHEAD! Take time to read. . .
Ok so, I’ll be posting this since I notice this last few weeks, some or many of the posted issues
here in the forum are regarding or they are dealing with lists or dropdown. So I’ll be sharing
you some idea that might help you because when dealing with lists or dropdown I always use this approach and it is very effective. Its not quite easy working on lists or dropdown, it requires a lot of observations and tries but when you get …
Hope that helps. . .
Assuming you have static id , you can try the following xpath to the select (no preceding slashes, nothing else needed):
id("categoryIdNew")
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.
grylion54:
c
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’),
‘WORKSTATION’)
WebUI.delay(2)
WebUI.click(findTestObject(‘Object Repository/Governance/Group Management/Page_Grouptocancel/li_WORKSTATION’))
WebUI.click(findTestObject(‘Object Repository/Governance/Group Management/Page_Grouptocancel/span_WORKSTATION’))