Download as pdf or txt
Download as pdf or txt
You are on page 1of 94

Runtime Library

SAP Test Acceleration and Optimization 2.0

Target Audience Application testers

Document version: 2.0 (May 17, 2010)

Copyright 2010 SAP AG. All rights reserved. Java is a registered trademark of Sun Microsystems, Inc. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Any Java Source Code delivered with this product is only to be used by SAPs Support Services and may not be modified or altered in any way. Documentation in the SAP Service Marketplace You can find this documentation at the following address:
http://service.sap.com/instguides

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

Disclaimer Some components of this product are based on Java. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components.

Table of Contents
Foreword ................................................................................................................................................ 8 Runtime Library Improvements ............................................................................................................... 8 Terminology .......................................................................................................................................... 10 Test ................................................................................................................................................... 10 Component ....................................................................................................................................... 10 Consolidated Component .................................................................................................................. 10 Process Flow Analyzer ....................................................................................................................... 10 SAP Test Acceleration and Optimization Object Spy ........................................................................... 11 Runtime Library Concepts...................................................................................................................... 13 Uniform Resource Identifier .............................................................................................................. 13 SAP Test Acceleration and Optimization Execution Context ............................................................... 15 Encoded Characters ........................................................................................................................... 17 Runtime Library Features ...................................................................................................................... 18 CBASE Configuration.......................................................................................................................... 18 Configuration Properties ....................................................................................................................... 18 Test Acceleration and Optimization Reports ...................................................................................... 20 SAP Front End SAP Test Acceleration and Optimization Libraries......................................................... 22 CBASE ................................................................................................................................................ 22 Runtime Initialization ..................................................................................................................... 23 Bootstrap Library ........................................................................................................................... 23 Core Libraries ................................................................................................................................ 24 SAP Front End Test Acceleration and Optimization Components ......................................................... 28 Overview ........................................................................................................................................... 28 Component Categories .......................................................................................................................... 28 Standard Component Behavior .......................................................................................................... 28 Component Category: Actions ........................................................................................................... 29 Component Category: Controls .......................................................................................................... 30 Action Components ............................................................................................................................... 34 Actions\CaptureScreen .................................................................................................................. 34

SAP TAO Runtime Library

Actions\CheckTransactionCode...................................................................................................... 34 Actions\CloseWindow.................................................................................................................... 35 Actions\EndTransaction ................................................................................................................. 35 Actions\InitializeContext ................................................................................................................ 35 Actions\LaunchAndLogin ............................................................................................................... 36 Actions\LogOff............................................................................................................................... 37 Actions\PressKey ........................................................................................................................... 37 Actions\StartTransaction ............................................................................................................... 38 Actions\DataTable\SetDataTable ................................................................................................... 39 Actions\ DataTable\SetDataTableRow ........................................................................................... 39 Actions\DataTable\TransferData ................................................................................................... 39 Actions\Report\ReportMessage..................................................................................................... 41 Actions\Verifications\SetCondition ................................................................................................ 41 Actions\Verifications\RemoveCondition ........................................................................................ 43 Generic Components ............................................................................................................................. 43 Controls\GetProperty .................................................................................................................... 43 Controls\GetText ........................................................................................................................... 44 Controls\SetFocus.......................................................................................................................... 45 Controls\SetProperty ..................................................................................................................... 46 Controls\SetText ............................................................................................................................ 46 Control-Specific Components ................................................................................................................ 48 Controls\GuiButton\Press.............................................................................................................. 48 Controls\GuiCheckbox\GetSelected ............................................................................................... 48 Controls\GuiCheckbox\SetSelected ............................................................................................... 49 Controls\GuiComboBox\GetKey..................................................................................................... 49 Controls\GuiComboBox\GetValue ................................................................................................. 50 Controls\GuiComboBox\SetKey ..................................................................................................... 50 Controls\GuiComboBox\SetValue .................................................................................................. 51 Controls\GuiGridView\ClearSelection ............................................................................................ 52 2010 SAP AG Page 4 of 94

SAP TAO Runtime Library

Controls\GuiGridView\ClickCurrentCell.......................................................................................... 52 Controls\GuiGridView\DeleteRows ................................................................................................ 52 Controls\GuiGridView\DeselectColumn ......................................................................................... 53 Controls\GuiGridView\DoubleClickCurrentCell .............................................................................. 53 Controls\GuiGridView\DuplicateRows ........................................................................................... 53 Controls\GuiGridView\GetCellCheckBoxChecked ........................................................................... 54 Controls\GuiGridView\GetCellState ............................................................................................... 55 Controls\GuiGridView\GetCellValue .............................................................................................. 56 Controls\GuiGridView\InsertRows ................................................................................................. 57 Controls\GuiGridView\ModifyCell.................................................................................................. 57 Controls\GuiGridView\ModifyCheckBox ........................................................................................ 58 Controls\GuiGridView\MoveRows ................................................................................................. 58 Controls\GuiGridView\PressButton ............................................................................................... 59 Controls\GuiGridView\PressColumnHeader ................................................................................... 59 Controls\GuiGridView\PressEnter.................................................................................................. 60 Controls\GuiGridView\PressF1 ...................................................................................................... 60 Controls\GuiGridView\PressF4 ...................................................................................................... 60 Controls\GuiGridView\PressToolbarMenuItem .............................................................................. 61 Controls\GuiGridView\SelectAll ..................................................................................................... 61 Controls\GuiGridView\SelectColumn ............................................................................................. 62 Controls\GuiGridView\SelectContextMenuItem ............................................................................ 62 Controls\GuiGridView\SetCurrentCell ............................................................................................ 63 Controls\GuiGridView\SetSelectedRows ........................................................................................ 63 Controls\GuiMenu\Select .............................................................................................................. 64 Controls\GuiPasswordField\SetSecureText .................................................................................... 64 Controls\GuiRadioButton\GetSelected .......................................................................................... 65 Controls\GuiRadioButton\SetSelected ........................................................................................... 65 Controls\GuiStatusBar\GetMessageParameter .............................................................................. 66 Controls\GuiStatusBar\GetMessageParameters............................................................................. 66 2010 SAP AG Page 5 of 94

SAP TAO Runtime Library

Controls\GuiStatusBar\GetMessageType ....................................................................................... 67 Controls\GuiTab\Select.................................................................................................................. 69 Controls\GuiTabStrip\GetSelectedTab ........................................................................................... 69 Controls\GuiTableControl\GetCellData .......................................................................................... 70 Controls\GuiTableControl\SetCellData........................................................................................... 70 Controls\GuiTableControl\IsRowSelected ...................................................................................... 71 Controls\GuiTableControl\SelectRow ............................................................................................ 71 Controls\GuiTextEdit\DoubleClick.................................................................................................. 72 Controls\GuiTextEdit\PressF4 ........................................................................................................ 72 Controls\GuiToolbarControl\PressButton ...................................................................................... 73 Controls\GuiToolbarControl\PressContextButton .......................................................................... 73 Controls\GuiToolbarControl\SelectContextMenuItem ................................................................... 73 Controls\GuiTree\ChangeCheckbox ............................................................................................... 74 Controls\GuiTree\ClickLink ............................................................................................................ 74 Controls\GuiTree\CollapseNod ...................................................................................................... 76 Controls\GuiTree\DoubleClickItem ................................................................................................ 76 Controls\GuiTree\DoubleClickNode ............................................................................................... 77 Controls\GuiTree\ExpandNod ........................................................................................................ 77 Controls\GuiTree\GetCheckBoxState ............................................................................................. 78 Controls\GuiTree\PressButto ......................................................................................................... 78 Controls\GuiTree\SelectColum ...................................................................................................... 79 Controls\GuiTree\SelectContextMenuItem .................................................................................... 79 Controls\GuiTree\SelectIte ............................................................................................................ 80 Controls\GuiTree\SelectNod .......................................................................................................... 80 Controls\GuiTree\SetCheckBoxStat ............................................................................................... 82 Controls\GuiTree\UnselectAll ........................................................................................................ 82 Controls\GuiTree\UnselectColumn ................................................................................................ 84 Controls\GuiTree\UnselectNode.................................................................................................... 84 Advanced Concepts ............................................................................................................................... 86 2010 SAP AG Page 6 of 94

SAP TAO Runtime Library

Debugging the CBASE ........................................................................................................................ 86 Uploading the libraries to HP Quality Center .................................................................................. 86 Declaring the Libraries in the Application Area ............................................................................... 87 Modifying the Application Area with HP QuickTest Professional .................................................... 87 Starting a Debug Session................................................................................................................ 90 Putting a Breakpoint in a Library .................................................................................................... 92 Appendix ............................................................................................................................................... 93 SAP GuiScripting Type ........................................................................................................................ 93

