Thursday, June 20, 2013

Test Objects and Test Operations for Web



Test object is an object that qtp creates in the test to represent the actual object in the application.
Below are some of the web application Test Objects, based on the below syntax the test objects are been placed.

Syntax:

In which browser.In which page.In which object.what operation

As per above syntax the below script will be generate,
Browser("BrowserName").Page("PageName").Object("ObjectName").Operation

For Example:
Browser("Google").Page("Google").webedit("q").set "QTP 11.0"
Browser('Google").Page("Google").webbutton("Googlesearch").Click

Properties of an Object Names:
Browser Name: Google
Page Name: Google
Edit box: q
Button Name: Googlesearch

Test Objects:
Sr No
Description
Test Object
1
Edit box
WebEdit
2
Button
WebButton
3
Checkbox
WebCheckbox
4
Radio
WebRadioGroup
5
Image
Image
6
Link
Link
7
Text
WebElement
8
WebList
WebList
9
Table
WebTable
10
Frame
Frame

Test Operations:

There will be no change in Test Operations, For and Windows the test operations will be same 

Sr No
Description
Operation
1
Enter value into edit box
Set “Text”
2
Enter the password
SetSecure “EncryptedText”
3
Click on push button
Click
4
Select the item in combo box
Select “Item Name” or Select “Item Number”
5
Check the checkbox
Set “On/Off”
6
Choose the radio button
Set “Select”
7
Enter value in object
Type “Text”
8
Activate window
Activate
9
Minimize the window
Minimize
10
Maximize the window
Maximize
11
Close the window
Close

Test Objects and Test Operations for Windows



Below are some of the windows application Test Objects, Based on the object stored in repository the test objects are been created in Recording and also by manually giving the scripts in test window.

Syntax:

In which window.In which object.what operation
window("Window Name").Object("Object Name").Operation

As per above syntax below script will be generate for windows based application
Sr No
Description
Test Object
1
Edit field
WinEdit
2
Push button
WinButton
3
Object (Developed in other tech)
WinObject
4
Checkbox
WinCheckbox
5
Radio button
WinRadioButton
6
Combo box
WinComboBox
7
List
WinList
8
Main Window
Window
9
Sub window
Dialog


Also here i given some of the operation that can be perform based on the created Test Object, listed operation is common for both web and windows based application.
Sr No
Description
Operation
1
Enter value into edit box
Set “Text”
2
Enter the password
SetSecure “EncryptedText”
3
Click on push button
Click
4
Select the item in combo box
Select “Item Name” or Select “Item Number”
5
Check the checkbox
Set “On/Off”
6
Choose the radio button
Set “Select”
7
Enter value in object
Type “Text”
8
Activate window
Activate
9
Minimize the window
Minimize
10
Maximize the window
Maximize
11
Close the window
Close