What is meant by Step Generator in Qtp How is it used? pls
gimme in detail
Answer Posted / anjireddy.idamakanti
It is used to generate steps in the Test pane without click
on start Recording.
Step Generator consists of statements in three categories
such as
(i) Functions
(ii) Utility objects
(iii) Test Objects.
(i) Functions
This category specifies all general and mathematical
operations such as left, right, len, time, cint, cdbl, cstr,
ltrim, rtrim, trim etc.,
(ii) Test Object
This category specifies the operations which are performed
on the objects such as Set, Select, Activate, SetSecure,
Click, GetVisibleText, GetROProperty, GetTOProperty,
GetItem, GetItemCount, GetContent …. Etc.,
(iii) Utility Objects
This category specifies all miscellaneous operations such as
DataTableOperations, SystemUtil Operations, QCUtil
Operations, Recovery Operations etc.,
Ex
Prepare script for calculation Test in Application Flight
Reservation
Option explicit Dim x,y,tot,i
For i = 1 to 5 step 1 Window("Flight Reservation").Activate
Window("Flight Reservation").WinMenu("Menu").Select
"File;Open Order..." Window("Flight
Reservation").Dialog("Open Order").WinCheckBox("Order
No.").Set "ON"
Window("Flight Reservation").Dialog("Open
Order").WinEdit("Edit").Set i Window("Flight
Reservation").Dialog("Open Order").WinButton("OK").Click
x = Window("Flight
Reservation").WinEdit("Tickets:").GetVisibleText()
y = Window("Flight
Reservation").WinEdit("Price:").GetVisibleText() y=mid(y,2,
len(y)-1)
tot = Window("Flight
Reservation").WinEdit("Total:").GetVisibleText()
tot=mid(tot,2, len(tot)-1)
If cdbl(tot)=cdbl(x) * cdbl(y) Then
reporter.ReportEvent micPass, "Calculation is correct",
"Test is Pass" else
reporter.ReportEvent micFail, "Calculation is not correct",
"Test is fail"
End If Next
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Explain the N-tire structure(process) for Funds Transfer ( means give N ways to funds Transfer in an Application)
Hi! Using Descriptive Programming How do we get Parent object for an object by writing script(DP). Say, i want to get a parent object for a "Link" in a web page by writing script in Descriptive Programming.
Explain process of smart Identification in QTP?
How do I get the QTP scripts result in xml format by using vb script function?
The hybrid framework can be implemented for any application. Is it true?
What is difference between design time and run time data table?
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.
we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?
Explain the differences between table and db checkpoints?
What are the benefits of qtp?
How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.
How you know that a test case is a regression test case
There is an excel file of 1 to 100 sheets how you will iterate through it?
Can we create user defined functions in qtp?