Active TopicsActive Topics  Display List of Forum MembersMemberlist  CalendarCalendar  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin


 One Stop Testing ForumTesting Tools @ OneStopTestingWinRunner @ OneStopTesting

Message Icon Topic: Winrunner Function Generator

Post Reply Post New Topic
Author Message
Mithi25
Senior Member
Senior Member
Avatar

Joined: 23Jun2009
Online Status: Offline
Posts: 288
Quote Mithi25 Replybullet Topic: Winrunner Function Generator
    Posted: 26Oct2009 at 1:21am




* Create > Insert Function > For Object/ Window
* Use the pointer to click the # Tickets field.
* The Function Generator opens and suggests the edit_get_text function.
* Change the variable name, text, to tickets and click the Paste button.


* You can use the Function Generator to quickly insert functions into the test script.
* Choose Create > Insert Function > From Function Generator.
* Select the appropriate Category & Function and Paste it.
* Select the object by pointing it and Paste it.


USEFUL FUNCTIONS:

tl_step ( )

By adding tl_ step statements to your test script, you can determine whether a particular operation within the test passed or failed, and send a message to the report.

The function has the following syntax:

tl_step ( step_name, status, description );

step_name the name of the test step.

status sets whether the step passed or failed. Set to 0 for pass, or any

other integer for failure.

Description a short explanation of the step.

In the following example, WinRunner will report in the result window

that the total is incorrect.

tl_step(" total", 1, "Total is incorrect.");

report_msg ( )

You can define a message in your test script and have WinRunner send it to the test results window. To send a message to a test results window, add a

report_msg statement to your test script.

The function has the following syntax:

report_msg ( message );

message A valid string expression.

In the following example, WinRunner gets the value of the label property in the

Flight Reservation window and enters a statement in the test results containing the message and the label value.

win_ get_ info(" Flight Reservation", "label", value);

report_ msg(" The label of the window is " & value);

invoke_application

You can start an application from a WinRunner test script using the invoke_application function.

The invoke_ application function has the following syntax:

invoke_application ( file, command_option, working_dir, show );

file designates the full path of the application to invoke.

command_option parameter designates the command line options to apply.

work_dir designates the working directory for the application

show specifies how the application’s main window appears when open.

For example, the following statement starts the Flight Reservation application and displays it as an icon.

invoke_application(" c:\\ flight1a.exe", "", "", SW_MINIMIZED);



Post Resume: Click here to Upload your Resume & Apply for Jobs

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.422 seconds.
Vyom is an ISO 9001:2000 Certified Organization

© Vyom Technosoft Pvt. Ltd. All Rights Reserved.

Privacy Policy | Terms and Conditions
Job Interview Questions | Placement Papers | Free SMS | Freshers Jobs | MBA Forum | Learn SAP | Web Hosting