Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop Testing Forum : Testing Tools @ OneStopTesting : WinRunner @ OneStopTesting |
Topic: Winrunner Conditional Statements |
|
Author | Message |
Mithi25
Senior Member Joined: 23Jun2009 Online Status: Offline Posts: 288 |
Topic: Winrunner Conditional Statements Posted: 26Oct2009 at 1:05am |
if/ Else Statement
An if/ else statement executes a statement if a condition is true; otherwise, it executes another statement. It has the following syntax: if ( expression ) statement1; [ else statement2; ] For example, the if/ else statement below checks that the Flights button in the Flight Reservation window is enabled. It then sends the appropriate message to the report. button_get_state (" FLIGHT", value); if (value != ON) report_msg(" The Flights button was successfully enabled"); else report_msg(" Flights button was not enabled. Check that values for Fly From and Fly To are valid"); Switch Statement: A switch statement enables WinRunner to make a decision based on an set_ window (" Open") While Loop set_ window (" Open"); A do/while loop executes a block of statements for as long as a specified condition set_window (" Flight Reservation"); Assignment 6 Using TSL Functions:
|
|
Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
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 |
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.