2010 SAP AG

Page 7 of 94

SAP TAO Runtime Library

Foreword
The runtime library of SAP Test Acceleration and Optimization 2.0 (SP02) contains a new set of libraries and components, which have been designed to exploit the capabilities of the well-defined SAP GuiScripting API.

SAP GuiScripting API


The SAP GuiScripting API is accessible through COM objects. At runtime, the API shows a model of objects representing the SAP GUI as a hierarchy of SAP controls. SAP Test Acceleration and Optimization 2.0 interacts directly with the SAP GUI controls, through their public interface. With this new approach, the automation of tests is more stable, because: Each SAP Test Acceleration and Optimization component matches a well-defined method of the SAP GuiScripting API. It supports complex SAP GUI controls, which are also known as ALV controls. No additional layer is required for SAP GUI scenarios. The HP add-in for SAP GUI is only required to support password encryption of QTP encoder.

Runtime Library Improvements


Other aspects of the runtime library have also been improved. The list below summarizes the main improvements. The tests are not sensitive to minor UI changes. The controls are no longer retrieved using their label or their index. The tests are not sensitive to the user language. o A scenario can be recorded in Japanese and played back without any manual changes. o A scenario recorded in English can be played back in Japanese, if the SAP Front End settings are properly defined. The runtime library supports cross-transaction scenarios. o The PFA (process flow analyzer) can record a complete business flow and generate the corresponding test, in one shot. Better handling of runtime errors o The test execution can be stopped on the first error, to make it easier to troubleshoot the problem. o The SAP Test Acceleration and Optimization report provides appropriate feedback to the tester when the test fails.

2010 SAP AG

Page 8 of 94

SAP TAO Runtime Library

The SAP Test Acceleration and Optimization components can store information in the SAP Test Acceleration and Optimization Execution Context. This makes it easier to test complex scenarios, in which the result of a first transaction is the input to the next one. The performance of tests has been improved. Performance is stable even if the test is not synchronized, for example, the execution context is not the expected one.

2010 SAP AG

Page 9 of 94

SAP TAO Runtime Library

Terminology
Test
A test is an entity persisted in HP Quality Center. The tests generated by SAP Test Acceleration and Optimization are composite objects, containing: a set of components a list of input parameters a Microsoft Excel file providing the input parameter values (also known as the data table)

Component
A Component is an entity persisted in HP Quality Center. SAP Test Acceleration and Optimization delivers a set of default components that are to be exported (uploaded) to the HP Quality Center repository. Each SAP Test Acceleration and Optimization component contains VB script coding to call the relevant component implementation in the SAP Test Acceleration and Optimization Runtime Library.

Consolidated Component
The consolidation of components is an SAP Test Acceleration and Optimization concept to merge all components used by a test into a single component. The goal of the consolidation is: To improve the reusability of test scenarios. Each consolidated component can be reused in other test scenario with different parameters. To improve the performance of the test by getting rid of the QTP initialization overhead.

Process Flow Analyzer


The PFA is one of the main features of SAP Test Acceleration and Optimization. It records a scenario using the SAP GUI application , and generates the corresponding test in HP Quality Center. The resulting test is built by aggregating the SAP Test Acceleration and Optimization components of the recorded user interaction.

2010 SAP AG

Page 10 of 94

SAP TAO Runtime Library

SAP Test Acceleration and Optimization Object Spy


The SAP Test Acceleration and Optimization Object Spy is a tool, which provides detailed information about the SAP GUI Controls. Object Spy is typically used to identify a control.

Spying on a Control with Object Spy


Object Spy lets you select the SAP Logon session and you can then spy on the SAP GUI Window by pressing the Spy button. You can then move the mouse over the SAP GUI Controls, to highlight one. A red box surrounds the control that is pointed to by the mouse cursor. You can click on it to get the control attributes displayed in the properties panel of the Object Spy.

Example of the selection of the toolbar bound to a GuiGridView control.

2010 SAP AG

Page 11 of 94

SAP TAO Runtime Library

Control Properties in SAP Test Acceleration and Optimization Object Spy


The properties of the selected control are displayed in a table. For composite controls (containers with child controls) the table may also include additional information about the child controls.

2010 SAP AG

Page 12 of 94

SAP TAO Runtime Library

Runtime Library Concepts


Uniform Resource Identifier
In an application based on the SAP GUI technology, each control displays properties such as its name, label, and location (x/y). In a perfect world, the name of the control would uniquely identify the control, but this is unfortunately not the case, because in which several controls have the same name in some screens. In previous releases, naming conflicts were resolved with an index. The drawback of this concept is that control identification is then very sensitive to UI changes made by the application developer. It is also difficult to determine this index, because no property displays this information in the SAP GuiScripting API. To address this issue, the runtime library relies on the uniform resource identifier (URI) as the unique identifier of the control targeted by a user interaction. The URI comprises several control properties. Use the Object Spy to retrieve this information.

URI Syntax:
The URI is composed of key or value pairs, separated by a semicolon and a space character. For example label=<controlLabel>; type=<controlType>; id=<controlId> A typical URI provides the ID of the control and its type. The ID is used to search for the control using the official SAP GuiScripting API. The type is used to ensure that the object found matches the expected one. If this is not the case, the test reports an error. Additional information is not mandatory. The label can be specified, to improve the feedback written to the SAP Test Acceleration and Optimization report when an error occurs during the test. As an alternative to the ID, the URI can provide the name of the control, as shown below: label=<controlLabel>; type=<controlType>; name=<controlName> This is not the recommended way to identify a control, because a naming conflict may occur. The syntax is only supported for backward compatibility.

Examples of valid URI:


label=Main Window; type=GuiMainWindow; id=/app/con[3]/ses[0]/wnd[0] label=Main Window; type=GuiMainWindow; id=wnd[0] 2010 SAP AG Page 13 of 94

SAP TAO Runtime Library

The ID can be relative. Providing a full ID (with information about the connection and the session) is supported by the runtime library.

Getting the Control URI


The Uniform Resource Identifier is the information required to identify a targeted control when using SAP Test Acceleration and Optimization components. The information is available in the SAP Test Acceleration and Optimization Object Spy, like any other property. The advantage of using the SAP Test Acceleration and Optimization Object Spy to retrieve the information is that the tool provides a well-formed URI by encoding special characters. You can copy and paste the URI by selecting the line in the table.

2010 SAP AG

Page 14 of 94

SAP TAO Runtime Library

SAP Test Acceleration and Optimization Execution Context


When running a test in HP Quality Center, there is no simple way of sharing information between two consecutive components. Each component is executed with its own QTP execution context, and the regular environment object (from QTP) only contains a few properties about the test being performed. The purpose of the SAP Test Acceleration and Optimization execution context is to store information in a shared memory, and make it available to subsequent components. This makes it easier to test complex business scenarios, in which the result of a first component is the input to the next ones. In previous SAP Test Acceleration and Optimization releases, the information shared by components was put in OS Environment Variables like the one below FF_QTP_DataTable_Path=C:\SAPTAO\DATA\Order2Cash.xls This is no longer the case when running a test based on SAP Test Acceleration and Optimization 2.0 SP02. The equivalent of those OS Environment variables is now stored in the Test Acceleration and Optimization Execution Context.

Variables
With SAP Test Acceleration and Optimization 2.0 SP02, the Test Acceleration and Optimization execution context can be populated with computed values. The typical use case is to dynamically create a variable, in which the result of a scenario is stored and made it available to subsequent components. For example, the business scenario could be to use the VA21 transaction to create a quotation, and use the ID of the newly-created quotation in the VA01 transaction to create a sales order. This typical scenario can be automated using the GuiStatubar or GetMessageParameters component. This component retrieves the parameter values of the status ba,r and stores them in variables that are prefixed by the transaction code. For instance the status bar of the VA21 transaction creates the following variables: VA21_MessageStatus VA21_MessageParameter0 VA21_MessageParameter1 The next component will be able to retrieve the value from SAP Test Acceleration and Optimization execution context by using the corresponding token as input parameter. The tokens matching the variables created by the VA21 transaction are: %VA21_MessageStatus% 2010 SAP AG Page 15 of 94

SAP TAO Runtime Library

%VA21_MessageParameter0% %VA21_MessageParameter1%

The information retrieved from the GuiStatusbar is visible in the SAP Test Acceleration and Optimization report, as shown below:

The runtime library resolves the value of each component parameter by replacing each token with the value of the corresponding variable.

Getting values from SAP GUI Controls


