Select item activity : I want to choose the one at the bottom, regardless of the word that changes

When using ‘select item activity’ for ‘drop down select box’ where the letters keep changing, I want to choose the one at the bottom regardless of the words. Do you know how?
dynamic selector?

Hi,

How about the following steps?

1. Get all items in the select box using GetFullText activity. (Let’s say strItems for its output)
2. extract the last item using Assign activity with the following exression

 lastitem = strItems.Split(vbCrLf.ToCharArray,StringSplitOptions.RemoveEmptyEntries).Last()

3.Use SelectItem with the above result.

Regards,

1 Like

thank you, I’ll give it a try.

good morning, Yoichi san

しかし、私が選択するdrop down selectは、時間が経つにつれて増え続けて使うことができない方法です。

Hi,

Alright. I have a question. How do you determine which item is the bottom?
Is the site on the internet? If so, Can you share the URL?

Regards,

1 Like

https://bank.shinhan.com/index.jsp#020501010300
Purpose of getting the first time exchange rate
Renewed every few minutes

Hi,

Thank you for sharing details.

Can you try the following sample?
Basically, this is implementation of my first post.

Sample20210804-2.zip (3.5 KB)

Regards,

1 Like

king Yoichi

1 Like

you clear answer. But I don’t know if I understand right. Thank you for letting me know.

  1. Click ‘find element’ on ‘dropdown box’ (find sbx_notiSeq)
  2. ‘Retry scope’ = Activities that operate when ‘find element’ fails
  3. ‘Get Full text’ (get text from sbx_notiSeq)
  4. ‘Check False’ = Error message when nothing is present
  5. ‘Assign’ = variable ‘targetitem’ is the string of the last element
  6. Select item = Select variable ‘targetitem’.

Am I right to understand?
What role is sbx_notiseq?

Hi,

I’ll add some comments as the following.

  1. Click ‘find element’ on ‘dropdown box’ (find sbx_notiSeq)

As It seems to take several seconds to load and display target dropdown list, this activity will wait until the target will be visible. If no wait, we might get empty string in next GetFullText activity.

  1. ‘Retry scope’ = Activities that operate when ‘find element’ fails.

This is for retry if CheckFalse activity throw exception. (Not for Find Element activity)

  1. ‘Get Full text’ (get text from sbx_notiSeq)
  2. ‘Check False’ = Error message when nothing is present

Throw exception, then retry by RetryScope, if grabbed data is empty.

  1. ‘Assign’ = variable ‘targetitem’ is the string of the last element
  2. Select item = Select variable ‘targetitem’.

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.