Configuring SecureLogin to select items in drop down list boxes on web pages

  • 7940305
  • 19-Aug-2009
  • 16-May-2013

Environment

SecureLogin
SecureLogin SSO
v 3.5.1.x and later

Situation

Is there a way to select items in drop down list boxes on web pages?

Resolution

A new command in version 3.5x “SelectListBoxItem” can be used to select items in drop down list boxes on web pages. For more information on the command, see the scripting guide.

The section of the script below is for a web site called www.managerzone.com. It includes the command to choose an item in the list box. It is intended as an example only. The first list box on the page, reading left to right, top to bottom, is always #1.
 
#===================================================
# Error Handling if the Username and/or Password is incorrect
# Prompt the user to verify them and retry logon
#===================================================
If -Text ""Incorrect username or password""
Set $Password """"
DisplayVariables ""Incorrect username or password. Please verify them and click OK to retry logon."" $Username $Password
Type $Username #1
Type $Password #2
Submit
EndScript
EndIf
#===============================================
#At the logon prompt without errors
# Prompt the user the sport and then select it from the list
#===============================================
If -Text ""Password:""
PickListAdd Hockey
PickListAdd Football
PickListDisplay ?Sport ""Please select your Sport.""
SelectListBoxItem ?Sport #2 
Type $Username #1
Type $Password #2
Submit
EndIf