As a general rule, all components that get values from SAP GUI controls can persist their result in the SAP Test Acceleration and Optimization execution context. These components have a TargetField parameter specifying where to persist the information. Testers can persist the information in the Microsoft Excel sheet attached to the test, or in the SAP Test Acceleration and Optimization execution context. The logic to determine where to persist the value is: The value is put in the corresponding column of the Microsoft Excel file when the DT_ prefix is used (the prefix can be changed in the SAP Test Acceleration and Optimization configuration) The value is put in the SAP Test Acceleration and Optimization execution context if the prefix is not used Example of TargetField: DT_orderType - Because of the DT_ prefix, this updates the corresponding cell in the Excel sheet. orderType No prefix is used, this creates a variable in the SAP Test Acceleration and Optimization execution context the token to retrieve it is then %orderType%.

2010 SAP AG

Page 16 of 94

SAP TAO Runtime Library

Tokens
Some tokens are SAP Test Acceleration and Optimization keywords that can be used to dynamically retrieve information about the execution context. Standard SAP Test Acceleration and Optimization tokens: %activeWindow% - the index of the current window 0 for the main window %today% - the current date %yesterday% - yesterdays date %tomorrow% - tomorrows date %random% - a random number %windowType% - the type of the active window %windowTitle% - the window title %screenNumber% - the screen number of the current SAP GUI session %transactionCode% - the current transaction code %sessionNumber% - the current SAP GUI session number

Encoded Characters
The percent character is used to detect SAP Test Acceleration and Optimization tokens, so the % character itself must be encoded, to avoid conflicts during the resolution of the parameter values. Other character may also require encoding. Encoded characters: %percent% - the % character %quote% - the quote character ( ) %cr% - the carriage return character CHR(13) %lf% - the line feed character CHR(10) %crlf% - the consecutive CR LF characters CHR(13)+CHR(10) %blank% - an empty string to distinguish a parameter not set (Null), from an explicit empty string. %space% - a space character to avoid trimming the parameter values.

2010 SAP AG

Page 17 of 94

SAP TAO Runtime Library

Runtime Library Features


CBASE Configuration
Some features of the runtime library can be configured in the CBASE.Config file. The RTL configuration is a simple XML file located at <FF_ROOT_PATH>\CBASE\CBASE.Config.

Configuration Properties

Property Name OBJ_HIGHLIGHT

Description

Default Value FALSE

When true, the SAP GUI object targeted by the current action is highlighted before performing the action. ENABLE_STATUS_WINDOW Obsolete When true, the Notepad application displays the execution steps. ENABLE_TAO_REPORT When true, the test generates an SAP Test Acceleration and Optimization report. This report provides feedback to the user, and helps to troubleshoot the test. ENABLE_DEBUG_LOG Activates the debug traces to help troubleshoot the test. ENABLE_QC_REPORT Enable/Disable QC Reporting features. ENABLE_CAPTURE_SCREEN Set this option to FALSE to turn off all screenshot captures. ENABLE_CAPTURE_SCREEN_ON_ERROR When an error is raised, a screenshot of the current screen is captured and added to the Test Acceleration and Optimization Report. 2010 SAP AG Page 18 of 94 TRUE TRUE TRUE TRUE TRUE FALSE

SAP TAO Runtime Library

ENABLE_SCROLL_ON_CAPTURE_SCREEN Set this option to TRUE to get several screenshots when the window has vertical scroll bars. DEBUG_ON When true, a breakpoint is added on the Test Acceleration and Optimization exception handler, to DEBUG the component.

FALSE

FALSE

2010 SAP AG

Page 19 of 94

SAP TAO Runtime Library

Test Acceleration and Optimization Reports


The runtime library can generate an SAP Test Acceleration and Optimization report for each test execution. The generated Test Acceleration and Optimization reports are stored at <FF_ROOT_PATH>Logs. There is a subfolder per test execution, at that location. The name of the subfolder depends on how the script was started. The BusinessProcess prefix is used when the test is run from HP Quality Center The BusinessComponent prefix is used when a component is executed directly from QuickTest Professional. The content of the folder differs according to the RTL configuration. In the default configuration, the folder contains:

DEBUGLOG.TXT The trace of the test execution REPORTLOG.XML The generated Test Acceleration and Optimization Report with a status of each step performed during the test execution LOG.XSLT A style sheet to display the SAP Test Acceleration and Optimization report in a browser The images subfolder may contain the screenshots captured during the test execution. 2010 SAP AG Page 20 of 94

SAP TAO Runtime Library

Example of Test Acceleration and Optimization Report


Double click on the ReportLog.xml file to display it in your browser.

2010 SAP AG

Page 21 of 94

SAP TAO Runtime Library

SAP Front End SAP Test Acceleration and Optimization Libraries


CBASE
The CBASE library is a set of VB scripts delivered with SAP Test Acceleration and Optimization. After the SAP Test Acceleration and Optimization set-up, the FF_ROOT_PATH environment variable contains the location of the CBASE. The initialization of the SAP Test Acceleration and Optimization components relies on the FF_ROOT_PATH variable to load the VB scripts located there. Core libraries are located at <FF_ROOT_PATH>CBASE Libraries dedicated to SAP GUI controls are located at <FF_ROOT_PATH>CBASE\Libraries Obsolete Libraries are at <FF_ROOT_PATH>CBASE\ObsoleteLibraries SAP Support may provide some hot fixes, and they are put <FF_ROOT_PATH>CBASE\HotFixes SAP Test Acceleration and Optimization Self-Check The configuration of the CBASE is a prerequisite of test automation with SAP Test Acceleration and Optimization. Use the Self-Check to verify that the SAP Test Acceleration and Optimization set-up is consistent. The FF_ROOT_PATH must end with a backslash.

at

2010 SAP AG

Page 22 of 94

SAP TAO Runtime Library

Runtime Initialization
At runtime, the component initialization automatically loads the core libraries that are declared in the SAP Test Acceleration and Optimization configuration. The prerequisite is to upload the CBASE_Init.vbs.txt file to HP Quality Center at [Test Plan]\Subject\BPT Resources\Libraries\CBASE_Init.vbs.txt.

BPT Resources Content in HP Quality Center

Note
All SAP Test Acceleration and Optimization components rely on the CBASE_Init.vbs.txt file. The component name starts with ExecuteFile "[QualityCenter] Subject\BPT Resources\Libraries\CBASE_Init.vbs.txt". Depending on the HP Quality Center, it may be necessary to create this path manually.

Bootstrap Library
CBASE_init.vbs.txt is the entry point to the runtime library initialization. The initialization steps are performed by the bootstrap library CBASE\CBASE_Bootstrap.vbs. 2010 SAP AG Page 23 of 94

SAP TAO Runtime Library

This bootstrap library is responsible for: Reading the CBASE.Config file Initializing the SAP Test Acceleration and Optimization execution context Loading all other core libraries Initializing the log & traces Initializing the SAP Test Acceleration and Optimization report

Core Libraries
The core libraries are compatible with SAP Test Acceleration and Optimization 1.0, and SAP Test Acceleration and Optimization 2.0 SP1. These libraries support existing tests built on the components of the previous runtime library. They are not used any more by the test generated by the PFA, except for some core features like logging and reporting. CBASE_Foundation_DT.vbs CBASE_Foundation_Reports.vbs CBASE_Foundation_Utilities.vbs CBASE_SAP_47_Gets.vbs CBASE_SAP_47_Lib.vbs CBASE_SAP_47_Verifications.vbs CBASE_SAP_47_Wrappers.vbs CBASE_TAO_47_Wrappers.vbs

Interface to SAP GuiScripting


A new set of libraries is shipped with SAP Test Acceleration and Optimization 2.0 SP02. Those libraries provide core SAP Test Acceleration and Optimization features, to interface the SAP Test Acceleration and Optimization components to the SAP GuiScripting API. GS_Kernel.vbs Core GUI Scripting Objects features GS_Actions.vbs Component face of common SAP GUI actions GS_Common.vbs Common functions for component parameter resolution GS_DataSource.vbs Initialization of the QTP DataTable object GS_Utilities.vbs Common functions to resolve the URI

2010 SAP AG

Page 24 of 94

SAP TAO Runtime Library

Obsolete Libraries
Some libraries are no longer recommended because they provided features not officially supported by SAP Test Acceleration and Optimization. They have been moved into a dedicated subfolder, and they are no longer loaded when using the default CBASE configuration. CBASE_Init.vbs When loaded, this LIB informs you that the SAP Test Acceleration and Optimization setup is not correct ObsoleteLibraries\CBASE_Foundation_Global.vbs ObsoleteLibraries\ CBASE_Foundation_Wrappers.vbs ObsoleteLibraries\ CBASE_Obsolete.vbs ObsoleteLibraries\ CBASE_WEB_Gets.vbs

2010 SAP AG

Page 25 of 94

SAP TAO Runtime Library

