How to identify control fields for SecureLogin

  • 7009324
  • 09-Sep-2011
  • 26-Apr-2012

Environment

Novell SecureLogin
NSL6.x
NSL7.x
Windows apps
Web apps
Java apps

Situation

SecureLogin can be scripted to perform desired actions based on the value of one or more control fields.
Sometimes it can be difficult to identify those control ID's.

Resolution

Ideas for finding the control ID (i.e. to verify that you are on the password page):

1.  Use the Widow finder or ScriptBuilder utilities for Windows applications.   These utilities work great for Windows applications, but not for Java apps or web pages.

2. Use the NSL7 Wizard to identify controls.  After the wizard has created the graphical representation for the application, convert it to an application definition to show the control ids.
 
3. Use a script like the following to identify controls numbers: 
Type "1" #1
Type "22" #2
Type "333" #3
Type "4444" #4
Type "55555" #5
etc
 
4. If the control numbers are not consistent (i.e. change, as in .Net apps) use a script like the following to identify the control order: 
Type -order "1" #1
Type -order "22" #2
Type -order "333" #3
Type -order "4444" #4
Type -order "55555" #5
etc
 
Note: the reason for repeating the numerals (22, 333, 4444, etc) is that information typed in the password field will be masked.  The password field can be identified by counting the number of '*'.  For example, *** would indicate that the password is in control 3.
 

Additional Information

After the controls are identified, use ReadText (or GetText for web applications) to get the value of that control ID.  Then act if that value is what is wanted.  For example, the following example in a notepad script shows a message box if the notepad document says "test":
 
ReadText #15 ?text
If ?text EQ test
  MessageBox "success"
EndIf

OR  

ReadText -order #1 ?text
If ?text EQ test
  MessageBox "success"
EndIf

Also, note that by default the NSL7 Wizard uses -order logic for .Net apps and control IDs for other kinds of apps.