What is exact difference between “while” and “do while” in
QTP ?
Answer Posted / rico
The basic difference is in the time of checking the
condition during execution of loop. In while loop the
condition is checked at the start, if it is true then
statements enclosed in the loop structure are executed ,
otherwise the loop exits and control transfers to the
statements following this loop and this process continues
until the condition becomes false.
As:
While (condition)
{
statement1;
statement2;
.
.
}
Statements following the loop
But in the case of do-while loop condition is checked at
the end of structure (i.e., at least one time the
statements enclosed in this loop structure are executed
before checking the condition)
After executing the loop statements at least once, the loop
condition is checked; if it is true then the loop body is
executed again otherwise loop exits. As:
Do
{
statement1;
statement2;
.
.
}
While (condition)
Statements following the loop
| Is This Answer Correct ? | 18 Yes | 1 No |
Post New Answer View All Answers
How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.
What are table and db checkpoints?
What is quick test pro?
how can i pass a "cript"as a parameter in to a function
action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans
What are the main differences of qtp and win runner?
What are the views available in quicktest professional (qtp)?
How can you handle exceptions in qtp?
Hi, While recording a Jave based web application, its recording all my actions and the objects.And I have 5 WebEdit objects on the page and all are recorded. But while execution, at the 2 WebEdit object, its entering the value into the object (Its making a call to the AJAX, matching the value), when the control get out of this object the value is erased or cleared. Could anyone please help. I have recoreded 5 more scenarios where WebEdit is in the picture on different webpages and all are working fine. Here is my Script: Browser("Sign In").Page("Matching Workbench_3").WebEdit ("locationLookup").Set "0320 - SEATTLE-KM" Browser("Sign In").Page("Matching Workbench_3").WebEdit ("supplierNameLookup").Set "TRAMMO PETROLEUM INC" *** SupplierNameLookup is the object, which is haing an issue. And also I was using the SendString function, but it didnt work.
In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer
What is standalone database?
Explain measuring transaction.
What is the limitation to XML Checkpoints?
How we can import data from database?
What is RTM (require ment tracebulity marix) fromate?