Hot Fixes
When a problem is detected in the runtime library, the official way to fix it is to wait for the next patch of SAP Test Acceleration and Optimization. The HotFixes subfolder has been introduced because this sometimes takes too long. This folder is used by SAP support to deliver hot fixes which are not yet available as a patch. This library is delivered empty with official SAP Test Acceleration and Optimization releases. You should not change this folder manually.

Custom Functions
Customer scenarios may require features that are not supported by the runtime library. In such a situation, put the custom coding in a dedicated library which is loaded by default and delivered empty in official SAP Test Acceleration and Optimization releases. Use a customer-specific prefix when adding new features in this library, to avoid naming conflicts with existing functions and global variables. Do not use this library to override existing functions. The official way to correct an existing function is to contact SAP support and get a hot fix which has to be deployed using the CBASE_HotFixes.vbs library.

Control Libraries
With the new runtime library, the SAP Test Acceleration and Optimization components are only a view of the underlying SAP GuiScripting API. Each component matches one of the public methods (or properties) shown by the SAP GUI controls. The libraries containing the invocation of the targeted COM objects are: GS_GuiButton.vbs GS_GuiCheckBox.vbs GS_GuiComboBox.vbs GS_GuiGridView.vbs GS_GuiGridView_Impl.vbs GS_GuiMenu.vbs GS_GuiPasswordField_Impl.vbs GS_GuiRadioButton.vbs GS_GuiStatusbar.vbs GS_GuiStatusbar_Impl.vbs GS_GuiTab.vbs 2010 SAP AG Page 26 of 94

SAP TAO Runtime Library

GS_GuiTableControl.vbs GS_GuiTableControl_Impl.vbs GS_GuiTabStrip_Impl.vbs GS_GuiTextedit.vbs GS_GuiToolbarControl.vbs GS_GuiToolbarControl_Impl.vbs GS_GuiTree.vbs GS_GuiTree_Impl.vbs GS_GuiVComponent.vbs

Note
Some controls, such as GuiTree, have two libraries. This is because the generated code had to be change manually, to make it compliant with the SAP GuiScripting recorded event. For example, it is not possible to click on an item of a context menu without opening the menu first. The generated libraries have been changed to take care of such situations.

Libraries On-Demand
Unlike core libraries, the control libraries are not loaded at script initialization, to improve the QTP performance and avoid the load of unused VB script coding. Each component loads the required library using the ImportType statement. For instance, the GuiButton\Press component imports the GuiButton libraries.
' TAO Component: GuiButton - Press ExecuteFile "[QualityCenter] Subject\BPT Resources\Libraries\CBASE_Init.vbs.txt" ImportType "GuiButton"

Uri=GetParameterValue("Uri") GuiButton_Press Uri

2010 SAP AG

Page 27 of 94

SAP TAO Runtime Library

SAP Front End Test Acceleration and Optimization Components


Overview
The runtime library of SAP Test Acceleration and Optimization 2.0 SP02 contains a new set of components that interact directly with the SAP GuiScripting API. The new components are delivered in a dedicated SAP Front End folder.

Component Categories
We distinguish several categories of components. Each category has subfolders, in which components are grouped by their nature. Components of the Actions category perform SAP GUI-specific operations like starting a transaction. Components of the Controls category target a specific control like a button or a text field.

Standard Component Behavior


To make it maintainable, the runtime library tries to apply the same logic to all components. For example: The same exception handling is used to provide comprehensive feedback to the user when an exception occurs. All components targeting a SAP GUI control rely on a URI. All get components store the retrieved value in the QTP Data Table or in the SAP Test Acceleration and Optimization execution context. The resolution of the component parameters always supports Test Acceleration and Optimization-specific tokens.

Get Component Behavior


Get components get information from SAP GUI controls. Most of the components get values using a public property of the targeted object. The purpose of get components is to: Check a value against the expected one 2010 SAP AG Page 28 of 94

SAP TAO Runtime Library

Make the information available to subsequent components

Expected Value
Get components have an ExpectedValue parameter. When this parameter is specified, the runtime library checks whether the retrieved value matches the expected one. If this is not the case, the test reports an error No check is performed when the parameter is empty The %blank% token checks against an empty string

Target Field
Get components also have a TargetField parameter. When this parameter is specified, the retrieved value is persisted to make it available to subsequent components. If the DT_ prefix is used, both QTP Data Table and the corresponding Microsoft Excel sheet are updated. If the DT_ prefix is not used, a variable is created and its value is persisted in the SAP Test Acceleration and Optimization execution context. The variable will be accessible by subsequent components by tokens. For more information on variables, see SAP Test Acceleration and Optimization Execution Context on page 15.

Component Category: Actions


Components in the Actions category are: CaptureScreen CheckTransactionCode CloseWindow EndTransaction InitializeContext LaunchAndLogin LogOff PressKey

Actions\Data Source
SetDataSource SetDataSourceCursor TransferData 2010 SAP AG Page 29 of 94

SAP TAO Runtime Library

Actions\Report
ReportMessage

Actions\Verification
SetCondition RemoveCondition

Component Category: Controls


The root folder contains generic components that can be used in any SAP GUI control. Components that are control-specific are in a dedicated subfolder. The name of the subfolder matches the control type as shown by the SAP GuiScripting API. List of components in the Controls category: GetProperty GetText SetFocus SetProperty SetText

Controls\GuiButton
Press

Controls\GuiCheckBox
GetSelected SetSelected

Controls\GuiComboBox
GetKey GetValue SetKey SetValue

Controls\GuiGridView
ClearSelection ClickCurrentCell DeleteRows 2010 SAP AG Page 30 of 94

SAP TAO Runtime Library

DeselectColumn DoubleClickCurrentCell DuplicateRows GetCellCheckBoxChecked GetCellState GetCellValue InsertRows ModifyCell ModifyCheckBox MoveRows PressButton PressColumnHeader PressEnter PressF1 PressF4 PressToolbarContextMenuItem SelectAll SelectColumn SelectContextMenuItem SetCurrentCell SetSelectedRows

Controls\GuiMenu
Select

Controls\GuiPasswordField
SetSecureText

Controls\GuiRadioButton
GetSelected SetSelected

Controls\GuiStatusbar
GetMessageParameter GetMessageParameters GetMessageType 2010 SAP AG Page 31 of 94

SAP TAO Runtime Library

Controls\GuiTab
Select

Controls\GuiTableControl
GetCellData SelectedRow SelectRow SetCellData

Controls\GuiTabStrip
GetSelectedTab

Controls\GuiTextedit
DoubleClick PressF4

Controls\GuiToolbarControl
PressButton PressContextButton SelectContextMenuItem

Controls\GuiTree
ChangeCheckbox ClickLink CollapseNode DoubleClickItem DoubleClickNode ExpandNode GetCheckBoxState PressButton SelectColumn SelectContextMenuItem SelectItem SelectNode SetCheckBoxState 2010 SAP AG Page 32 of 94

SAP TAO Runtime Library

UnselectAll UnselectColumn UnselectNode

2010 SAP AG

Page 33 of 94

SAP TAO Runtime Library

Action Components
Actions\CaptureScreen The CaptureScreen component is captures a screenshot of the active window of the SAP GUI session. The persisted screenshot will be visible in the SAP Test Acceleration and Optimization report. Default screenshot format is PNG Default location for screenshot is <FF_ROOT_PATH>Logs\<TestName>\Images

Component Parameters
OPTIONS Reserved for future use

Component Configuration
You can enable or disable the capture of screenshots using the CBASE configuration.

Known Limitations
The screenshot capture is done using the Hardcopy method of the SAP GuiScripting API. This method does not work properly when the computer is locked, or the screen saver is running.

Actions\CheckTransactionCode The CheckTransactionCode component checks whether the current transaction is the one expected by the scenario being tested. The check result is in the SAP Test Acceleration and Optimization Report. The test status is PASSED when the transaction is the correct one Otherwise the test status is FAILED

Component Parameters
EXPECTEDTRANSACTIONCODE the expected transaction code

2010 SAP AG

Page 34 of 94

SAP TAO Runtime Library

OPTIONS /x (exit) Interrupts the component execution if the transaction is not the expected one /c (capture) Captures a screenshot of the active window if the transaction is not the expected one

Actions\CloseWindow The CloseWindow component is closes the specified window. It emulates a mouse click on the button to close a popup window.

Component Parameters
URI the URI of the targeted window. For more information, refer the URI syntax on page 13. OPTIONS Reserved for future use.

Actions\EndTransaction The EndTransaction component ends the current transaction.

Component Parameters
OPTIONS Reserved for future use.

Actions\InitializeContext The InitializeContext component initializes the SAP Test Acceleration and Optimization Execution Context. You must start your test composition with this component, to initialize all areas . There are three test initialization parameters. You can use their default values unless you need to modify the standard behavior.

