TestProject Forum
Powered by leading experts in the test automation community

How to select an item from a drop down list and to check if duplicates are added?

I want to select different languages from a drop down list and add multiple times and I want a check to verify if duplicate language is selected.Could you please help on this?

Hi @dmraju,

To select an option from a dropdown element, you can use the “Type Text” action on that dropdown element. You need to type the value of the option that you want to select.

You can do it more generic by creating a dynamic element. For example:
//li[@text = 'OPTION_NAME']
Where the OPTION_NAME is actually a parameter.

You can read more about it here: https://intercom.help/testprojectio/en/articles/3572418-how-to-create-dynamic-elements-in-testproject

Hi Amit, thanks for reply. Can yo please explain elaborately.

attached the way i did.bu unable to select language.Could you please help

Hi @dmraju,

Here’s what I did to select a country from this dropdown element:

  1. I hovered with the mouse on that dropdown and clicked twice on the shift button to freeze it:

  2. The next step is to write the value of the option that you want to select. I used static text here, but this can be parameterized too (much better than static text and will allow you to use data source)

  3. After executing the second step, you can see that “France” was selected.

Please let me know if you need my help with that :slight_smile:

Kind regards,

Thank you.i understood that.
In my case i m parametrizing language(using data source) that need to be selected from drop down.
I’ m able to select language ‘English’ from datasource, but its not clicking and choosing.
Attaching my language dropdown image

How to select languages which are inside data source

In the example I shared with you, I’m not even opening the dropdown menu, but merely typing the option name that I want to select and the option gets selected automatically.

What happens when you typing the text? It’s opening the dropdown instead of presenting the option as the selected one in the dropdown?

Thank you…Its working fine now.

How to loop a step or how to execute step inside a loop

That’s great @dmraju :slight_smile:
Glad I could help you with that

Thank you :slight_smile:
How to loop a step or how to execute step several times?

In recorded tests, you can set the step to repeat several times. Simply click on the step and go to the bottom. There, you will find the repeat option.

Thank you…let me try