SOFTWARE TESTING: QTP scripts examples for beginner

Tuesday, October 11, 2011

QTP scripts examples for beginner

QTP scripts examples for beginner:Hi friends, This post is useful for fresher who are looking for QTP scripts examples so that they can understand the qtp automation better. If you are advance users than just go through this blog you will get lots of advance QTP VB scripts examples which will be useful for your automation project.

I have listed here two QTP scripts examples specially for fresher, one is related to webpage and other is related to simple GUI (Graphical user interface).
 Sample QTP script 2:

SystemUtil.Run "http://google.com/","","",""Browser("Google").Page("Google").WebEdit("q").Set "mba"Browser("Google").Page("Google").WebEdit("q").SubmitBrowser("Google").Page("mba - Google Search").SyncBrowser("Google").Close

Above sample script will open google.com and type mba in search box and close it.

Note: This is just sample script, This will not work if you just copy and paste it to QTP. You have to first record it. When you record any webpage its objects will be automatically stored to object repository. Please Refer to know how to record above script : Learn to Automate Webpage.
Visit here to get detail knowledge of QTP object Repository and Learn QTP Step by Step.
Keep visiting this blog, I will share some more advance QTP VB script examples. You are always welcome to give feedback that will improve my blog. I am always trying to give 100% perfect knowledge about QTP.

2 comments:

Related Posts Plugin for WordPress, Blogger...