Drop Down Not Recording

Hello,

I have been automating a web form. At one point, I need to click a button that opens a pop-up with a drop down like this:

The drop down is clicked and turns into this search bar:

I enter three digits to generate search results to choose from:

When I record this activity, clicking on the drop down BEFORE IT TURNS INTO A SEARCH BAR, is not recorded.
And when I use the search tool to search the path of the element, the line becomes an error.

Please explain how to tackle this issue and to string the right target to get this code to pass on Katalon Recorder.

Thank you in advance,
Vilva

Add SSIC.PNG

Add SSIC2.PNG

Add SSIC3.PNG

Do you have a live example of this component?

I had similar issues that the recorder doesn’t capture this kind of components.

You will probably end up to making the test steps yourself.

yes, I am trying to make the steps myself, but I don’t know how.

On the Selenium IDE Chrome Extension, this is the recording of my actions:

but when I copy over the actions into Katalon, the script doesn’t run and an error is returned. Lines 4 to 7 is the clicking of drop down that isn’t recorded in Katalon.

Capture.PNG

vilva manggkhai said:

On the Selenium IDE Chrome Extension, this is the recording of my actions:

but when I copy over the actions into Katalon, the script doesn’t run and an error is returned. Lines 4 to 7 is the clicking of drop down that isn’t recorded in Katalon.

Your commands seems not correct on line 4,5

4. mouse over
5. mouse out
Should be
4. mouseOver
5. mouseOut

Patrick Groot said:

vilva manggkhai said:

On the Selenium IDE Chrome Extension, this is the recording of my actions:

but when I copy over the actions into Katalon, the script doesn’t run and an error is returned. Lines 4 to 7 is the clicking of drop down that isn’t recorded in Katalon.

Your commands seems not correct on line 4,5

4. mouse over
5. mouse out
Should be
4. mouseOver
5. mouseOut

Yes that is how selenium IDE recorded it, but I did ensure my Katalon Recorder did it the way you states as I chose from the command drop down.

Add SSIC4.PNG

How about click | id=select2-chosen-1?

1 Like

Type in input field name that you want to select from DDL (exact name), when it stay like single name in DDL just click on that single option and click away, it should work.

Hello,

Mr. Alex. I did try what you suggested, but that also didn’t work.

Mr. MMilinkovic, can you please elaborate. I don’t understand, I’m very new to this.

Hi I’ve same issue and is a blocking one. A very detailed example by Katalon people is a MUST that is needed.

Is there someone that could provide an example of this exact component?

@vilva manggkhai

Did you try to get the css-selector or xpath of the field from using the inspector tool in Chrome or Firefox instead of the selection tool from Katalon/Selenium?

I had the same issue with a few of our drop downs, but “click | css-selector or xpath” usually works just fine.

@Peter_Nicolaisen
I managed to get the drop down click to be automated using “link=Choose an option”
And then I was able to type into the textbox
however, now I can’t seem to automate the selecting action of choosing one of the prompts from the drop down.

the automation gets stuck here:

and is unable to process Key_Down or Key_Enter to select.

However, the test case still proceeds to register the Send key actions as a pass:

The test case only fails when elements on a different window is chosen and not found.

This is the code present when I click Inspect:

I’ve tried everything I can think of. Please let me know if you come up with another way to select items on the drop down. It is the last remaining part of my code that is unable to automate.

Thank you for your effort in advance.

Capture eg 1.PNG

Capture eg 2.PNG

Capture eg 3.PNG

click | css=li[class="select2-highlighted"] | 

or if you want to check if your search term is the one highlighted

click | css=li[class="select2-highlighted"]:contains("SEARCHTERM") | 

Hey, I don’t know if this will help you too much, but have this exact issue, and my workaround solution was to type something into the text field, Set a 4 second delay, and click on the link of the thing I wanted.

I tried @Patrick’s method but at first it didn’t work. then I entered the entire class name for the highlighted item, then it worked.

1 Like