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:
Click in the button
Wait for the menu to appear
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
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)
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:
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.