2010 SAP AG

Page 35 of 94

SAP TAO Runtime Library

Component Parameters
TESTOPTIONS /n (for new) creates a new execution context This is the default. /c (for continue) preserves the previous execution context. This option is typically used to generate a single SAP Test Acceleration and Optimization report while using iterations in HP Quality Center. DATATABLEPATH the path to the Microsoft Excel file containing the values of the input parameters. The values in the Microsoft Excel file are loaded at component start-up, and made available using the DataTable object of QuickTest Professional.

DATATABLEROW the row from which to get input values. By default the value should be 1.

Known Limitation
The test initialization fails if the DataTablePath refers to a Microsoft Excel file which is not accessible, or is locked by another process.

Actions\LaunchAndLogin The LaunchAndLogin component initializes the SAP GUI session to be used by all subsequent components.

Component Parameters
SAPSYSTEM the SAP system to connect to. The component checks the SAPLOGON configuration for a matching entry and uses this data to create the connection. SAPCLIENT the client number.

2010 SAP AG

Page 36 of 94

SAP TAO Runtime Library

SAPUSER the name of the login user. SAPPASSWORD the password of the user. Make it secure using the QTP Password Encoder. SAPLANGUAGE the preferred language. For example, EN (for English) or JA (for Japanese). Test execution using QTP is sensitive to language-specific data formats. Use the language of the data in the DataTable. SAPOPTIONS /r (resize) Resizes the main window according to CBASE configuration.

Actions\LogOff The LogOff component logs off from the SAP System. This ends the SAP GUI Session.

Component Parameters
OPTIONS Reserved for future use

Actions\PressKey The PressKey component emulates the action made by the user while pressing a key.

Component Parameters
URI the Uniform Resource Identifier of the targeted window. For more information, see the URI syntax on page 13. KEY KEY specifies the key code pressed. The key code can be a numeric value or a string. Use the PFA to record the appropriate value. OPTIONS Reserved for future use

2010 SAP AG

Page 37 of 94

SAP TAO Runtime Library

Key Codes
The list below shows the mapping between the numeric key code and its equivalent string. Both formats can be used without any side-effects. The string representation of the key does not dependent on the user language. 0 1 2 3 9 10 11 12 13 14 15 24 37 38 39 Enter F1 F2 F9 F10 F11 ESC Shift+F1 Shift+F2 Shift+F12 Ctrl+Shift+F1 Ctrl+Shift+F2

Actions\StartTransaction The StartTransaction component starts a transaction. The session should have been started using the LaunchAndLogin component. If this is not the case, the operation is performed against the first available SAPGUI session.

Component Parameters
SAPTRANSACTIONCODE SAPTRANSACTIONCODE is the code of the transaction to be started. OPTIONS Reserved for future use

2010 SAP AG

Page 38 of 94

SAP TAO Runtime Library

Actions\DataTable\SetDataTable The SetDataTable component is used the data source of component parameters. Normally this operation is not necessary, because this declaration is also performed by the Actions\InitializeContext component.

Component Parameters
DATATABLEPATH the path to the Microsoft Excel file containing the values of the input parameters. The values in the Microsoft Excel file, are loaded at component startup and made available using the DataTable object of Quick Test Pro.

DATATABLEROW the row from which to get input values. By default, the value should be 1.

Known Limitation
An error occurs when the DataTablePath refers to an Microsoft Excel file which is not accessible, or is locked by another process.

Actions\ DataTable\SetDataTableRow This component changes the row from which to retrieve values from the QTP DataTable object. This information is also declared by the Actions\InitializeContext component.

Component Parameters
DATATABLEROW the row from which to get input values. By default, the value should be 1.

Actions\DataTable\TransferData The TransferData component copies information from the current data source to another.

Component Parameters
SOURCEFIELD the name of the field to be copied. It is the name of the column in the Microsoft Excel sheet. 2010 SAP AG Page 39 of 94

SAP TAO Runtime Library

TARGETPATH the path to the Microsoft Excel file to be updated. TARGETROW the row to be used in the targeted Microsoft Excel sheet. TARGETFIELD TARGETFIELD is the name of the column in the target Microsoft Excel sheet. It is optional. If empty, the SourceField is used.

Notes
This component is only for backward compatibility. It is better to pass information between components using variables, and put the information in the SAP Test Acceleration and Optimization Execution Context. For more information on variables, refer to page 15.

2010 SAP AG

Page 40 of 94

SAP TAO Runtime Library

Actions\Report\ReportMessage The ReportMessage component troubleshoots complex scenarios by adding custom messages to the SAP Test Acceleration and Optimization Report.

Component Parameters
SEVERITY The severity of the message INFO, WARNING, DONE, FAILED TOPIC A TOPIC is a short text to categorize the message. MESSAGE Any message can be specified here. OPTIONS Reserved for future use

Notes
Like all component parameters, the MESSAGE parameter can use tokens to retrieve the value of a variable from the SAP Test Acceleration and Optimization Execution Context. For instance, one could include the ID of an order created by transaction VA01, in a message, using the message below: Standard order %VA01_MessageParameter1% has been created

Actions\Verifications\SetCondition The SetCondition component declares a condition. The condition will be used by subsequent Test Components to determine whether they have to perform their operation.

Component Parameters
NAME A name to identify the condition any string can be used here 2010 SAP AG Page 41 of 94

SAP TAO Runtime Library

SAPCONDITION SAPCONDITION is an expression that is to be checked by subsequent test components. OPTIONS /o (only once) the condition will be checked only once.

Expression Evaluation
The SAPCONDITION parameter must provide a boolean expression which can be evaluated by the VB script interpreter. For example, one could declare a condition to check whether the current window is a popup, and thus ensure only performing the subsequent actions when the condition is met. A typical use case is to exit from a popup window which appears from time to time, depending on some external application events.

Postponing Token Evaluation


Like all component parameters, the SAPCONDITION parameter can use tokens to retrieve the value of a variable from the SAP Test Acceleration and Optimization Execution Context. However the token is resolved only once, when setting the condition, and not when checking it. This is not what is expected when setting conditions. To postpone the token interpretation, the SAPCONDITION parameter supports an alternative syntax, using the dollar character to encode tokens. Example: %activeWindow%=1 evaluation is done only once when setting the condition $activeWindow$=1 evaluation is postponed until the condition check. The token is evaluated (interpreted) each time the condition is used.

Expression Persistence
All declared conditions have a name. They are persisted in the SAP Test Acceleration and Optimization execution context, and by default made available during the entire test execution. The tester must use the Actions\Verifications \RemoveCondition component to remove a condition. The OPTIONS parameter can be set to /o to automatically remove the condition from the next component execution.

2010 SAP AG

Page 42 of 94

SAP TAO Runtime Library

Actions\Verifications\RemoveCondition The RemoveCondition component removes a condition that has been declared previously, using the Actions\Verifications\SetCondition component.

Component Parameters
NAME The name of a previously-declared condition OPTIONS /a (all) when the name is omitted the /a option removes all conditions at once.

Generic Components
Controls\GetProperty GetProperty is a generic component to retrieve the value of the properties of the targeted SAP GUI objects.

Component Parameters
URI URI specifies the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. PROPERTYNAME the name of the property whose value is to be retrieved. EXPECTEDVALUE the expected value. TARGETFIELD where to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

2010 SAP AG

Page 43 of 94

SAP TAO Runtime Library

Common SAP GuiControl Properties


The component can access all the public properties of the SAP GuiScripting API. Most of the properties are not relevant for test automation. Do not check language-dependent values. Examples of public properties: Text Tooltip LeftLabel RightLabel ID Name Type

Controls\GetText The GetText generic component gets the value of the targeted SAP GUI objects. This component is similar to the Controls\GetProperty component when Text is specified as PropertyName.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. EXPECTEDVALUE the expected value TARGETFIELD where to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

2010 SAP AG

Page 44 of 94

SAP TAO Runtime Library

Controls\SetFocus The SetFocus generic component puts the focus on the targeted SAP GUI objects. This operation is normally not necessary, because most of the other Sap GuiScripting operations are performed properly, even when the targeted control does not have the focus. However, some server coding may check whether the focus was set properly. In that situation, an explicit invocation of the SetFocus method might be necessary to make the test run properly.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13.

2010 SAP AG

Page 45 of 94

SAP TAO Runtime Library

Controls\SetProperty The SetProperty generic component sets the value of the targeted SAP GUI objects. This does not work on read-only properties.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, see the URI syntax on page 13. PROPERTYNAME the name of the public property shown by the object. THEVALUE the new value of the property.

Known Limitations
The value must match the format of the targeted SAP GUI Control. The runtime library does not check the format. For example, if the targeted control expects a date, the input parameter must provide the date in the appropriate format.

