-
Generting script
Hi friends
I am new to QTP... From the QTP Tools menu i selected object identification...and then i clicked on generte script option. The script file has been generated with the file extension.vbs ...
can anybody tell me what is the use of generating script. Is there is any possibility to add the generated script some where in the application? If it is so where can we add the generated script? What is the use?
Thanks
Deepasree
-
Re: Generting script
Hi Deepa,
One of useful thing in QTP is the scripting.QTP generate visual basic script file whish is portable to use in applications like QTP.
Here is the Example of how to delete web cookies using QTP script
Browser("Browser").WinToolbar("ToolbarWindow32").Press "&Tools"
Browser("Browser").WinMenu("ContextMenu").Select "Tools;Internet Options..."
Browser("Browser").Dialog("Internet Options").WinButton("Delete Cookies").Click
Browser("Browser").Dialog("Internet Options").Dialog("Delete Cookies").WinButton("OK").Click
Browser("Browser").Dialog("Internet Options").WinButton("OK").Click
This script code deleted cookies on Web,similar way you can import VBS file created by you or you can modify existing file to use in QTP.
It all depends on the need of Application.
Cheers,
Sridevichitthu
-
Re: Generting script
[QUOTE=deepasree;32669]Hi friends
I am new to QTP... From the QTP Tools menu i selected object identification...and then i clicked on generte script option. The script file has been generated with the file extension.vbs ...
can anybody tell me what is the use of generating script. Is there is any possibility to add the generated script some where in the application? If it is so where can we add the generated script? What is the use?
Thanks
Deepasree[/QUOTE]
Gerated Script are used in case u want the settings to be portable for another run/machine. the Settings are saved & hence for a team u need not manually change the setting's, Execute the script on that machine & accordingly QTP gets configured
-
Re: Generting script
Hey Deepa,
- >>>> the QTP Tools menu i selected object identification...
We Can Define the Properties and method for the each Object while record the application, is called Object Identification.
->>>>> The script file has been generated with the file extension.vbs ...
QTP have feature to generate user defind function using .VBS file and we can call the file in to script editor using
File-->Setting--->
->>>>>what is the use of generating script :
Once if u generate the script, then only we can use when ever require.
U can modify the script's based on ur requirement and use different testing
Please let me know