How to use select item activity

I need to select date from drop down and date is gonna change everytime. I’m using find element and get attribute for getting the desired date but when I’m passing it to select item activity it is not selecting it.
I have tried adding wait for the select item activity to load properly but no luck.
I have tried using click activities but list is bit long so bot is not able to select the correct item, if anybody has use scroll for list please help.

If there is any other alternative to select option from list or any properties which will be helpful please suggest.

This is bit urgent.
Thank you for the help

Hi,

If your target is Select element (tag), the following Inject JS Script activity might help you.

Regards,

Hi @harshikakhatri269

Once you perform click …use a for loop with a try catch on click activity…and the click activity can be for required element …in the catch of click use a scrool activity with distance

Alternate is to use without loop scroll to element by indicating the element you want to click and then perform a click activity after the scroll.

In scroll the main element would be the list that you see after click to open list and the element to search would be your target element if you want to use second approach

Cheers

@Anil_G - I’ll try this try and catch block approach. Will let you know if it works.

Thanks for the help.

@harshikakhatri269

Try this one it will work use type into activity

Thanks
Varun

Hello @harshikakhatri269

Is it a web application? If yes, can you check the element type, if its a Select, then select item should work.

Otherwise you will have to go with click activities by passing the Date as dynamic variable.

Thanks

@Rahul_Unnikrishnan - it is a web application and element type is select still select item activity is not working.

When i tested it in test sequence Select item activity worked but when I’m added same code in main it didn’t. I have added delays printed data just before passing it to select item activity still it didn’t work.

I have tried to use 2 click activities and they are working intermittently. Sometimes due to scroll bot is selecting wrong date.
Simulate click property is true.

And I’m using dynamic variable and data is correct in variable.

Please let me know if you have any other suggestions and thanks for replying.

@Yoichi - I’ll try this.

Thanks for the help.

@harshikakhatri269

Did it work? Facing any challenge?

Chhers

Hope you have included the application scope of the correct page. Also are you using the modern or classic activity?

image

Thanks

@Anil_G - scroll activity selectors were not valid so i was not able to use try catch method in this scenario.

I am using send hotkey down method.
It is taking time but its working.
Thanks for your suggestions.

1 Like

@Rahul_Unnikrishnan - i am using classic activities.

Hi @harshikakhatri269

Try scroll with distance and give whole window that pops up. If you have already tried then yea another alternative is as you said use page down key

cheers

can you check one time by enabling modern activities as well? Try with modern select Item activity.

Thanks