Reading:  

Quick Test Professional - The starters Guide


Working with GUI Objects in QTP

There are various GUI objects with which QTP interacts while executing the scripts.

The GUI objects are:

  • Radio Button
  • Text Box
  • webTables
  • Check Box
  • Combo Box
  • Buttons

Working with Text Box:

To access Text box during Run Time, use the following methods.

  • Click: Clicks on the Text Box.
  • Exist: Checks for the existence of the Text Box.
  • Set: Helps to Set Values into the Text Box.
  • SetSecure: Helps to set the text securely in the password boxes.
  • GetROProperty("text"): Helps to get the Text Box.
  • GetROProperty("Visible"): This will returns a Boolean value if visible.
  • WaitProperty: Waits until the Property value becomes true.

Example:

 

Working with Radio Button:

To access Radio Button during Run Time, use the following methods.

  • Click: Clicks on the Radio Button.
  • Exist: Checks for the Radio Button existence.
  • Select (RadioButtonName): Helps to Set the Radio Box "ON".
  • WaitProperty: Waits until the value of the Property becomes true.
  • GetROProperty("name"): To get the Radio Button Name
  • GetROProperty("Visible"): Returns a Boolean value if visible

Example:

 

Check Box Working:

To access Check box during Run Time, use the following methods.

  • Click: To check the check Box option.
  • Set: Helps to set the checkbox value "ON" or "OFF".
  • WaitProperty: Waits until the value of the Property becomes true.
  • Exist: Serach for the existence of the Check Box.
  • GetROProperty("name"): To get the check Box name.
  • GetROProperty("Visible"): Which returns a Boolean value if visible.

Example:

 

Working with Combo Box:

To access Combo Box during Run Time, use the following methods.

  • Click: Clicks on the Combo Box.
  • Exist: Checks for the existence of the Combo Box.
  • Select (Value): Helps to select the value from the Combo Box.
  • WaitProperty: Waits until the value of Property becomes true.
  • GetROProperty("Text"): To get the Value of the Selected Combo Box.
  • GetROProperty("all items"): to the all the items in the combo Box.
  • GetROProperty("items count"): Returns the items number in the combo Box.

Example:

 

Working with Buttons:

To access Buttons during Run Time, use the following methods.

  • Click - Clicks on the Button.
  • Exist - Checks for the existence of the Button.
  • WaitProperty - Waits until the Property value becomes true.
  • GetROProperty("Name") - Gets the Button name.
  • GetROProperty("Disabled") – If button is enabled/disabled, returns a Boolean value

Example:

 

Working with webTables:

Testers need to understand the working of Web Tables and to perform an task on web Tables.

HTML has various web tables and can get a lot of information using web table methods in QTP.

  • Html id: The table id tag property.
  • sourceIndex: Fetches the Source Index of the Table.
  • innerText: To get the Table Heading.
  • RowCount: To get the number of Rows in the Table.
  • ColumnCount: To get the number of Columns in the Table.
  • ChildItemCount: To get the number of Child Items present in particular Row.
  • GetcellData: To get the Value of the Cell based on the column and Row Index.

Example:

 

 

Description

In this tutorial, we will get to know Quick test professional. At the time of writting QTP is at version 12.2. This tutorial is subdivided into multiple parts as shown below

  • What is QTP
  • Automating tests
  • Environment
  • Recording and Playback
  • Object Repository
  • Actions
  • Data Table
  • Checkpoints in QTP
  • Synchronization
  • Smart Identification
  • Debugging and Error handling
  • Recovery Scenarios
  • Environment Variables
  • Library Files
  • Test Results
  • GUI Objects
  • Virtual Objects
  • Accessing Databases
  • Working with XML
  • Descriptive Programming
  • Automation Object Model
  • A work on Frameworks

Leave your feedback for us, Feedback help us improve our tutorials.

 



Prerequisites

Some knowledge on Windows OS and VB Script is recommended

Audience

Students who wish to learn QTP

Learning Objectives

Learn QTP

Author: Subject Coach
Added on: 16th Mar 2015

You must be logged in as Student to ask a Question.

None just yet!