612
SilkTest 13.0 SilkTest Classic Help

Help SilkTest Classic - Micro Focus...Welcome.. What's New in SilkTest Classic > > > 18 |

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

  • SilkTest 13.0

    SilkTest ClassicHelp

  • Micro Focus 575 Anton Blvd., Suite 510Costa Mesa, CA 92626

    Copyright © 2012 Micro Focus. All rights reserved. Portions Copyright © 1992-2009 BorlandSoftware Corporation (a Micro Focus company).

    MICRO FOCUS, the Micro Focus logo, and Micro Focus product names are trademarks orregistered trademarks of Micro Focus IP Development Limited or its subsidiaries or affiliatedcompanies in the United States, United Kingdom, and other countries.

    BORLAND, the Borland logo, and Borland product names are trademarks or registeredtrademarks of Borland Software Corporation or its subsidiaries or affiliated companies in theUnited States, United Kingdom, and other countries.

    All other marks are the property of their respective owners.

    2012-05-07

    ii

  • Contents

    Welcome ............................................................................................................18What's New in SilkTest Classic .........................................................................................18

    Google Chrome Support ........................................................................................ 18TrueLog with the Open Agent ................................................................................ 18Recording Enhancements ...................................................................................... 18Windows Accessibility ............................................................................................ 18Text Recognition Support .......................................................................................18Automated Testing of a Console ............................................................................ 19Mozilla Firefox Support ...........................................................................................19SWT 3.7 Support ....................................................................................................19Microsoft Silverlight 4 Support with Microsoft Silverlight Runtime 5 .......................19Rumba 8.3 Support ................................................................................................ 19

    Contacting Micro Focus .................................................................................................... 19Information Needed by Micro Focus SupportLine .................................................. 19

    Help on Help ..................................................................................................................... 20Getting Started ................................................................................................. 21

    SilkTest Product Suite .......................................................................................................21What's New in SilkTest Classic .........................................................................................21

    Google Chrome Support ........................................................................................ 21TrueLog with the Open Agent ................................................................................ 21Recording Enhancements ...................................................................................... 21Windows Accessibility ............................................................................................ 22Text Recognition Support .......................................................................................22Automated Testing of a Console ............................................................................ 22Mozilla Firefox Support ...........................................................................................22SWT 3.7 Support ....................................................................................................22Microsoft Silverlight 4 Support with Microsoft Silverlight Runtime 5 .......................22Rumba 8.3 Support ................................................................................................ 22

    Contacting Micro Focus .................................................................................................... 22Information Needed by Micro Focus SupportLine .................................................. 23

    Product Notification Service .............................................................................................. 23Help on Help ..................................................................................................................... 23Basic Workflow ..................................................................................................................24

    Open Agent ............................................................................................................ 24Classic Agent ......................................................................................................... 28

    Accessing Sample Applications ........................................................................................ 32SilkTest Projects .............................................................................................. 33

    Overview of SilkTest Classic Projects ...............................................................................33Project Explorer .................................................................................................................35Creating a New Project ..................................................................................................... 36Overview of AutoGenerate Project ....................................................................................37Automatically Generating a New Project ...........................................................................37Opening an Existing Project ..............................................................................................38Converting Existing Tests to a Project .............................................................................. 39Using Option Sets in Your Project .....................................................................................39

    Editing an Options Set ............................................................................................40SilkTest Classic File Types ............................................................................................... 40Organizing Projects ...........................................................................................................41

    Adding Existing Files to a Project ...........................................................................41Renaming Your Project .......................................................................................... 42Working with Folders in a Project ...........................................................................42

    Contents | 3

  • Moving Files Between Projects .............................................................................. 44Removing Files from a Project ............................................................................... 44Turning the Project Explorer View On and Off ....................................................... 44Viewing Resources Within a Project ...................................................................... 44

    Packaging a SilkTest Classic Project ................................................................................45Emailing a Packaged Project ................................................................................. 47

    Exporting a Project ............................................................................................................47Troubleshooting ................................................................................................................ 48

    Troubleshooting Basic Workflow Issues .................................................................50SilkTest Agents ................................................................................................ 51

    Overview of SilkTest Agents ............................................................................................. 51How SilkTest Classic Assigns an Agent to a Window Declaration ....................................52Agent Options ................................................................................................................... 52Setting the Default Agent .................................................................................................. 70

    Setting the Default Agent Using the Runtime Options Dialog Box ......................... 71Setting the Default Agent Using the Toolbar Icons ................................................ 71

    Connecting to the Default Agent ....................................................................................... 71Creating a Script that Uses Both Agents ...........................................................................71Overview of Record Functionality Available for the SilkTest Agents .................................72Setting Record and Replay Options for the Open Agent .................................................. 73Setting the Window Timeout Value to Prevent Window Not Found Exceptions ............... 73

    Manually Setting the Window Timeout Value .........................................................73Setting the Window Timeout Value in the Agent Options Dialog Box .................... 74

    Configuring Open Agent Port Numbers ............................................................................ 74Open Agent Port Numbers ................................................................................................74Migrating from the Classic Agent to the Open Agent ........................................................ 74

    Differences for Agent Options Between the Classic Agent and the Open Agent ... 75Differences in Object Recognition Between the Classic Agent and the Open Agent

    ............................................................................................................................... 76Differences in the Classes Supported by the Open Agent and the Classic Agent

    ............................................................................................................................... 77Differences in the Parameters Supported by the Open Agent and the Classic Agent

    ............................................................................................................................... 81Overview of the Methods Supported by the SilkTest Classic Agents .....................82SYS Functions Supported by the Open Agent and the Classic Agent ................... 83

    Enabling Extensions for Applications Under Test ........................................84Overview of Extensions .....................................................................................................84Extensions that SilkTest Classic can Automatically Configure ......................................... 84Extensions that Must be Set Manually .............................................................................. 85Extensions on Host and Target Machines ........................................................................ 86Enabling Extensions Automatically Using the Basic Workflow ......................................... 86Enabling Extensions on a Host Machine Manually ........................................................... 87Manually Enabling Extensions on a Target Machine ........................................................ 87Enabling Extensions for Embedded Browser Applications ............................................... 88Enabling Extensions for HTML Applications (HTAs) .........................................................89Adding a Test Application to the Extension Dialog Boxes ................................................ 89Verifying Extension Settings ............................................................................................. 90Why Applications do not have Standard Names ...............................................................90Duplicating a Test Applications Settings in Another Application ....................................... 91Deleting an Application from the Extension Enabler or Extensions Dialog Box ................91Disabling Browser Extensions ...........................................................................................91Comparison of the Extensions Dialog Box and the Extension Enabler Dialog Box .......... 92Configuring the Browser ....................................................................................................92

    Setting Agent Options for Web Testing .................................................................. 93Specifying a Browser for SilkTest Classic to Use in Testing a Web Application .... 94Specifying your Default Browser ............................................................................ 94

    4 | Contents

  • Understanding the Recovery System .............................................................95Overview of the Recovery System .................................................................................... 95Setting the Recovery System for the Open Agent ............................................................ 96Setting the Recovery System for the Classic Agent ..........................................................96Base State .........................................................................................................................97DefaultBaseState Function ............................................................................................... 97Adding Tests that Use the Open Agent to the DefaultBaseState ......................................98Adding Tests that Use the Classic Agent to the DefaultBaseState ...................................99DefaultBaseState and the wDynamicMainWindow Object ................................................99DefaultBaseState and wMainWindow ............................................................................... 99Flow of Control ................................................................................................................ 100

    The Non-Web Recovery Systems Flow of Control ...............................................100Web Applications and the Recovery System ....................................................... 100How the Non-Web Recovery System Closes Windows ....................................... 101How the Non-Web Recovery System Starts the Application ................................101

    Modifying the Default Recovery System ......................................................................... 102Overriding the Default Recovery System ............................................................. 102Handling Login Windows ......................................................................................103Handling Browser Pop-up Windows in Tests that Use the Classic Agent ............106Specifying Windows to be Left Open for Tests that Use the Classic Agent ......... 107Specifying Windows to be Left Open for Tests that Use the Open Agent ............107Specifying New Window Closing Procedures ...................................................... 108Specifying Buttons, Keys, and Menus that Close Windows ................................. 108Recording a Close Method for Tests that Use the Open Agent ........................... 109Recording a Close Method for Tests that Use the Classic Agent ........................ 109

    Creating a Test Plan .......................................................................................111Overview of Test Plans ................................................................................................... 111Structure of a Test Plan .................................................................................................. 111Overview of Test Plan Templates ................................................................................... 112Example Outline for Word Search Feature ..................................................................... 112Converting a Results File to a Test Plan .........................................................................114Working with Test Plans ..................................................................................................114

    Creating a New Test Plan .................................................................................... 114Indent and Change Levels in an Outline .............................................................. 115Add Comments to a Test Plan that Display in the Results ...................................115Documenting Manual Tests in the Test Plan ........................................................116Describing the State of a Manual Test ................................................................. 116Inserting a Template .............................................................................................116Changing Colors in a Test Plan ............................................................................117Linking the Test Plan to Scripts and Test Cases ..................................................117

    Working with Large Test Plans ....................................................................................... 118Overview of Working with Large Test Plans .........................................................118Determining Where Values are Defined in a Large Test Plan ..............................118Dividing a Test Plan into a Master Plan and Sub-Plans .......................................118Creating a Sub-Plan ............................................................................................. 119Copying a Sub-Plan ............................................................................................. 119Opening a Sub-Plan ............................................................................................. 119Connecting a Sub-Plan with a Master Plan ..........................................................119Refreshing a Local Copy of a Sub-Plan ............................................................... 119Sharing a Test Plan Initialization File ................................................................... 119Saving Changes ................................................................................................... 120Overview of Locks ................................................................................................ 120Acquiring and Releasing a Lock ...........................................................................120Generating a Test Plan Completion Report ......................................................... 120

    Adding Data to a Test Plan ............................................................................................. 121Specifying Unique and Shared Data .................................................................... 121

    Contents | 5

  • Adding Comments in the Test Plan Editor ........................................................... 121Testplan Editor Statements .................................................................................. 121The # Operator in the Testplan Editor .................................................................. 121Using the Testplan Detail Dialog Box to Enter the testdata Statement ................ 122Entering the testdata Statement Manually ........................................................... 122

    Linking Test Plans ...........................................................................................................122Linking a Description to a Script or Test Case using the Testplan Detail Dialog Box

    ............................................................................................................................. 122Linking a Test Plan to a Data-Driven Test Case .................................................. 123Linking to a Test Plan Manually ........................................................................... 123Linking a Test Case or Script to a Test Plan using the Testplan Detail Dialog Box

    ............................................................................................................................. 123Linking the Test Plan to Scripts and Test Cases ..................................................123Example of Linking a Test Plan to a Test Case ................................................... 124

    Categorizing and Marking Test Plans ............................................................................. 124Marking a Test Plan ............................................................................................. 125How the Marking Commands Interact .................................................................. 125Marking One or More Tests ..................................................................................125Printing Marked Tests .......................................................................................... 125

    Using Symbols ................................................................................................................ 126Overview of Symbols ............................................................................................126Symbol Definition Statements in the Test Plan Editor ..........................................127Defining Symbols in the Testplan Detail Dialog box .............................................127symbolname Equals symbolvalue ........................................................................ 128Specifying Symbols as Arguments when Entering a testcase Statement ............ 128

    Attributes and Values ...................................................................................................... 128Overview of Attributes and Values ....................................................................... 129Predefined Attributes ............................................................................................129User Defined Attributes ........................................................................................ 129Adding or Removing Members of a Set Attribute ................................................. 129Rules for Using + and - ........................................................................................ 130Defining an Attribute and its Values ..................................................................... 130Assigning Attributes and Values to a Test Plan ................................................... 131Assigning an Attribute from the Testplan Detail Dialog Box .................................131Modifying the Definition of an Attribute .................................................................132

    Queries ............................................................................................................................132Overview of Test Plan Queries .............................................................................132Overview of Combining Queries to Create a New Query .....................................132Guidelines for Including Symbols in a Query ....................................................... 133The Differences between Query and Named Query Commands .........................133Create a New Query .............................................................................................134Edit a Query ......................................................................................................... 135Delete a Query ..................................................................................................... 135Combining Queries ...............................................................................................135

    Designing and Recording Test Cases ..........................................................136Hierarchical Object Recognition ......................................................................................136Dynamic Object Recognition ...........................................................................................137Highlighting Objects During Recording ........................................................................... 138Overview of the Locator Keyword ................................................................................... 138Setting Recording and Replay Options ........................................................................... 141

    Setting Recording Preferences ............................................................................ 141Setting Recording Options for xBrowser .............................................................. 142Setting Custom Attributes to Use in Locators .......................................................142Setting Classes to Ignore ..................................................................................... 143Setting WPF Classes to Expose During Recording and Playback .......................144Setting Pre-Fill During Recording and Replaying .................................................144

    6 | Contents

  • Setting Replay Options for the Open Agent ......................................................... 144Creating Test Cases with the Open Agent ......................................................................145

    Application Configurations ....................................................................................145Recording Test Cases With the Open Agent ....................................................... 145Recording Window Declarations that Include Locator Keywords .........................146Recording Locators Using the Locator Spy ..........................................................147Specifying Whether to Use Locators or Tags to Resolve Window Declarations .. 148Configuring Applications .......................................................................................148XPath Basic Concepts ..........................................................................................148Supported XPath Subset ......................................................................................148Supported Attribute Types for Dynamic Object Recognition ................................ 150XPath Samples .....................................................................................................150Troubleshooting Performance Issues for XPath ...................................................151Modifying an Application Configuration ................................................................ 152Reasons for Failure of Creating an Application Configuration ............................. 152

    Test Cases ...................................................................................................................... 152Overview of Test Cases ....................................................................................... 153Anatomy of a Basic Test Case ............................................................................. 153Types of Test Cases ............................................................................................ 154Test Case Design .................................................................................................154Constructing a Test Case .....................................................................................154Data in Test Cases ...............................................................................................156Saving Test Cases ............................................................................................... 156Recording Without Window Declarations ............................................................. 156Overview of Application States .............................................................................157Behavior of an Application State Based on NONE ...............................................157Example: A Feature of a Word Processor ............................................................158

    Recording Test Cases with the Classic Agent ................................................................ 159Overview of Recording the Stages of a Test Case .............................................. 159Overview of Recording 4Test Components ..........................................................160Recording a Test Case With the Classic Agent ................................................... 160Verifying a Test Case ........................................................................................... 161Recording the Cleanup Stage and Pasting the Recording ...................................162Testing the Ability of the Recovery System to Close the Dialog Boxes of Your Application

    ............................................................................................................................. 162Linking to a Script and Test Case by Recording a Test Case ..............................163Saving a Script File .............................................................................................. 163Recording an Application State ............................................................................ 164Testing an Application State .................................................................................164Recording Actions ................................................................................................ 164Recording the Location of an Object .................................................................... 165Recording Window Identifiers ...............................................................................165

    Verification ...................................................................................................................... 166Overview of Object Properties ..............................................................................166Verifying Properties of an Object ..........................................................................166Verifying an Object Using the Verify Function ......................................................167Verifying Object Attributes ....................................................................................167Overview of Verifying Bitmaps ............................................................................. 168Overview of Verifying an Objects State ................................................................169Fuzzy Verification ................................................................................................. 170Verifying that a Window or Control is No Longer Displayed .................................172

    Data-Driven Test Cases ..................................................................................................172Data-Driven Workflow .......................................................................................... 172Using the Data-Driven Workflow .......................................................................... 172Overview of Data-Driven Test Cases ................................................................... 173Working with Data-Driven Test Cases ................................................................. 173

    Contents | 7

  • Code Automatically Generated by SilkTest Classic ............................................. 174Tips and Tricks for Data-Driven Test Cases ........................................................ 175Testing an Application with Invalid Data ...............................................................176Enabling and Disabling Workflow Bars ................................................................ 177Setting up the Data Source .................................................................................. 177Creating the Data-Driven Test Case .................................................................... 179

    Property Sets .................................................................................................................. 184Verifying Properties as Sets ................................................................................. 184Creating a New Property Set ................................................................................185Combining Property Sets ..................................................................................... 185Deleting a Property Set ........................................................................................ 185Editing an Existing Property Set ...........................................................................185Specifying a Class-Property Pair ..........................................................................186Predefined Property Sets ..................................................................................... 186

    Testing in Your Environment ........................................................................ 188Testing Adobe Flex Applications .....................................................................................188

    Overview of Adobe Flex Support ..........................................................................188Configuring Security Settings for Your Local Flash Player ...................................189Configuring Flex Applications to Run in Adobe Flash Player ............................... 189Configuring Flex Applications for Adobe Flash Player Security Restrictions ....... 189Testing Adobe Flex Applications .......................................................................... 190Customizing Adobe Flex Scripts .......................................................................... 190Styles in Adobe Flex Applications ........................................................................ 191Attributes for Adobe Flex Applications ................................................................. 191Dynamically Invoking Adobe Flex Methods ..........................................................192Testing Multiple Flex Applications on the Same Web Page .................................193Adobe AIR Support .............................................................................................. 193Adobe Flex Exception Values .............................................................................. 193Overview of the Flex Select Method Using Name or Index ..................................194Selecting an Item in the FlexDataGrid Control ..................................................... 195Enabling Your Flex Application for Testing .......................................................... 195Testing the SilkTest Component Explorer Flex Sample Application .................... 205Testing Flex Custom Controls .............................................................................. 209Adobe Flex Class Reference ................................................................................218

    Testing Web Applications ................................................................................................218API Click Versus Agent Click ............................................................................... 218Testing Dynamic HTML (DHTML) Popup Menus .................................................219Using the xBrowser TechDomain .........................................................................219Using the Classic Agent to Test Web Applications .............................................. 237

    Client/Server Application Support ................................................................................... 259Client/Server Testing Challenges .........................................................................259Verifying Tables in ClientServer Applications .......................................................259Evolving a Testing Strategy ..................................................................................260Incremental Functional Test Design .....................................................................260Network Testing Types .........................................................................................261How 4Test Handles Script Deadlock ....................................................................262Troubleshooting Configuration Test Failures ....................................................... 263

    Testing Java AWT/Swing Applications ............................................................................263Overview of Java AWT/Swing Applications ..........................................................263Java AWT Classes for the Classic Agent .............................................................264Differences in the Classes Supported by the Open Agent and the Classic Agent

    ............................................................................................................................. 264Java AWT and Swing Class Reference ............................................................... 268Using the Open Agent .......................................................................................... 268Using the Classic Agent ....................................................................................... 272

    Testing Java SWT and Eclipse Applications ...................................................................308

    8 | Contents

  • Overview of Java SWT Applications and Eclipse Support ................................... 308Running the Sample SWT Applications ............................................................... 309Updating the Java SWT Batch File for the Sample Application ........................... 310Suppressing Controls for Certain Classes ........................................................... 310Supported SWT Widgets for the Classic Agent ....................................................311Using the Open Agent .......................................................................................... 312

    Testing Applications with the SilkBean ........................................................................... 316Preparing Test Scripts to Run with SilkBean ........................................................317Configuring SilkBean Support on the Target (UNIX) Machine ............................. 317Configuring SilkBean Support on the Host Machine when Testing Multiple Applications

    ............................................................................................................................. 318Correcting Problems when Using the SilkBean ....................................................318

    Testing .NET Applications ...............................................................................................319Windows Forms Applications ............................................................................... 319WPF Applications ................................................................................................. 331Microsoft Silverlight Applications ..........................................................................339

    Testing ActiveX/Visual Basic controls ............................................................................. 343Overview of ActiveX/Visual Basic Support ........................................................... 343Enabling ActiveX/Visual Basic Support ................................................................ 344Dynamically Invoking ActiveX/Visual Basic Methods ........................................... 344Predefined Classes for ActiveX/Visual Basic Controls .........................................345Predefined Class Definition File for Visual Basic ................................................. 346List of Predefined ActiveX/Visual Basic Controls ................................................. 346Access to VBOptionButton Control Methods ........................................................3480-Based Arrays .....................................................................................................348Dependent Objects and Collection Objects ..........................................................349Working with Dynamically Windowed Controls .................................................... 349Window Timeout ...................................................................................................349Conversion of BOOLEAN Values .........................................................................349Testing Controls: 4Test Versus ActiveX Methods ................................................ 350Control Access is Similar to Visual Basic ............................................................. 350Prerequisites for Testing ActiveX/Visual Basic Controls ...................................... 350ActiveX/Visual Basic Exception Values ................................................................351Recording New Classes for ActiveX/Visual Basic Controls ..................................351Loading Class Definition Files .............................................................................. 352Disabling ActiveX/Visual Basic Support ............................................................... 352Ignoring an ActiveX/Visual Basic Class ................................................................352Setting ActiveX/Visual Basic Extension Options .................................................. 353Setup for Testing ActiveX Controls or Java Applets in the Browser .....................354

    ........................................................................................................................................ 354Enabling and Disabling Rumba ............................................................................ 354Locator Attributes for Identifying Rumba Controls ................................................354Rumba Class Reference ...................................................................................... 355

    Testing SAP Applications ................................................................................................355Attributes for SAP Applications ............................................................................ 355Dynamically Invoking SAP Methods .....................................................................356Configuring Automation Security Settings for SAP .............................................. 356SAP Class Reference ...........................................................................................357

    Testing Windows API-Based Applications ...................................................................... 357Overview of Windows API-Based Application Support ........................................ 357Attributes for Windows API-Based Applications ...................................................358Suppressing Controls for Certain Classes ........................................................... 358Configuring Standard Applications ....................................................................... 358Determining the priorLabel in the Win32 Technology Domain ............................. 359

    Distributed Testing - Testing on Multiple Machines ........................................................ 359Configuring Your Test Environment ..................................................................... 360

    Contents | 9

  • Running Test Cases in Parallel ............................................................................ 367Testing Multiple Machines ....................................................................................375Testing Multiple Applications ................................................................................382Troubleshooting Distributed Testing .....................................................................394

    Using Advanced Techniques ........................................................................ 396Starting from the Command Line .................................................................................... 396

    Starting SilkTest Classic from the command line ................................................. 396Starting the Classic Agent from the Command Line ............................................ 398

    Recording a Test Frame ................................................................................................. 399Overview of Object Files ...................................................................................... 399Declarations ......................................................................................................... 401Window Declarations ............................................................................................405Identifiers and Tags ..............................................................................................410Save the Test Frame ............................................................................................412Specifying How a Dialog Box is Invoked .............................................................. 412Class Attributes .................................................................................................... 412

    Windows Accessibility ..................................................................................................... 414Using the Classic Agent ....................................................................................... 414Using the Open Agent .......................................................................................... 417

    Calling Windows DLLs from 4Test .................................................................................. 418Aliasing a DLL Name ............................................................................................418Calling a DLL from within a 4Test Script .............................................................. 418Passing Arguments to DLL Functions .................................................................. 419Using DLL Support Files Installed with SilkTest Classic ...................................... 421

    Extending the Class Hierarchy ........................................................................................421Classes .................................................................................................................421Verifying Attributes and Properties .......................................................................429Defining Methods and Custom Properties ............................................................430Examples ..............................................................................................................432

    Porting Tests to Other GUIs ............................................................................................433Handling Differences Among GUIs ...................................................................... 433About GUI Specifiers ............................................................................................439Supporting GUI-Specific Objects ..........................................................................442

    Supporting Custom Objects ............................................................................................ 443Why SilkTest Classic Sees Objects as Custom Windows ....................................443Two Reasons why SilkTest Classic Sees the Object as CustomWin ...................443Working with Custom Objects .............................................................................. 444Using Clipboard Methods ..................................................................................... 448Filtering Custom Classes ..................................................................................... 448OCR Support ........................................................................................................451

    Supporting Internationalized Objects .............................................................................. 455Overview of SilkTest Classic Support of Unicode Content ...................................455Using DB Tester with Unicode Content ................................................................456Issues Displaying Double-Byte Characters .......................................................... 456Learning More About Internationalization .............................................................456SilkTest Classic File Formats ............................................................................... 457Working with Bi-Directional Languages ................................................................459Recording Identifiers for International Applications .............................................. 459Configuring Your Environment ............................................................................. 460Troubleshooting Unicode Content ........................................................................462

    Using Autocomplete ........................................................................................................ 465Overview of AutoComplete ...................................................................................465Customizing your MemberList ..............................................................................466Frequently Asked Questions about AutoComplete .............................................. 467Turning AutoComplete Options Off ...................................................................... 468Using AppStateList ...............................................................................................468

    10 | Contents

  • Using DataTypeList .............................................................................................. 468Using FunctionTip ................................................................................................ 469Using MemberList ................................................................................................ 469

    Overview of the Library Browser ..................................................................................... 470Library Browser Source File ................................................................................. 470Adding Information to the Library Browser ........................................................... 471Add User-Defined Files to the Library Browser with SilkTest Classic .................. 471Viewing Functions in the Library Browser ............................................................ 471Viewing Methods for a Class in the Library Browser ............................................472Examples of Documenting User-Defined Methods .............................................. 472Web Classes Not Displayed in Library Browser ...................................................473

    Text Recognition Support ................................................................................................473Dynamic Invoke ...............................................................................................................474

    Running Tests and Interpreting Results ...................................................... 475Running Tests ................................................................................................................. 475

    Recording a Test Case With the Classic Agent ................................................... 475Creating a suite .................................................................................................... 476Passing arguments to a script .............................................................................. 476Running a Test Case ............................................................................................477Running a testplan ............................................................................................... 478Running the currently active script or suite .......................................................... 478Stopping a Running Testcase Before it Completes ..............................................478Setting a Testcase to Use Animation Mode ......................................................... 478

    Interpreting Results ......................................................................................................... 479Overview of the Results File .................................................................................479Viewing Test Results ............................................................................................480Difference viewer overview .................................................................................. 480Errors and the Results file .................................................................................... 480Testplan Pass/Fail Report and Chart ................................................................... 482Merging testplan results overview ........................................................................ 482

    Analyzing Results with the Silk TrueLog Explorer ...........................................................482TrueLog Explorer ..................................................................................................482TrueLog Limitations and Prerequisites .................................................................483Opening the TrueLog Options Dialog Box ............................................................483Setting TrueLog Options ...................................................................................... 483Toggle TrueLog at Runtime Using a Script .......................................................... 484Viewing Results Using the TrueLog Explorer .......................................................485Modifying Your Script to Resolve Window Not Found Exceptions When Using TrueLog

    ............................................................................................................................. 485Analyzing Bitmaps ...........................................................................................................486

    Overview of the Bitmap Tool ................................................................................ 486When to use the Bitmap Tool ............................................................................... 486Capturing Bitmaps with the Bitmap Tool .............................................................. 487Comparing Bitmaps ..............................................................................................489Rules for Using Comparison Commands ............................................................. 490Bitmap Functions ..................................................................................................490Baseline and Result Bitmaps ............................................................................... 490Zooming the Baseline Bitmap, Result Bitmap, and Differences Window ............. 491Looking at Statistics ............................................................................................. 491Exiting from Scan Mode ....................................................................................... 491Starting the Bitmap Tool .......................................................................................491Using Masks .........................................................................................................492Analyzing Bitmaps for Differences ....................................................................... 495

    Working with Results Files .............................................................................................. 496Attaching a comment to a result set ..................................................................... 496Comparing Result Files ........................................................................................ 496

    Contents | 11

  • Customizing results .............................................................................................. 497Deleting a results set ............................................................................................497Change the default number of results sets ...........................................................497Changing the colors of elements in the results file ...............................................497Fix incorrect values in a script .............................................................................. 497Marking Failed Testcases .................................................................................... 498Merging results .....................................................................................................498Navigating to errors .............................................................................................. 498Viewing an individual summary ............................................................................ 498Storing and Exporting Results ..............................................................................498Storing results ...................................................................................................... 499Exporting Results to a Structured File for Further Manipulation ...........................499Removing the unused space in a results file ........................................................499Sending Results Directly to Issue Manager ......................................................... 499Logging Elapsed Time Thread and Machine Information .....................................500

    Presenting Results .......................................................................................................... 500Fully customize a chart .........................................................................................500Generate a pass/fail report on the active results file ............................................ 500Producing a Pass/Fail chart ................................................................................. 501Displaying a different set of results ...................................................................... 502

    Debugging Test Scripts ................................................................................. 503Designing and testing with debugging in mind ................................................................503Overview of the debugger ............................................................................................... 503

    Executing a script in the debugger ....................................................................... 503Starting the debugger ...........................................................................................504Debugger menus ..................................................................................................504Stepping into and over functions .......................................................................... 504Working with scripts ............................................................................................. 505Exiting the debugger ............................................................................................ 505

    Breakpoints ..................................................................................................................... 505Setting Breakpoints .............................................................................................. 505Viewing Breakpoints .............................................................................................506Deleting Breakpoints ............................................................................................ 506

    Variables ......................................................................................................................... 506Viewing variables ................................................................................................. 506Changing the value of variables ........................................................................... 507

    Expressions .....................................................................................................................507Overview of Expressions ......................................................................................507Evaluate expressions ........................................................................................... 507

    Enabling view trace listing ...............................................................................................507Viewing a list of modules .................................................................................................508View the debugging transcripts ....................................................................................... 508Debugging Tips ............................................................................................................... 508

    Checking the precedence of operators ................................................................ 508Code that never executes .................................................................................... 508Global and local variables with the same name ................................................... 509Global variables with unexpected values ............................................................. 509Incorrect use of break statements ........................................................................ 509Incorrect values for loop variables ........................................................................509Infinite loops ......................................................................................................... 509Typographical errors ............................................................................................ 509Uninitialized variables ...........................................................................................509

    Troubleshooting ............................................................................................. 510ActiveX and Visual Basic Applications ............................................................................ 510

    What happens when you enable ActiveX/Visual Basic? ...................................... 510Troubleshooting tips for ActiveX/Visual Basic controls ........................................ 510

    12 | Contents

  • Troubleshooting Test Failures for VB Application Configuration ..........................511Application Environment ................................................................................................. 511

    Dr. Watson when Running from Batch File .......................................................... 511I Cannot get SilkTest to Work with JBuilder or Oracle JDeveloper ...................... 512SilkTest Classic does not Launch my Java Web Start Application ...................... 512Which JAR File do I Use? .................................................................................... 512Sample Declarations and Script for Testing JFC Popup Menus .......................... 512Java Extension Loses Injection when Using Virtual Network Computing (VNC) . 514

    Browsers ......................................................................................................................... 514I Am not Testing Applets but Browser is Launched During Playback .................. 514Playback is Slow when I Test Applications Launched from a Browser ................ 515Library Browser does Not Display Web Browser Classes ....................................515

    Error Messages ...............................................................................................................515Agent not responding ........................................................................................... 516BrowserChild MainWindow Not Found When Using Internet Explorer 7.x ...........516Cannot find file agent.exe .....................................................................................516Control is not responding ..................................................................................... 517Unable to Connect to Agent ................................................................................. 517Unable to Delete File Dialog Box ......................................................................... 517Unable to Start Internet Explorer ..........................................................................518Variable Browser not defined ............................................................................... 518Window Browser does not define a tag ................................................................518Window is not active .............................................................................................518Window is not enabled ......................................................................................... 519Window is not exposed ........................................................................................ 519Window not found .................................................................................................520

    Functions and Methods ...................................................................................................520Class not Loaded Error ........................................................................................ 520Exists Method Returns False when Object Exists ................................................521Defining TestCaseEnter and TestCaseExit Methods ........................................... 521How to Define lwLeaveOpen ................................................................................521How to Write the Invoke Method .......................................................................... 522I cannot Verify $Name Property during Playback .................................................523Errors when calling nested methods .................................................................... 524Methods Return Incorrect Indexed Values in My Scripts ..................................... 524How can I Determine the Exact Class of a java.lang.Object Returned by a Method

    ............................................................................................................................. 524Multiple Machines Testing ...............................................................................................525

    Remote Testing and Default Browser .................................................................. 525Setting up the recovery system for multiple local applications ............................. 526two_apps.t ............................................................................................................ 526

    Web Application Tests .................................................................................................... 528HtmlPopupList Causes the Browser to Crash when Using IE DOM Extension ....528Links Not Being Recognized ................................................................................ 528Mouse Coordinate (x, y) is Off the Screen ........................................................... 528Recording a Declaration for a Browser Page Containing Many Child Objects .....529Recording VerifyProperties() Detects BrowserPage Properties and Children ..... 529SilkTest cannot see any children in my browser page in IE 6.x ........................... 530SilkTest cannot verify browser extension settings ................................................530SilkTest Classic not finding Web page of application when you run test on different browser

    ............................................................................................................................. 530SilkTest Classic not recognizing web objects .......................................................531SilkTest recognizes static HTML text and tables on a page but does not recognize text such as input fields or buttons

    ............................................................................................................................. 531Test frame containing HTML frame declarations does not compile ..................... 532Web property sets not displayed during verification .............................................533

    Contents | 13

  • Why does the Recorder generate so many MoveMouse() calls ...........................533Objects ............................................................................................................................ 533

    Does SilkTest Classic support Oracle Forms .......................................................533Mouse Clicks Fail on Certain JFC and Visual Café Objects ................................ 534My Sub-Menus of a Java Menu are being Recorded as JavaDialogBoxes ......... 534

    Other Problems ............................................................................................................... 534Application hangs when playing back a menu item pick ...................................... 534Cannot access some of the SilkTest menu commands ....................................... 535Cannot double click a SilkTest Classic file and open SilkTest Classic .................535Cannot extend AnyWin Control or MoveableWin classes .................................... 535Cannot find the Quick Start Wizard ...................................................................... 535Cannot play back picks of cascaded submenus for an AWT application. ............ 536Cannot record second window ............................................................................. 536Ignoring a Java Class ...........................................................................................536Cannot open results file ........................................................................................536Common DLL problems ....................................................................................... 537Common scripting problems .................................................................................537Conflict with virus detectors ..................................................................................539Do I Need Administrator Privileges to Run SilkTest Classic? .............................. 539General Protection Faults .....................................................................................539Include File or Script Compiles but Changes are Not Picked Up ......................... 540Library Browser Not Displaying User-Defined Methods ....................................... 541Running Global Variables from a Test Plan Versus Running Them from a Script

    ............................................................................................................................. 541Maximum Size of SilkTest Classic Files ...............................................................541Playing Back Mouse Actions ................................................................................ 542Recorder Does Not Capture All Actions ............................................................... 542Recording two SetText () Statements .................................................................. 543Relationship between Exceptions Defined in 4test.inc and Messages Sent To the Result File

    ............................................................................................................................. 543SilkTest 4Test Editor does not display enough characters .................................. 543SilkTest Classic Support of Delphi Applications ...................................................543Stopping a testplan ...............................................................................................545TextField not allowing input ..................................................................................545Adding a property to the recorder .........................................................................546Displaying the Euro symbol ..................................................................................546Using SilkTest Classic file functions to add information to the beginning of a file

    ............................................................................................................................. 546Recognition Issues ..........................................................................................................547

    I Cannot See all Objects in my Application even after Enabling Show All Classes............................................................................................................................. 547

    java.lang.UnsatisfiedLinkError ..............................................................................547JavaMainWin is Not Recognized ..........................................................................548None of My Java Controls are Recognized ..........................................................548Only JavaMainWin is Recognized ........................................................................548Only Applet Seen ................................................................................................. 549SilkTest Classic Does not Record Click() Actions Against Custom Controls in Java Applets

    ............................................................................................................................. 549SilkTest Classic Does not Recognize a Popup Dialog Box caused by an AWT Applet in a Browser

    ............................................................................................................................. 549SilkTest Classic is Not Recognizing Updates on Internet Explorer Page Containing JavaScript

    ............................................................................................................................. 550Java Controls are Not Recognized .......................................................................550Verify Properties does not Capture Window Properties ....................................... 550

    Tips ................................................................................................................................. 550Owner-Draw List Boxes and Combo Boxes ......................................................... 550

    14 | Contents

  • Options for Legacy Scripts ................................................................................... 552Declaring an Object for which the Class can Vary ............................................... 553Drag and Drop Operations ................................................................................... 554Example Testcases for the Find dialog ................................................................ 554Declaring an Object for which the Class can Vary ............................................... 555When to use the Bitmap Tool ............................................................................... 555

    Handling Exceptions ....................................................................................................... 556Default Error Handling ..........................................................................................556Adding to the default error handling ..................................................................... 556Trapping the exception number ............................................................................557Defining your own exceptions .............................................................................. 557Using do...except statements to trap and handle exceptions ...............................558Programmatically Logging an Error ......................................................................559Performing More than One Verification in a Test Case ........................................559Writing an error-handling function ........................................................................ 560Exception Values ..................................................................................................561

    Using the Runtime Version of SilkTest ........................................................ 565Overview of SilkTest Classic Runtime ............................................................................ 565Installing SilkTest Classic Runtime ................................................................................. 565Starting SilkTest Runtime ................................................................................................565

    Glossary .......................................................................................................... 5664Test Classes ................................................................................................................. 5664Test-Compatible Information or Methods ......................................................................566Abstract Windowing Toolkit .............................................................................................566accented character ..........................................................................................................566Agent ...............................................................................................................................566applet .............................................................................................................................. 567application state .............................................................................................................. 567attributes ......................................................................................................................... 567Band (.NET) .................................................................................................................... 567base state ........................................................................................................................567bidirectional text .............................................................................................................. 567Bytecode ......................................................................................................................... 567call stack ......................................................................................................................... 568child object ...................................................................................................................... 568class ................................................................................................................................ 568class library ..................................................................................................................... 568class mapping ................................................................................................................. 568Classic 4Test ...................................................................................................................568client area ........................................................................................................................568custom object .................................................................................................................. 569data-driven test case .......................................................................................................569data member ................................................................................................................... 569declarations .....................................................................................................................569DefaultBaseState ............................................................................................................ 569diacritic ............................................................................................................................ 569Difference Viewer ............................................................................................................569double-byte character set (DBCS) .................................................................................. 569dynamic instantiation .......................................................................................................570dynamic link library (DLL) ................................................................................................570enabling ...........................................................................................................................570exception .........................................................................................................................570frame file ......................................................................................................................... 570fully qualified object name ...............................................................................................570group description .............................................................................................................570handles ............................................................................................................................571

    Contents | 15

  • hierarchy of GUI objects ..................................................................................................571host machine ...................................................................................................................571hotkey ..............................................................................................................................571Hungarian notation ..........................................................................................................575identifier ...........................................................................................................................576include file ....................................................................................................................... 576internationalization or globalization ................................................................................. 576Java Database Connectivity (JDBC) ...............................................................................576Java Development Kit (JDK) ........................................................................................... 576Java Foundation Classes (JFC) ......................................................................................576Java Runtime Environment (JRE) ...................................................................................576Java Virtual Machine (JVM) ............................................................................................ 576JavaBeans ...................................................................................................................... 577Latin script .......................................................................................................................577layout ...............................................................................................................................577levels of localization ........................................................................................................ 577load testing ......................................................................................................................577localization ...................................................................................................................... 577localize an application ..................................................................................................... 577logical hierarchy .............................................................................................................. 577manual test ......................................................................................................................578mark ................................................................................................................................ 578master plan ..................................................................................................................... 578message box ...................................................................................................................578method ............................................................................................................................ 578minus (-) sign .................................................................................................................. 578modal .............................................................................................................................. 578modeless .........................................................................................................................579Multibyte Character Set (MBCS) .....................................................................................579Multiple Application Domains (.NET) .............................................................................. 579negative testing ............................................................................................................... 579nested declarations ......................................................................................................... 579No-Touch (.NET) .............................................................................................................579object ...............................................................................................................................579outline ..............................................................................................................................579Overloaded method .........................................................................................................580parent object ................................................................................................................... 580performance testing ........................................................................................................ 580physical hierarchy (.NET) ................................................................................................580plus (+) sign .................................................................................................................... 580polymorphism ..................................................................................................................580project ............................................................................................................................. 580properties ........................................................................................................................ 581query ............................................................................................................................... 581recovery system .............................................................................................................. 581regression testing ............................................................................................................581results file ........................................................................................................................ 581script ................................................................................................................................581script file .......................................................................................................................... 581side-by-side (.NET) ......................................................................................................... 581Simplified Chinese .......................................................................................................... 582Single-Byte Character Set (SBCS) ................................................................................. 582smoke test .......................................................................................................................582Standard Widget Toolkit (SWT) ...................................................................................... 582statement ........................................................................................................................ 582status line ........................................................................................................................ 582

    16 | Contents

  • stress testing ................................................................................................................... 582subplan ............................................................................................................................583suite .................................................................................................................................583Swing .............................................................................................................................. 583symbols .................................................................................................................