Selecting drop list value

Hello,

I’m using Select Item activity to choose a drop list value. The drop list value are dynamic and change each day.

Can someone help me select the value based on the text in drop list?
So select the drop list value with the text
“tmullady”
AND
Current Date in “2021-10-07”

And help or direction would be greatly appreciated.

Thanks,

Tim

@timothy.mullady

Can you share the selector the value selector?
Also share the screenshot of the drop-down element

Thanks

Hello

The date needs to dynamic set to current day. tmullady will always be the same value.

Hi @timothy.mullady

You can try this

Method 1

  • Click on the drop down button
  • Find text position (Indicate on full drop-down list that is visible and give your dynamic value in the text ) store in a variable.
  • Click activity pass the variable of find element in the Element property (you doesn’t need to indicate anything)

Method 2

  • In select item activity,Instead of selecting from Drop-down, try to pass your string and try once

Eg: give your value as
“retrieved on”+Date.now.tostring(“yyyy-MM-dd hh:mm:ss”)+“by (tmullady)”

Method 3

  • Click on drop-down list
  • Try manually type into is working there if yes
  • Type into - Type your string and select accordingly

Method 4
If you have many list and the actual value is below the list try this way

  • Click on drop-down
  • text exist if exist use Method 1
  • If false scroll down until you click the value

Hope this helps

Regards
Sudharsan

If you are not sure about the time in the dropdown and only one item per day, you can use Type Into activity with the below text,

“retrieved on ”+Date.now.tostring(“yyyy-MM-dd”)

This will choose the item with the current day.

Yes, I will know the date but not the time. The items in bold are dynamically changing variables each day. This is full string. I only provided a sample because I thought a text search could be used.

" 299 records retrieved on 2021-10-06 05:59:27.115 by Smith, John (jsmith)"

Okay, so you actually want to click on the item which fits these criteria:

  1. Contains (tmullady)
  2. Contains proper date
  3. Has the format you’ve sent above

Right?

Try using this expression in Select Item:

"* records retrieved on " + Date.Today.ToString("yyyy-MM-dd") + "* by (tmullady)"

thanks, I tried this but it gets “Cannot select item. it was not found among existing items”

I’m select Item activity

When you click the drop down button of Select Item activity, can you send a screenshot of the exact value that you want to select please?

Alright, so as per your use case try the below.

  1. Click on the dropdown
  2. Check if the required test Date.Today.ToString(“yyyy-MM-dd”) exist in
  3. If yes, click the text
  4. Else, scroll down and repeat step 2

Hope this helps ! Happy Automation :wink:

Thanks.