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
What is a Patch in QTP?
I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks
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.
Hi Friends, Can anyone help me out in this one? In QTP, I am using Data Driver and want to parameterise multiple values (say 3 values ) for a field. How can I do it using Data Driver wizard? Plz mention it step-by-step. In the end after doing the needful, on opening the Data Driver window, how can I get number (i.e. 3) in the Parameterised column for that particualr value? Thanks a lot in advance.
Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?
How can I change object description or check point values in qtp?
How to attach a file to TD?
What is the recovery scenario in qtp?
What does it mean when a check point is in red color? What do you do?
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
images are dynamically changes how to compare two images with out using the bitmap
What is the extension of the recovery scenario file in qtp?
What is a quick test professional?
what is actually contain test report? can anybody post the test report