Jump to content

Recommended Posts

Posted (edited)

Hello, I use _WD_ElementOptionSelect to select an option in my dropdown, one problem. The input can be lower case or upper case, depends what the user fills in. Can I make this someway non case-sensitive? See my code below:

$Product = "adminview"

; Select option is AdminView and won't select it now.
_WD_ElementOptionSelect($sSession, $_WD_LOCATOR_ByXPath, "//select[@name='custom_field_49325']//option[contains(text(),'" & $Product & "')]")

 

I found the function StringCompare, but then I need to compare to the select options, is there a faster way to do it?

Edited by Paulliev
Posted

@Danp2 Thanks for your answer.

As I said: "The input can be lower case or upper case, depends what the user fills in" 

The translate you gave me purely sets everything to lowercase right? But my select options are not all lowercase. So it really needs to be non case sensitive just the text needs to be the same.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...