Controls\SetText The SetText generic component sets the value of any of the properties shown by the targeted SAP GUI objects. This is similar to the SetProperty component when Text is specified as PropertyName.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. THEVALUE the new value of the property.

2010 SAP AG

Page 46 of 94

SAP TAO Runtime Library

Known Limitations
The value must match the format of the targeted SAP GUI Control. The runtime library does not check the format. For example, if the targeted control expects a date, the input parameter must provide the date in the appropriate format.

Miscellaneous
This component is used by the Process Flow Analyzer. It makes text field assignments and assigns the cell value in a table control.

See Also
If the targeted control expects a Boolean value it is preferable to use the dedicated component, which converts the input value appropriately. Examples: GuiCheckbox/SetSelected the recommended way to change the state of a checkbox. GuiRadioButton/SetSelected the recommended way to change the state of a radio button.

2010 SAP AG

Page 47 of 94

SAP TAO Runtime Library

Control-Specific Components
Controls\GuiButton\Press The Press component emulates a click on the targeted button.

Component Parameters
URI the Uniform Resource Identifier of the target GuiButton object. For more information, refer to the URI syntax on page 13.

Controls\GuiCheckbox\GetSelected The GetSelected component gets the state of the target checkbox.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. EXPECTEDVALUE the expected state (True or False). TARGETFIELD where to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

2010 SAP AG

Page 48 of 94

SAP TAO Runtime Library

Controls\GuiCheckbox\SetSelected The SetSelected component changes the state of the target checkbox.

Component Parameters
URI URI specifies the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. THEVALUE the new state of the checkbox (True or False).

Note
No operation is performed if the specified value is empty.

Controls\GuiComboBox\GetKey The GetKey component gets the key of the selected entry.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, see the URI syntax on page 13. EXPECTEDVALUE the expected value of the key. TARGETFIELD where to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

2010 SAP AG

Page 49 of 94

SAP TAO Runtime Library

Controls\GuiComboBox\GetValue The GetValue component gets the value of the selected entry.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. EXPECTEDVALUE the expected value. TARGETFIELD where to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

Controls\GuiComboBox\SetKey The SetKey component selects one of the combobox entries

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. THEVALUE the key of the entry to be selected.

2010 SAP AG

Page 50 of 94

SAP TAO Runtime Library

Controls\GuiComboBox\SetValue The SetValue component selects one of the combobox entries. This component is not recommended because the behavior is language-dependent. The GuiCombobox\SetKey component should perform such an operation.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. THEVALUE the value of the entry to be selected.

2010 SAP AG

Page 51 of 94

SAP TAO Runtime Library

Controls\GuiGridView\ClearSelection The ClearSelection component clears the selection of the target grid.

Component Parameters
URI the Uniform Resource Identifier of the targeted control. For more information, refer to the URI syntax on page 13.

Controls\GuiGridView\ClickCurrentCell The ClickCurrentCell component emulates a mouse click on the current cell of the target grid.

Component Parameters
URI the Uniform Resource Identifier of the target control. For more information, refer to the URI syntax on page 13.

Note
The behavior of this component depends on the state of the target control. Set the current cell first, using the GuiGridView\SetCurrentCell component.

Controls\GuiGridView\DeleteRows The DeleteRows component deletes rows from the target grid.

Component Parameters
URI the Uniform Resource Identifier of the target control. For more information, refer to the URI syntax on page 13. ROWS a comma-separated string of indexes or index ranges, for example 3,5-8,14,15. The entries must be ordered and not overlap, or an exception is raised. 2010 SAP AG Page 52 of 94

SAP TAO Runtime Library

Controls\GuiGridView\DeselectColumn The DeselectColumn component removes the specified column from the set of selected columns.

Component Parameters
URI the Uniform Resource Identifier of the target control. For more information, refer to the URI syntax on page 13. COLUMN the name of the column.

Controls\GuiGridView\DoubleClickCurrentCell The DoubleClickCurrentCell component emulates a mouse double-click on the current cell of the target grid.

Component Parameters
URI the Uniform Resource Identifier of the target control. For more information, refer to the URI syntax on page 13.

Note
The behavior of this component depends on the state of the target control. Set the current cell first, using the GuiGridView\SetCurrentCell component.

Controls\GuiGridView\DuplicateRows The DuplicateRows component duplicates some rows of the target grid.

2010 SAP AG

Page 53 of 94

SAP TAO Runtime Library

Component Parameters
URI the Uniform Resource Identifier of the target control. For more information, refer to the URI syntax on page 13. ROWS a comma-separated string of indexes or index ranges, for example 3,5-8,14,15. A copy of the row will be inserted at the given index. If a range of indexes is duplicated, all the new lines are inserted as one block, before the old lines. The entries must be ordered and not overlap, or an exception is raised.

Controls\GuiGridView\GetCellCheckBoxChecked The GetCellCheckBoxChecked component gets the state of a checkbox in a grid.

Component Parameters
URI the Uniform Resource Identifier of the targeted control. For more information, refer to the URI syntax on page 13. ROW the row number of the checkbox. COLUMN the column name of the checkbox. EXPECTEDVALUE the expected state (True or False). TARGETFIELD the location to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

2010 SAP AG

Page 54 of 94

SAP TAO Runtime Library

Controls\GuiGridView\GetCellState The GetCellState component retrieves the state of a cell in a grid. According to the SAP GuiScripting documentation, the possible values are: Normal Error Warning Info

Component Parameters
URI the Uniform Resource Identifier of the target control. For more information, refer to the URI syntax on page 13. ROW the row number of the cell. COLUMN the column name of the cell. EXPECTEDVALUE the expected state. TARGETFIELD the location to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

2010 SAP AG

Page 55 of 94

SAP TAO Runtime Library

Controls\GuiGridView\GetCellValue The GetCellValue component gets the value of a cell in a grid.

Component Parameters
URI the Uniform Resource Identifier of the targeted control. For more information, refer to the URI syntax on page 13. ROW the row number of the cell. COLUMN the column name of the cell. EXPECTEDVALUE the expected state. TARGETFIELD where to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

2010 SAP AG

Page 56 of 94

SAP TAO Runtime Library

Controls\GuiGridView\InsertRows The InsertRows component inserts rows in the target grid.

Component Parameters
URI the Uniform Resource Identifier of the targeted control. For more information, refer to the URI syntax on page 13. ROWS a comma-separated text of indexes or index ranges, for example 3,5-8,14,15. A new row will be added at the given index, moving the old row one line down. If a range of indexes is inserted, all the new lines are inserted as one block, before any of the old lines. The entries must be ordered and not overlap, otherwise an exception is raised.

Controls\GuiGridView\ModifyCell The ModifyCell component modifies the value of a cell in a grid.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. ROW the row number of the cell. COLUMN the column name of the cell. THEVALUE the new value of the targeted cell.

2010 SAP AG

Page 57 of 94

SAP TAO Runtime Library

Controls\GuiGridView\ModifyCheckBox The ModigyCheckBox component modifies the state of a checkbox in a grid.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. ROW the row number of the cell COLUMN the column name of the cell CHECKED the new checkbox state (True or False)

Controls\GuiGridView\MoveRows The MoveRows component moves rows within a grid.

Component Parameters
URI URI specifies the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. FROMROW the index of the first row to move. TOROW the index of the last row to move. DESTROW where to move the selected rows to.

2010 SAP AG

Page 58 of 94

SAP TAO Runtime Library

Controls\GuiGridView\PressButton The PressButton component emulates a mouse click on a button in a cell. The component reports an error, if the targeted cell does not contain a button.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. ROW the row number of the cell. COLUMN the column name of the cell.

Controls\GuiGridView\PressColumnHeader The PressColumnHeader component emulates a mouse click on the header of the column.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. COLUMN the column name. The component reports an error, if the column parameter does not identify a valid column.

2010 SAP AG

Page 59 of 94

SAP TAO Runtime Library

Controls\GuiGridView\PressEnter The PressEnter component emulates pressing the Enter key.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, see the URI syntax on page 13.

Controls\GuiGridView\PressF1 The PressF1 component emulates pressing the F1 key.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13.

Controls\GuiGridView\PressF4 The PressF4 component emulates pressing the F4 key.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13.

2010 SAP AG

Page 60 of 94

SAP TAO Runtime Library

Controls\GuiGridView\PressToolbarMenuItem The PressToolbarMenuItem component emulates selecting an item in the context menu of a button in the toolbar attached to the target grid.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. BUTTONID the ID of the button. FUNCTIONCODE the menu item to be selected.

