SQABasic "ComboEditBoxFunctions" Script

 MODULE DESCRIPTION:

      Routines and utilities to work on SQA Type=ComboEditBox objects in
      Data-Driven Automation.

Action Commands Global Variables Routine Details

User Dependencies:

(stuff the developer's library/script $INCLUDES at compile time.)
(Note: The order of items may matter and may be different for your code.)

Internal Dependencies:

(stuff this library needs at compile time.)

DDE Action Commands

 SUPPORTED ACTION COMMANDS:

      Select                  'Click AND Select a text item in the associated drop down list.
      SelectPartialMatch      'Select a text item in the drop down list based on a partial match.
      SelectIndex             'Click AND Select an item by index in the associated drop down list.
      SetTextValue            'Assign a value to the ComboEditBox


Globals

    (none)

Routine Details



   Sub ComboEditBoxSelect ()


 DESCRIPTION:

      Select an item by its text value from a ComboEditBox.
      This method combines the initial Click required to expose the list
      of items and then the subsequent selection of a text item from the list.

      The routine will first attempt to see if the item exists in the list
      and should provide a warning if it cannot find the item or cannot
      read the list of items.  The routine will then attempt the selection.

      After the selection is attempted, the routine tries to verify that the
      list has the specified item as the selected item.  A warning will be
      issued if the routine cannot read the list.  A failure will be issued
      if the routine CAN read the list and determines that the specified
      item is NOT the currently selected item.

      The routine expects that the given object already has Context or Focus.
      It also expects that Global StepDriverTestInfo contains all the information
      it needs to perform its function.

 DATA TABLE PARAMETERS:

      5   Field 5 should contain the case-sensitive text item to select.
          You can enclose this text in double-quotes to ensure proper retrieval.

 ERRORS:

      none

 Orig Author: John Crunk
 Orig   Date: MAR 01, 2002
 History:

      MAR 01, 2002    Original Release
      MAY 06, 2002    (CANAGL) Added optional partial matches.
      JUN 04, 2002    (CANAGL) Fixed certain partial text match problems.




   Sub ComboEditBoxSelectIndex ()


 DESCRIPTION:

      Select an item by its index value from a ComboEditBox.
      This method combines the initial Click required to expose the list
      of items and then the subsequent selection of an index item from the list.

      The routine will first attempt to see if the item exists in the list
      and should provide a warning if it cannot find the item or cannot
      read the list of items.  The routine will then attempt the selection.

      After the selection is attempted, the routine tries to verify that the
      list has the specified item as the selected item.  A warning will be
      issued if the routine cannot read the list.  A failure will be issued
      if the routine CAN read the list and determines that the specified
      item is NOT the currently selected item.

      The routine expects that the given object already has Context or Focus.
      It also expects that Global StepDriverTestInfo contains all the information
      it needs to perform its function.

 DATA TABLE PARAMETERS:

      5   Field 5 should contain the item index to select.
          You can enclose this index text in double-quotes to ensure proper retrieval.

 ERRORS:

      none

 Orig Author: John Crunk
 Orig   Date: MAR 01, 2002
 History:

      MAR 01, 2002    Original Release




   Sub ComboSetTextValue ()


 DESCRIPTION:

      Routine to set the text of the ComboEditBox.  This version allows the use
      of special character combinations and substrings to identify specific
      keyboard keys.  These are the same special characters and interpretation
      used for Robot's InputKeys command and the Windows Scripting Host.

      ~^+%{( are primarily the characters that induce special processing.

      The routine verifies we can read the text property, sets the text value
      and will verify that the property has been set to that value *IF* none
      of the special characters exist in the provided text value.  If those
      special characters exist, then no post-set verification will occur.

      The routine expects that the given object already has Context or Focus.
      It also expects that Global StepDriverTestInfo contains all the information
      it needs to perform its function.

 DATA TABLE PARAMETERS:

      FLD     CONTENT
      ---     ------------------------------
       5      Text to send to ComboEditBox.  Quoted text may be used to ensure proper
              expected value retrieval.
              There is also no check for a missing field because that would be
              the same as specifying no text ("")--which is valid.

 ERRORS:

      none

 Orig Author: John Crunk
 Orig   Date: MAR 01, 2002
 History:

      MAR 01, 2002    Original Release




   Sub ComboEditBoxSelectPartialMatch ()


 DESCRIPTION:

      Select an item by its text value via a partial text match.
      This method combines the initial Click required to expose the list
      of items and then the subsequent selection of a text item from the list.
      The first item containing a match of the provided substring is selected.

      The routine will first attempt to see if the item exists in the list
      and should provide a warning if it cannot find the item or cannot
      read the list of items.  The routine will then attempt the selection.

      After the selection is attempted, the routine tries to verify that the
      list has the specified item as the selected item.  A warning will be
      issued if the routine cannot read the list.  A failure will be issued
      if the routine CAN read the list and determines that the specified
      item is NOT the currently selected item.

      The routine expects that the given object already has Context or Focus.
      It also expects that Global StepDriverTestInfo contains all the information
      it needs to perform its function.

 DATA TABLE PARAMETERS:

      5   Field 5 should contain the case-sensitive substring to select.
          You can enclose this text in double-quotes to ensure proper retrieval.

 ERRORS:

      none

 Orig Author: Carl Nagle
 Orig   Date: MAY 06, 2002
 History:

      MAY 06, 2002    Original Release




   Sub Main ()

 DESCRIPTION:

      Entry point to process StepDriver ACTION COMMANDS for this object.
      The routine merely reads the Global StepDriverTestInfo.testcommand and
      calls the appropriate subroutine to process it.

      If the testcommand is unrecognized it will be processed by the
      GenericMasterFunctions.GenericUnimplementedCommand routine.

 DATA TABLE PARAMETERS:

      none    -   the called subroutine has the requirements

 ERRORS:

      none

 Orig Author: John Crunk
 Orig   Date: MAR 01, 2002
 History:

      MAR 01, 2002    Original Release
      MAY 06, 2002    (CANAGL) Added optional partial matches.
      OCT 17, 2002    (CANAGL) Reroute fallback to GenericObjectFunctions.
      OCT 22, 2002    (CANAGL) Warn of unimplemented TF and TW record types.
      DEC 12, 2002    (CANAGL) Added support for XSLComponentActions.MAP


Copyright (C) SAS Institute
GNU General Public License: http://www.opensource.org/licenses/gpl-license.php 
==============================================================================