How to select a Radio button on webpage in a SecureLogin application definition

  • 7940453
  • 19-Aug-2009
  • 26-Apr-2012

Environment

SecureLogin SSO

Situation

How can I script SecureLogin to select certain radio buttons on a webpage?

Resolution

A web wizard application definition is capable of selecting radio buttons on a web page. To do this the Site/EndSite Statement is used to specify which part of the web page to execute the script. The Site/EndSite commands are similar to the Dialog/EndDialog Statement, except Site/EndSite applies to Web Wizard application definitions.

NOTE: To create Web wizard application definition, you may need to create the application definition as a Advanced web type, and then change the application definition type to Web Wizard.

The example below explains further how to create the script:

Below is html code that display radio buttons:

<... type=""radio"" name=""rdoEmployeeWorkplace"" value=""Americas"">AMERICAS
<... type=""radio"" name=""rdoEmployeeWorkplace"" value=""ASIAPAC"">ASIAPAC
<... type=""radio"" name=""rdoEmployeeWorkplace"" value=""EMEA"">EMEA
<... type=""radio"" name=""rdoEmployeeWorkplace"" value=""OtherOffice"">Other

The name property value that belongs to the radio button tag is needed to be included in the Site/EndSite Statement. The Site/EndSite would also need to know what form it belongs to. For example: It may be the first or second form on the web page. In this example it is the first form. After the information is gathered from the html code, Site/EndSite statement would look like:

 ======================================== Site MatchForm #1 MatchField #1:1 -name ""rdoEmployeeWorkplace"" MatchField #1:2 -name ""rdoEmployeeWorkplace"" MatchField #1:3 -name ""rdoEmployeeWorkplace"" MatchField #1:3 -name ""rdoEmployeeWorkplace"" EndSite ======================================== 

MatchForm #1 - Specifies the first Form on the page

MatchField #1:1 -name ""rdoEmployeeWorkplace"" - Specifies the first radio button in the first set of radio buttons that has the name property of ""rdoEmployeeWorkplace""

The Site/EndSite Statement above, now specifies which set of radio buttons, SecureLogin needs to execute the script on.

Now, the command below is used to select the ASIAPAC radio button.

BooleanInput #1:2 -check ""true""

Basically the command above tells SecureLogin to Check/Select the 2nd Radio button in the first set of Radio buttons.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.