Recommendations
Use the Process Flow Analyzer to determine the expected values of the ButtonId and the FunctionCode. The SAP Test Acceleration and Optimization Object Spy also provides this information, but it might be difficult to find it on a complex UI.

Controls\GuiGridView\SelectAll The SelectAll component selects the whole grid content (all rows and all columns).

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13.

2010 SAP AG

Page 61 of 94

SAP TAO Runtime Library

Controls\GuiGridView\SelectColumn The SelectColumn component selects the specified column.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. COLUMN the column name. The component reports an error, if the column parameter does not identify a valid column.

Controls\GuiGridView\SelectContextMenuItem The SelectContextMenuItem component emulates selecting an item in the context menu of the target grid.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. FUNCTIONCODE FUNCTIONCODE specifies the menu item to be selected.

Note
Use the Process Flow Analyzer to determine the expected values of the FunctionCode. The SAP Object Spy also provides the information, but might be difficult to find it on a complex UI.

2010 SAP AG

Page 62 of 94

SAP TAO Runtime Library

Controls\GuiGridView\SetCurrentCell The SetCurrentCell component sets the current cell in a grid.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. ROW the row number of the cell. COLUMN the column name of the cell.

Note
If row and column identify a valid cell, this cell becomes the current cell. Otherwise, an exception is raised.

Controls\GuiGridView\SetSelectedRows The SetSelectedRows component selects rows in a grid.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. THEVALUE the rows to be selected.

Note
THEVALUE is a comma-separated list of row index numbers or index ranges, such as 1,2,4-8,10. Setting this property to an invalid string, or a string containing invalid row indexes, will raise an exception.

2010 SAP AG

Page 63 of 94

SAP TAO Runtime Library

Controls\GuiMenu\Select The Select component selects a menu.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13.

Controls\GuiPasswordField\SetSecureText The SetSecureTest component sets the value of a secure field.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. THEVALUE the encrypted value of the password. OPTIONS Reserved for future use

Note
This component supports password encryption using the QTP Password Encoder. The SapPassword used by the LaunchAndLogin component relies on the same encryption algorithm.

2010 SAP AG

Page 64 of 94

SAP TAO Runtime Library

Controls\GuiRadioButton\GetSelected The GetSelected component gets the state of the target radio button element.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. EXPECTEDVALUE the expected state (True or False). TARGETFIELD where to persist the retrieved value.

Note
This get component has standard behavior. See the expected value and the target field semantic on page 28.

Controls\GuiRadioButton\SetSelected The SetSelected component selects a radio button.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. THEVALUE the new state (True or False).

Note
No operation is performed if the specified value is empty.

2010 SAP AG

Page 65 of 94

SAP TAO Runtime Library

Controls\GuiStatusBar\GetMessageParameter The GetMessageParameter component gets the value of one of the message parameters of the Status Bar.

Component Parameters
URI the Uniform Resource Identifier of the target status bar. For more information, refer to the URI syntax on page 13. INDEX the index of the parameter (starting at 0). TARGETFIELD where to persist the retrieved value. For more information, refer to the target field semantic on page 28.

Controls\GuiStatusBar\GetMessageParameters The GetMessageParameters component gets the values of all message parameters in the status bar.

Component Parameters
URI the Uniform Resource Identifier of the target status bar. For more information, see the URI syntax on page 13. EXPECTEDMESSAGETYPE the expected message type. The possible message types are: S W E A I Success Warning Error Abort Information

2010 SAP AG

Page 66 of 94

SAP TAO Runtime Library

OPTIONS /s (save) Puts the message parameter values in the SAP Test Acceleration and Optimization Execution Context.

Note
When the ExpectedMessageType parameter is specified, the runtime library checks whether the retrieved value matches the expected one. If this is not the case, the test reports an error. Leave the parameter empty, to avoid checking the value With the /s option, all message parameters are put in the SAP Test Acceleration and Optimization execution context, to make the information available to subsequent components. This creates a dedicated variable per message parameter. The name of the variable is prefixed by the current transaction code. The subsequent component can retrieve the persisted values using the corresponding tokens: %VA21_MessageStatus% %VA21_MessageParameter0% %VA21_MessageParameter1%

Miscellaneous
The Process Flow Analyzer uses this component to persist the result of the last message of type Success (S). This is helpful for testing complex business scenarios, in which the result of the first transaction is an input parameter of the next one.

Controls\GuiStatusBar\GetMessageType The GetMessageType component gets the value of one of the MessageType properties in the status bar.

Component Parameters
URI the Uniform Resource Identifier of the target status bar. For more information, refer to the URI syntax on page 13. EXPECTEDVALUE the expected message type. 2010 SAP AG Page 67 of 94

SAP TAO Runtime Library

The possible message types are: S W E A I Success Warning Error Abort Information

TARGETFIELD where to persist the retrieved value. For more information, refer to the target field semantic on page 28.

Miscellaneous
The Process Flow Analyzer uses this component to ensure that the behavior of a test scenario is consistent at runtime. The runtime library assumes that the message type recorded by a PFA matches the message type that the component retrieves during the test. This check is made even if the initial message type was an error (E).

2010 SAP AG

Page 68 of 94

SAP TAO Runtime Library

Controls\GuiTab\Select The Select component selects a tab in a GuiTabstrip.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13.

Controls\GuiTabStrip\GetSelectedTab The GetSelectedTab component gets the index of the selected tab page in a GuiTabStrip.

Component Parameters
URI the Uniform Resource Identifier of the object. For more information, refer to the URI syntax on page 13. EXPECTEDVALUE the expected index. TARGETFIELD where to persist the retrieved value.

Note
This get component has standard behavior. Refer to the expected value and the target field semantic on page 28.

2010 SAP AG

Page 69 of 94

SAP TAO Runtime Library

Controls\GuiTableControl\GetCellData The GetCellData component gets the value of a cell in a table. This component only exists for convenience, and for backward compatibility to previous versions of tests generated by SAP Test Acceleration and Optimization 2.0. This operation can be performed by the generic Controls\GetText component

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. ROW the row number (starting at 0). COLUMN the column number (starting at 0). TARGETFIELD where to persist the retrieved value. For more information, refer to the target field semantic on page 28.

Controls\GuiTableControl\SetCellData The SetCellData component sets the value of a cell in a table. This component only exists for convenience, and for backward compatibility to previous versions of tests generated by SAP Test Acceleration and Optimization 2.0. This operation can be performed by the Controls\SetText generic component

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. ROW the row number (starting at 0). 2010 SAP AG Page 70 of 94

SAP TAO Runtime Library

COLUMN the column number (starting at 0). THEVALUE the new value of the cell.

Controls\GuiTableControl\IsRowSelected The IsRowSelected component determines whether the specified row is part of the current selection.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. INDEX the row number (starting at 0). TARGETFIELD where to persist the retrieved value. For more information, refer to the target field semantic on page 28.

Controls\GuiTableControl\SelectRow The SelectRow component selects or deselects the specified row.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. INDEX the row number (starting at 0). THEVALUE whether to select or unselect the row (True or False). For more information, refer to the target field semantic on page 28. 2010 SAP AG Page 71 of 94

SAP TAO Runtime Library

Controls\GuiTextEdit\DoubleClick The DoubleClick component emulates a mouse double click on a GuiTextEdit object.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13.

Controls\GuiTextEdit\PressF4 The PressF4 component emulates pressing the F4 key on a GuiTextEdit object.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13.

2010 SAP AG

Page 72 of 94

SAP TAO Runtime Library

Controls\GuiToolbarControl\PressButton The PressButton component emulates pressing a button in the target toolbar control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. ID the ID of the button to be pressed.

Controls\GuiToolbarControl\PressContextButton The PressContextButton component emulates pressing a context button in the target toolbar control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. ID the ID of the button to be pressed.

Controls\GuiToolbarControl\SelectContextMenuItem The SelectContextMenuItem component selects an item from the context menu of the target button in a toolbar control.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. ID the ID of the button to be pressed. 2010 SAP AG Page 73 of 94

SAP TAO Runtime Library

FUNCTIONCODE The function code of the item to be selected.

Controls\GuiTree\ChangeCheckbox The ChangeCheckbox component changes the state of a checkbox in a tree control.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. NODEID the iD of the tree node. COLUMNNAME the name of the column. THESTATE the new state of the targeted checkbox. OPTIONS Reserved for future use

Controls\GuiTree\ClickLink The ClickLink component emulates a mouse click on a link in a tree control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. COLUMNNAME the name of the column. 2010 SAP AG Page 74 of 94

SAP TAO Runtime Library

OPTIONS Reserved for future use

2010 SAP AG

Page 75 of 94

SAP TAO Runtime Library

Controls\GuiTree\CollapseNode The CollapseNode component collapses a tree node.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. OPTIONS Reserved for future use

