QTP

Usage of with in QTP scripting:


with Browser("Your store").Page("Laptops&Notepads")
     
.Weblist("select")."Sony"

End with

WITH:
with function is very useful in descriptive programming  in qtp , it reduces repetition  of same sentences .


Exaple of With function usage:
With objIE
    .Visible = True
    .Navigate "http://www.zillow.com/homes/comps/67083361_zpid/"
    Do While .ReadyState <> 4: DoEvents: Loop
    Debug.Print .document.Body.outerText
End With

No comments:

Post a Comment