When to Insert transactions in QTP?

Answer Posted / sridhar reddy

we use the transaction point in QTP to find out execution
time of the script(vb script)by using the start transaction
and end transaction points
note:Transactions can be defined only for tests.
Components cannot include transactions.
Example:
Services.StartTransaction "ReserveSeat"

Browser("Welcome: Mercury Tours").Page("Find a Flight:
Mercury").WebList("fromPort").Select "London"

Browser("Welcome: Mercury Tours").Page("Find a Flight:
Mercury").WebList("toPort").Select "Frankfurt"

Browser("Welcome: Mercury Tours").Page("Find a Flight:
Mercury").WebList("toDay").Select "12"

Browser("Welcome: Mercury Tours").Page("Find a Flight:
Mercury").WebRadioGroup("servClass").Select "Business"

Browser("Welcome: Mercury Tours").Page("Find a Flight:
Mercury").WebList("airline").Select "Blue Skies Airlines"

Browser("Welcome: Mercury Tours").Page("Find a Flight:
Mercury").Image("findFlights").Click 65,12

Browser("Welcome: Mercury Tours").Page("Select a Flight:
Mercury").WebRadioGroup("outFlight").Select "Blue Skies
Airlines"

Browser("Welcome: Mercury Tours").Page("Select a Flight:
Mercury").WebRadioGroup("inFlight").Select "Blue Skies
Airlines"

Browser("Welcome: Mercury Tours").Page("Select a Flight:
Mercury").Image("reserveFlights").Click 46,8

Services.EndTransaction "ReserveSeat"

plz menction if any wrong is there in the answer

Is This Answer Correct ?    15 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is run action?

1620


For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?

1941


How can you exit from an action?

777


How do I get the QTP scripts result in xml format by using vb script function?

1969


Is it possible to refer the same object for referring more than one object that are of different class using the descriptive programming approach? Suppose my code is 'To create the object named as obj Set obj=Description.Create() 'To define the values obj("title").value="IE" obj("type").value="text" obj("html tag").value="INPUT" 'To set the value Browser("IE").Page("Yahoo").WebEdit(obj).Set "xyz" Can I refer the "obj" object for the three objects like Browser,page and webedit objects? If so how?

1807






what type of automation is follwed in the project?

1690


Whether qtp 9.0 supports Test director8.0

2309


Is it possible to change the values of analog recording?

788


how to know no.of mails in our g mail by using vb-script

1965


Give the syntax to import/export xls into qtp.

773


what is error and fault in terms of software quality?

1705


can any body tell me how i create a simple script and apply output value on it .pls send me a step by step process

1475


Hi All, How to get repeated word in string . Thanks Balaji

1119


Will there be any standards or requirements for page appearance and/or graphics throughout a site or parts of a site?

776


How to remove the associated function library?

713