Unable to click in a drop down menu

Hi, I am trying to click a certain option of a drop down menu but I always get an error:
What I try to do is this:

  1. Click in the button
  2. Wait for the menu to appear
  3. Click in a certain option

This is the error I have in this moment:
Unable to select option by value ‘13’ of object ‘Object Repository/Page_Ingreso Orden/select_OrigenPacienteDropDown’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to select option by value ‘13’ of object ‘Object Repository/Page_Ingreso Orden/select_OrigenPacienteDropDown’‘’

I tried to click by value, index or label but it still wont work.
The thing is that when I use the spy tool the only element I can put in my repository is the button but not the drop down menu so the step 2 of my TC is actually useless. At least that is what I think

This is the html of muy button/drop menu

Any suggestions?

Can you share your test code?

I can, the thing is that my actual code is simple cause I changed it a lot of times. The actual code does not have the waitforElement step and tries to click on the element directly because doing the waitForElement was not working for me.
WebUI.callTestCase(findTestCase(‘0-InicioSesion’), [:], FailureHandling.STOP_ON_FAILURE)

WebUI.click(findTestObject(‘Page_Inicio/a_Pre Analtica’))

WebUI.click(findTestObject(‘Page_Inicio/a_Carga de rdenes’))

WebUI.delay(3)

WebUI.selectOptionByValue(findTestObject(‘Page_Ingreso Orden/select_OrigenPacienteDropDown’), ‘13’, false)

I think that I found the problem

What was your resolution? I am facing the same issue.

You might want to show some HTML to allow others to assist you. The concern one person has may not be the same as your concern.

The concerns could be you are trying to work on a non-Select tag, using Value instead of Label, missing correct content of the Label (such as a space after the text), trying to grab a dynamic element, options changing Value reference (I like to use the Label more than the Value) and probably others. So, help us to help you.

I am so sorry for the inconvenient. I posted this when I didnt know how to use this forum correctly.
I cant remember what was the exact problem but at this moment I have something like this:

CustomKeywords.‘keywordPrueba.CustomFunction.clickUsingJS’(findTestObject(‘Localhost Repository/Page_Ingreso Orden/select_origen’),
5)

GlobalVariable.origen = CustomKeywords.‘keywordPrueba.CustomFunction.createOriList’()

WebUI.delay(3)

println(GlobalVariable.origen)

WebUI.selectOptionByLabel(findTestObject(‘Localhost Repository/Page_Ingreso Orden/select_origen’), GlobalVariable.origen,
false)

First I click the drop down menu. After that, I get the element I want by calling a function I created and a global variable called origen. Then I used that global variable in a selectOptionByLabel function.
This works perfectly for me.