Controls\GuiTree\DoubleClickItem The DoubleClickItem component emulates a mouse double click on an item in a tree control.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. COLUMNNAME the name of the column. OPTIONS Reserved for future use

2010 SAP AG

Page 76 of 94

SAP TAO Runtime Library

Controls\GuiTree\DoubleClickNode The DoubleClickNode component emulates a mouse double-click on a tree node.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. OPTIONS Reserved for future use

Controls\GuiTree\ExpandNode The ExpandNode component expands a tree node.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. OPTIONS Reserved for future use

2010 SAP AG

Page 77 of 94

SAP TAO Runtime Library

Controls\GuiTree\GetCheckBoxState The GetCheckBoxState component gets the state of a checkbox in a tree control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. COLUMNNAME the name of the column. EXPECTEDSTATE the expected state. For more information, refer to the expected value semantic on page 28. OPTIONS Reserved for future use

Controls\GuiTree\PressButton The PressButton component emulates pressing a button in a tree control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. COLUMNNAME the name of the column. OPTIONS Reserved for future use 2010 SAP AG Page 78 of 94

SAP TAO Runtime Library

Controls\GuiTree\SelectColumn The SelectColumn component selects a column of a tree control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. COLUMNNAME the name of the column. OPTIONS Reserved for future use

Controls\GuiTree\SelectContextMenuItem The SelectContextMenuItem component emulates selecting an item in the context menu of the target tree.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. FUNCTIONCODE the menu item to be selected. OPTIONS Reserved for future use

Note
Use the Process Flow Analyzer to determine the expected values of the FunctionCode.

2010 SAP AG

Page 79 of 94

SAP TAO Runtime Library

The SAP Object Spy also provides this information, but it might be difficult to find it on a complex UI.

Controls\GuiTree\SelectItem The SelectItem component selects an item in a tree control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. COLUMNNAME the name of the column. OPTIONS Reserved for future use

Controls\GuiTree\SelectNode The SelectNode component emulates a mouse double-click on a tree node.

Component Parameters
URI the Uniform Resource Identifier of the targeted object. For more information, refer to the URI syntax on page 13. NODEID NODEID specifies the ID of the tree node.

2010 SAP AG

Page 80 of 94

SAP TAO Runtime Library

OPTIONS Reserved for future use

2010 SAP AG

Page 81 of 94

SAP TAO Runtime Library

Controls\GuiTree\SetCheckBoxState The SetCheckBoxState component changes the state of a checkbox in a tree.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. COLUMNNAME the name of the column. THESTATE the new state of the checkbox. OPTIONS Reserved for future use

Controls\GuiTree\UnselectAll The UnselectAll component resets all selections in the target tree control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. OPTIONS Reserved for future use

2010 SAP AG

Page 82 of 94

SAP TAO Runtime Library

2010 SAP AG

Page 83 of 94

SAP TAO Runtime Library

Controls\GuiTree\UnselectColumn The UnselectColumn component deselects a column of a tree control.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. COLUMNNAME the name of the column. OPTIONS Reserved for future use

Controls\GuiTree\UnselectNode The UnselectNode component unselects a tree node.

Component Parameters
URI the Uniform Resource Identifier of the target object. For more information, refer to the URI syntax on page 13. NODEID the ID of the tree node. OPTIONS Reserved for future use

2010 SAP AG

Page 84 of 94

SAP TAO Runtime Library

2010 SAP AG

Page 85 of 94

SAP TAO Runtime Library

Advanced Concepts
Debugging the CBASE
VB Script language exception handling is poor and does not provide detailed information when an error occurs. For example, there is no way to dump the stack trace and it is difficult to find the root cause of a runtime error. This section explains how to set up a debug session in the HP QuickTest Professional environment.

Uploading the libraries to HP Quality Center


The first step, which is mandatory to enable the debug of SAP Test Acceleration and Optimization libraries, is to make them available in the HP Quality Center. Proceed as follows: Logon to the HP Quality Center project Navigate to the Test Plan area Expand the SAP Test Acceleration and Optimization libraries path: Subject/BPT Resources/Libraries When SAP Test Acceleration and Optimization is properly set up, it contains at least the CBASE_Init.vbs.txt file Each SAP Test Acceleration and Optimization library can then be attached to the project: Choose the attach icon to select the library. Select the library in the appropriate folder. Check the FF_ROOT_PATH environment variable

Important
The CBASE_Bootstrap.vbs is the only library which is mandatory to enable the debug. You have to attach the CBASE_Bootstrap.vbs library. All other libraries are optional. Only attach the libraries that are relevant for the error you are troubleshooting.

2010 SAP AG

Page 86 of 94

SAP TAO Runtime Library

SAP Test Acceleration and Optimization Libraries in HP Quality Center


The screenshot below shows a typical setup to debug custom functions in the CBASE_Custom_Wrappers.vbs file.

Declaring the Libraries in the Application Area


Once attached to the project the SAP Test Acceleration and Optimization, libraries need to be declared in the application area. The application area is an HP Quality Center concept which ensures only loading the libraries that are relevant for the test component. The application area used by SAP Test Acceleration and Optimization tests and test component is _SAP_Doc.

Modifying the Application Area with HP QuickTest Professional


With HP Quality Center 9.5, the application area has to be modified using HP QuickTest Professional. Proceed as follows: 2010 SAP AG Page 87 of 94

SAP TAO Runtime Library

1. 2. 3. 4.

Run HP QuickTest Professional. Connect the HP QuickTest Professional to the HP Quality Center server. Logon to the appropriate project Open the _SAP_Doc application area.

Opening the Application Area

2010 SAP AG

Page 88 of 94

SAP TAO Runtime Library

Adding the SAP Test Acceleration and Optimization Libraries


1. Navigate to the Function Libraries panel. 2. Add the library, by selecting the ones available in HP Quality Center.

Note:
Once the libraries are declared, save the changes. It might be necessary to stop and restart QuickTest Professional, to invalidate internal cached content and take into account the latest changes made in the Application Area.

2010 SAP AG

Page 89 of 94

SAP TAO Runtime Library

Starting a Debug Session


Once the application area is declared, you can start a debug session directly from HP Quick test professional. 1. 2. 3. 4. Open the Business Component. Navigate to the expert view. Set a breakpoint at any steps in the component code. Run the script, and wait for the process to stop at the breakpoint.

2010 SAP AG

Page 90 of 94

SAP TAO Runtime Library

The debugger tool provides common debugging features, like watching variables and expressions, as shown in this screenshot.

2010 SAP AG

Page 91 of 94

SAP TAO Runtime Library

Putting a Breakpoint in a Library


The HP QuickTest Professional menu lets you display additional views. Click the View menu and the Resources menu item, to display the Resources panel where the declared libraries are listed. You can then open the libraries and put breakpoints anywhere in their VB Script coding.

2010 SAP AG

Page 92 of 94

SAP TAO Runtime Library

Appendix
SAP GuiScripting Type
The table below shows the type of the SAP GUI objects, as they are displayed by the SAP GuiScripting API. GuiApplication GuiConnection GuiSession GuiFrameWindow GuiMainWindow GuiModalWindow GuiMessageWindow GuiLabel GuiTextField GuiCTextField GuiPasswordField GuiComboBox GuiOkCodeField GuiButton GuiRadioButton GuiCheckBox GuiStatusPane GuiCustomControl GuiContainerShell GuiBox GuiContainer GuiSimpleContainer GuiScrollContainer GuiListContainer GuiUserArea GuiSplitterContainer GuiTableControl GuiTableColumn GuiTableRow GuiTabStrip GuiTab GuiScrollbar 2010 SAP AG 10 11 12 20 21 22 23 30 31 32 33 34 35 40 41 42 43 50 51 62 70 71 72 73 74 75 80 81 82 90 91 100 SAP application SAP connection SAP session Not used Main window of the application Popup window Not used Label Text field Text field with F4 enabled Secure text field Combo box Ok Code Field - Used to start a transaction Button Radio button Check box Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Table control Used internally Used internally Tab strip (Parent Container of Tabs) Tab Not used Page 93 of 94

SAP TAO Runtime Library

GuiToolbar GuiTitlebar GuiStatusbar GuiMenu GuiMenubar GuiCollection GuiSessionInfo GuiShell GuiGOSShell GuiSplitterShell GuiDialogShell GuiDockShell GuiContextMenu GuiComponentCollection

101 102 103 110 111 120 121 122 123 124 125 126 127 128

Not used Not used Status Bar - Used to retrieve transaction results Menu Not used Used internally Session Info - Used to retrieve current transaction Super class of all ALV Controls - Like GuiTree, GuiGridView Not used Not used Not used Not used Used internally Used internally

2010 SAP AG

Page 94 of 94

You might also like