Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Write and explain decision making command?

Command decision explain write
0
Posted

Write and explain decision making command?

0

You can incorporate decision-making into your test scripts using if/else or switch statements. i. 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; ] expression is evaluated. If expression is true, statement1 is executed. If expression1 is false, statement2 is executed. b) A switch statement enables WinRunner to make a decision based on an expression that can have more than two values. It has the following syntax: switch (expression ) { case case_1: statements case case_2: statements case case_n: statements default: statement(s) } The switch statement consecutively evaluates each case expression until one is found that equals the initial expression. If no case is equal to the expression, then the default statements are executed. The default statements are optional.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123