What is an other way of "Wait" statement in QTP
I dont want to use wait("Some number").
Can any one tell this please..........

Answer Posted / tvs ramakrishna chowdary

timeout=0
expval=true
actval=window("Flightreservation").winbutton
("updsteorder").getroproperty("enabled")
while((expval<>actval) & (timout<30))
wait(2)
timeout=timeout+1
actval=window("FR").winbutton("UO").getroproperty("enabled")
wend
if(timeout=30)then
msgbox "update order btn is not enabled in given time frame
hence exiting action")
exitaction

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

when will you do debug your script? and explain that process?

1453


What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);

3494


What are some test assets and related extensions of qtp?

555


Can we record using all the modes in a single script? Explanation with example is appreciated

1390


Why to use descriptive programming?

569






Is it possible to call from one action to another action in qtp?

564


What is RTM (require ment tracebulity marix) fromate?

1529


I used the below code to open QTP through VBscript?But i can unable to Invoke QTP...PLZ help me with the correct code to invoke QTP through VBS with description of the code aswell. Dim qtApp 'As QuickTest.Application 'Declare the Application object variable Dim qtTest 'As QuickTest.Test 'Declare a Test object variable Dim qtResultsOpt 'Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = False 'Make the QuickTest application visible qtApp.Open "C:\form", True 'Open the test in read-only mode 'set run settings for the test Set qtTest = qtApp.Test qtTest.Run 'Run the test 'WScript.StdOut.Write "Status is: " & qtTest.LastRunResults.Status 'Check the results of the test run qtTest.Close 'Close the test qtApp.quit 'Close QuickTest Pro Set qtResultsOpt = Nothing 'Release the Run Results Options object Set qtTest = Nothing 'Release the Test object Set qtApp = Nothing 'Release the Application object

2422


Explain the Different types of QTP test assets and their extensions?

605


how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page

1827


Where to use Property Let, Property Get, Property Set in UFT

374


Explain how Does Run time data (Parameterization) is handled in QTP?

559


how to idetfy which test cases are automated?who will deside that plz tell me

1538


Explain how qtp identifies object?

613


How to test fly out menu in qtp?

523