tag:blogger.com,1999:blog-6857275489944914372024-03-08T10:54:59.175+05:30Quick Test Professional DictionaryQuickTest Professional Dictionary of PostsVidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.comBlogger35125tag:blogger.com,1999:blog-685727548994491437.post-26385528225945783532012-06-14T16:12:00.000+05:302012-06-14T16:12:27.244+05:30SystemUtil Object Usage in QTP<div dir="ltr" style="text-align: left;" trbidi="on"><br />
<b>SystemUtil Object:</b><br />
SystemUtil Object used to control applications and processes during a run session<br />
<br />
<b>Methods:</b><br />
<br />
<b>Run</b>: Used to Runs a file or application.<br />
e.g: Systemutil.Run "www.google.co.in","","",""<br />
<br />
<b>CloseProcessByName</b>: Closes a process according to its name.<br />
e.g: Systemutil.CloseProcessByName("Excel.exe")<br />
<br />
<b>BlockInput</b>: Used to Prevents keyboard and mouse input events from reaching applications.<br />
e.g: Systemutil.BlockInput<br />
<br />
<b>UnblockInput</b>: Used to Re-enables keyboard and mouse input events after a BlockInput statement was used to block them.<br />
e.g: Systemutil.UnblockInput<br />
<br />
<b>CloseDescendentProcesses</b>: Used to Closes all processes opened by QuickTest. <br />
<br />
<b>CloseProcessByHwnd</b>: Used to Closes a process that is the owner of a window with the specified handle. <br />
<br />
<b>CloseProcessById</b>: Used to Closes a process according to its Process ID. <br />
<br />
<b>CloseProcessByWndTitle</b>: Used to Closes all processes that are owners of windows with the specified title. <br />
<br />
<div><br />
</div></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-27772627989498981352012-06-08T19:36:00.004+05:302012-06-08T19:57:52.297+05:30Recovery Scenarios in QTP<div dir="ltr" style="text-align: left;" trbidi="on"><b>Recovery Scenarios in QTP:</b><b> </b><br />
<div class="MsoNormal">Unexpected events, errors, and application crashes during a run session can disrupt your run session and distort results. This is a problem particularly when running tests or components unattended, the test or component is suspended until you perform the operation needed to recover. <o:p></o:p></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">The Recovery Scenario Manager provides a wizard that guides you through the process of defining a recovery scenario-a definition of an unexpected event and the operation(s) necessary to recover the run session. For example, you can instruct QTP to detect a Printer out of paper message and recover the run session by clicking the OK button to close the message an continue the test or component. <o:p></o:p></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">A recovery scenario consists of the following: </div><div class="MsoNormal" style="margin-left: .25in; mso-list: l0 level1 lfo1; tab-stops: list .25in; text-indent: -.25in;"><span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><b>Trigger Event:</b> The event that interrupts your run session. For example, a window that may pop up on screen, or a QTP run error.<o:p></o:p></div><div class="MsoNormal" style="margin-left: .25in; mso-list: l0 level1 lfo1; tab-stops: list .25in; text-indent: -.25in;"><span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><b>Recovery Operation(s):</b> The operation(s) that need to be performed in order to continue running the test or component. For example, clicking an OK button in a pop-up window, or restarting Microsoft Windows.<o:p></o:p></div><div class="MsoNormal" style="margin-left: .25in; mso-list: l0 level1 lfo1; tab-stops: list .25in; text-indent: -.25in;"><span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;"> <b> </b></span></span><b>Post-Recovery Test Run Option:</b> The instructions on how QTP should proceed once the recovery operations have been performed, and from which point in the test or component QTP should continue, if at all. For example, you may want to restart a test or component from the beginning, or skip a step entirely and continue with the next step in the test or component.</div><div class="MsoNormal" style="margin-left: .25in; mso-list: l0 level1 lfo1; tab-stops: list .25in; text-indent: -.25in;"><br />
</div><div class="MsoNormal">Recovery scenarios are saved in recovery scenario files. A recovery scenario file is a logical collection of recovery scenarios, grouped according to your own specific requirements.<o:p></o:p></div><div class="MsoNormal">To instruct QTP to perform a recovery scenario during a run session, you must first associate it with that test or component. A test or component can have any number of recovery scenarios associated with it. You can prioritize the scenarios associated with your test or component to ensure that trigger events are recognized and handled in the required order.<o:p></o:p></div><div class="MsoNormal">When you run a test or component for which you have defined recovery scenarios and an error occurs, QTP looks for the defined trigger event(s) that caused the error. If a trigger event has occurred, QTP performs the corresponding recovery and post-recovery operations. </div><div class="MsoNormal">You can also control and activate your recovery scenarios during the run session by inserting Recovery statements into your test or component.<o:p></o:p><br />
<br />
<b><span lang="EN" style="color: #444444; font-size: 16.5pt;">Recovery Scenario Functions:</span></b><br />
Here, we will define a Function Call and use that Function Call to handle the error. The default syntax for the Recovery Scenario Function is:<br />
<br />
<div class="MsoNormal"><br />
</div><div class="MsoNormal">Functions should have 4 parameters:</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Function FunName (Object, Method, Arguments, retVal)</div><div class="MsoNormal">--------------------------------</div><div class="MsoNormal">--------------------------------</div><div class="MsoNormal">End Function</div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b>Object</b> here refers to the object which has triggered the recovery scenario, <b>Method</b> of that object, <b>Arguments</b> and <b>retVa</b>l.</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">When the recovery scenario is triggered, all 4 parameters will be passed to the function automatically by QTP</div><div class="MsoNormal"><br />
</div><span lang="EN" style="font-size: 12pt;">Function ProjRecovery(Object, Method, Arguments, retVal)<br />
'Error Handling Code<br />
End Function</span><br />
<br />
<br />
</div></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-49568024813893576562012-06-08T19:23:00.000+05:302012-06-08T19:23:30.924+05:30Variables Naming Convention in QTP Scripting<div dir="ltr" style="text-align: left;" trbidi="on"><br />
<div class="MsoNormal"><b>Variables Naming Convention in QTP Scripting:<o:p></o:p></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Variables represent values that can be changed within a procedure or function. Local scope variables are placeholders that reside within a function- or a script-body.<o:p></o:p></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Prefixes for Variable Data Types <o:p></o:p></div><div class="MsoNormal"><br />
</div><table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; margin-left: 6.6pt; mso-border-alt: solid gray .75pt; mso-border-insideh: .75pt solid gray; mso-border-insidev: .75pt solid gray; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-table-layout-alt: fixed; mso-yfti-tbllook: 183;"><tbody>
<tr style="height: .3in; mso-yfti-firstrow: yes; mso-yfti-irow: 0;"> <td style="border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 116.4pt;" width="155"> <div class="MsoNormal"><b>Data Type<o:p></o:p></b></div></td> <td style="border-left: none; border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 85.2pt;" width="114"> <div class="MsoNormal"><b>Prefix<o:p></o:p></b></div></td> </tr>
<tr style="height: .3in; mso-yfti-irow: 1;"> <td style="border-top: none; border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 116.4pt;" width="155"> <div class="MsoNormal">Boolean<o:p></o:p></div></td> <td style="border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.0pt; border-top: none; height: .3in; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 85.2pt;" width="114"> <div class="MsoNormal">bln<o:p></o:p></div></td> </tr>
<tr style="height: .3in; mso-yfti-irow: 2;"> <td style="border-top: none; border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 116.4pt;" width="155"> <div class="MsoNormal">Date<o:p></o:p></div></td> <td style="border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.0pt; border-top: none; height: .3in; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 85.2pt;" width="114"> <div class="MsoNormal">dt<o:p></o:p></div></td> </tr>
<tr style="height: .3in; mso-yfti-irow: 3;"> <td style="border-top: none; border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 116.4pt;" width="155"> <div class="MsoNormal">Variant<o:p></o:p></div></td> <td style="border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.0pt; border-top: none; height: .3in; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 85.2pt;" width="114"> <div class="MsoNormal">v<o:p></o:p></div></td> </tr>
<tr style="height: .3in; mso-yfti-irow: 4;"> <td style="border-top: none; border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 116.4pt;" width="155"> <div class="MsoNormal">Integer<o:p></o:p></div></td> <td style="border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.0pt; border-top: none; height: .3in; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 85.2pt;" width="114"> <div class="MsoNormal">int<o:p></o:p></div></td> </tr>
<tr style="height: .3in; mso-yfti-irow: 5;"> <td style="border-top: none; border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 116.4pt;" width="155"> <div class="MsoNormal">Object<o:p></o:p></div></td> <td style="border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.0pt; border-top: none; height: .3in; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 85.2pt;" width="114"> <div class="MsoNormal">obj<o:p></o:p></div></td> </tr>
<tr style="height: .3in; mso-yfti-irow: 6;"> <td style="border-top: none; border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 116.4pt;" width="155"> <div class="MsoNormal">String<o:p></o:p></div></td> <td style="border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.0pt; border-top: none; height: .3in; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 85.2pt;" width="114"> <div class="MsoNormal">str<o:p></o:p></div></td> </tr>
<tr style="height: .3in; mso-yfti-irow: 7; mso-yfti-lastrow: yes;"> <td style="border-top: none; border: solid gray 1.0pt; height: .3in; mso-border-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 116.4pt;" width="155"> <div class="MsoNormal">Arrays<o:p></o:p></div></td> <td style="border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.0pt; border-top: none; height: .3in; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 5.4pt 0in 5.4pt; width: 85.2pt;" width="114"> <div class="MsoNormal">arr<o:p></o:p></div></td> </tr>
</tbody></table><div class="MsoNormal"><br />
</div><div class="MsoNormal"><o:p> </o:p>The values of global variables can be used and changed all over the project within all scripts and libraries.</div><div class="MsoNormal"><o:p></o:p></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Syntax: "g" + [Prefix]+[ShortDescription] </div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Eg: gstrName<o:p></o:p></div></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-83387103938857006712012-06-07T19:55:00.004+05:302012-06-07T20:56:03.217+05:30Relative Path Usage in QTP<div dir="ltr" style="text-align: left;" trbidi="on"><b>Relative Path:</b><br />
<br />
There can be two types of path in your file System, absolute and relative. A full path or absolute path is a path that points to the same location on one file system regardless of the working directory.<br />
Example of a full path: C:\Program Files\HP\QuickTest Professional\Tests, while a relative path is a path relative to the current working directory, so the full absolute path may not need to be given.<br />
<br />
Example of a relative path: If your current working directory is Quick Test Professional as shown above so the relative path for the folder HP which is one level up would be ..\..\HP similarly folder which is on same level can be referenced by ..\Some Folder<br />
<div><br />
</div></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-39158142806000093682012-04-27T19:21:00.003+05:302012-06-04T21:24:32.155+05:30Child Objects Use in QTP<div dir="ltr" style="text-align: left;" trbidi="on">This script is to check checkbox in a page<br />
<br />
Set obj=Description.Create<br />
obj("html tag").value="INPUT"<br />
obj("type").value="checkbox"<br />
<br />
set ChkObj=Browser("name:=Email").Page("title:=q").ChildObjects(obj)<br />
ChkObj (0).set"ON"</div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-27726963573407669112012-04-25T20:02:00.004+05:302012-06-08T19:24:30.425+05:30Basic QTP Knowledge(Questions)<div dir="ltr" style="text-align: left;" trbidi="on"><span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">1. How do you hide the Add-In Manager so that it will not be displayed while launching QTP?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: a) Uncheck “Show on Startup” checkbox in the Add-In Manager</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">b) Uncheck “Display Add-In Manager on Startup” in the General tab of Options dialog box.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">2. How do you display the DataTable or Active screen if they are not shown by default?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: In Menu choose View → Active Screen or View → Data Table.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">3. What are the default add ins provided by QTP?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: ActiveX, Visual Basic, Web.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">4. What is the default location of DataTable for any QTP script?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Script Folder Test Folder (folder with the name of the test where all test files are stored)</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">5. What is QTP workflow Phases: Create, Display, Verify and Enhance, Integrate.??????</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Alternative answer: Create test suite, Create an engine, Automate test cases, Debug the script, Deploy the script to QA team.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">6. Low level Recording is used to record?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: To record actual keyword objects or ignore Object identification capabilities</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: To record your clicks and keyboard input based on coordinates.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">7. What are the conditional statements provided in QTP?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: For..Next, While….wend, For……loop, Do….. While, If… Else…. End If, Select…. Case.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: If… Else…. End If, Select…. Case.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">8. What is the first step to change the logical name of the object recorded by Quick Test?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Identify the instances of the object in the script. {S1, S2…S10 – OR}</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Alternative answer: Identify the instances of the object in the Object Repository{S_1, S_2…S_10}.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">9. Where can you find the result of an output parameter?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Runtime Datasheet in Results</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">10. Where do you set action iterations for a specified action?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Action call Properties in Action0 Script</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">11. Which of the following is created by default with new action?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Action Properties, LocalSheet of Data Table</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">12. Which source property specifies that data is retrieved from database?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Output type</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">13. Local object Repository is used for Single action tests. TRUE/FALSE</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: TRUE</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">14. Shared object Repository is created in Object Repository Manager.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Question looks like an answer itself</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">15. Which tool is used to merge two shared object repositories?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Merge Tool in Object Repository Manager.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">16. Virtual objects are stored in?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: dat folder of QTP Installation</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">17. How do you create a Template for every Actions?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Write the template script as “ActionTemplate.mst” in DAT folder of QTP Installation</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">18. Bitmap checkpoint takes into consideration</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Image size and pixel match</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">19. Breakpoint is used for?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Pauses the test execution at Current Step and then proceed to next step when instructed.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">20. When using recovery scenario wizard, the first phase is to specify?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Triggered Events</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">21. What all the types of Triggred Events :<br />
<br />
Answer: popup window, object state, test run error, application crash</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">22. GetTOProperty is used to?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Getting the test object properties i.e property from Repository.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Returns the value of the specified property from the test object description.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">23. Give me 2 examples of ADODB objects?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: QuickTest?, Recordset and Connection.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">24. Close method is used to close the database session. –</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">It is unclear what they mean because the question was altered: Close can be used to close a window or dialog too.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">25. Exportsheet is used for?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Exports a specified sheet of the run-time Data Table to the specified file.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">26. Recovery scenario: is used to handle exceptions i.e. unpredictable actions/Errors.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Question looks like an answer itself</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">27. Step Generator is used for?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Adding Steps to scripts without recording using the Repository/Utility Objects etc.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">28. Information pane and missing resource used for?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: The Information pane provides a list of syntax errors in your test or function library scripts.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">The Missing Resources pane provides a list of the resources that are specified in your test but cannot be found, such as missing calls to actions, unmapped shared object repositories, and parameters that are connected to shared object repositories.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">29. Where do you enable smart identification?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Object Identification.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Check box in the Run tab of Test Settings dialog box.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">30. What are the environment variable types?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: User defined and built-in.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">31. One more area to look into is Menu options i.e., where to look to enable or disable different features of QTP .There are around 4 to 5 questions covering the same.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: can’t be given</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">32. By which type, procedure parameters passes the values to script?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: ByRef</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: String, Boolean, Date, Number, Password, Any.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">33. If we create a procedure under any test/script, Where we can use it?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Procedure can be used only in the Test/script in which it is created, not callable from other test</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: If Action containing a procedure is reusable, it may me used in another tests.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">34. If we create a procedure under function library, how does it save with which extension:<br />
Answer: .QFL/VBS/TXT</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">35. What is the difference between function and subroutine?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: function can return a value, where as subroutine cannot.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">36. What are the different STEP commands?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Step Into, Step Out, Step Over</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">37. Which keyword is used for counter increment Under For…Next loop?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Step</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">38. In Do Loop, at which point the condition is checked to proceed for next iteration?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: End of the loop, minimum one iteration will execute</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">39. What is the first step to use the low level recording mode?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Open in Normal mode</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Normally start recording.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">40. How do register a procedure/function to a test object :</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: RegisterUserFunc statement</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">41. How do you bypass the object repository?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Descriptive Programming or Programming Desc</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">42. Where do you set the action as reusable action?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Action Properties</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">43. Global Data sheet is having one record and Local Data sheet is having two records, how many times the test executes by default?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: One time</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: It also depends on record and run settings: in this question they assume “Run on all rows” radiobutton selected.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">44. Test -->Settings --> Run tab belongs to which sheet:</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Global</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">45. Global Data sheet is having no records and Local Data sheet is having two records, how many times the test executes?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: One time</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">46. How do you find the number of columns in database table?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Fields.Count or Get the array size of the Record Set object. i.e upper limit.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Use GetParameterCount method of DTSheet object</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">47. What will return for ChildObjects method?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Returns the collection of child objects contained within the object.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">48. Where can you set the smart identification "ON":</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Check “Enable Smart Identification in the Object Identification dialog.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">49. How can we release the database after its use?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Close the connection and Recordset objects; then set the object of "ADODB.Connection" type to “Nothing”</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">50. How can u link individual actions to shared repository?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Resources>Associate repositories</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">51. Which object properties are shown in object identification box?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Mandatory and Assistive</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">52. Where can we disable the virtual object recognition?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Toolsà Options à General à check “Disable Virtual Object Recognition” checkbox</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">53. How to associate a procedure to a test object class?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Use RegisterUserFunc statement.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">54. Which object is used in sending information to the test results?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Reporter</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">55. What is default identifier type for web objects?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Index</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: CreationTime</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">56. Test object properties are:<br />
Answer: those mentioned in object identification box and in object repository</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">57. Which object is used to read from text file?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: “Scripting.FileSystemObject”</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">58. A dot followed by object in expert view displays?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Child objects and methods</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">59. While merging the two object repositories, what are the filter options available for target object repository?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Show all objects & show only objects with conflicting descriptions</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">60. How to declare a constant?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Const name = value</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">61. The method used to retrieve data from the weblist object is?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: GetItem method</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">62. What is the method used to get the object name from a Web table cell?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: ChildItem</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">63. How do you know the no of links in a web page?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Page Check point,</span><br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;"><br />
</span><br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: a set of statements:</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Set PageDesc = Description.Create</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">PageDesc(“Class Name”).Value = “Link”</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Set Pages = Browser("Mercury Interactive").Page("Mercury Interactive").ChildObjects(PageDesc)</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Number_of_pages = Pages.Count</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">If Number_of_pages = 0 Then</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Reporter.ReportEvent micDone, “ There are No links was found in the web page, “</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">End If</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">64. What will change using update run mode?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: The test updates the test object descriptions, the expected results of check pts and Active screen images and values.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">65. If virtual objects are available at your machine, but you don't want to consider the virtual objects what you will do?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: In Tools Options General, we will configure to ignore the Virtual Objects by changing “Disable recognition of virtual objects while recording”.</span><br />
<div style="text-align: -webkit-auto;"><span style="font-family: arial, verdana, sans-serif;"><span style="font-size: 14px; line-height: 21px;"><br />
</span></span></div><span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">66. What is the default “Ordinal Identifier”?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Location</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">67. What is the default property of ordinal identifier when using smart identification?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Mandatory and assistive properties.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Properties displayed in the Base Filter Properties list.</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">68. How to declare constant variables?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Const Name = [value]</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">69. How did you find whether script used the smart Identification or not?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: It will show in the test result pane as a Warning</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">70. What is the first step in editing an object in the object repository?</span><br />
<br />
<span style="background-color: white; font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;">Answer: Enable Editing</span> </div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-54308759404446370692012-04-24T14:24:00.000+05:302012-04-24T14:24:02.665+05:30Function to Select Multiple Items in the Listbox<div dir="ltr" style="text-align: left;" trbidi="on"><br />
Function SelectItems(Obj, items)<br />
Dim idx, item<br />
If (StrComp(obj.GetROProperty("type"), "select-multiple", 1) = 0) Then<br />
For Each item In items<br />
obj.Select(item)<br />
Next<br />
Else<br />
obj.Select(items(0))<br />
End If<br />
End Function<br />
</div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-28025663393882559782012-04-24T14:14:00.001+05:302012-04-24T14:16:14.128+05:30Right Clicking Objects Using Device Replay<div dir="ltr" style="text-align: left;" trbidi="on"><br />
<br />
<div class="pRegtext">The function <b>DeviceReplay</b> object to perform a right-click operation on any object by retrieving the coordinates of the object. </div><div class="pRegtext"><br />
</div><a href="" name="wp23780"></a> <div class="pExample">Sub RightClickObj(Obj, Offset_x, Offset_y) </div><a href="" name="wp23781"></a> <div class="pExample"> x_coord = Obj.GetROProperty("abs_x") </div><a href="" name="wp23782"></a> <div class="pExample"> y_coord = Obj.GetROProperty("abs_y") </div><a href="" name="wp23783"></a> <div class="pExample"> Set dr = CreateObject("Mercury.DeviceReplay") </div><a href="" name="wp23784"></a> <div class="pExample"> dr.MouseClick x_coord + Offset_x, y_coord + Offset_y, 2 </div><a href="" name="wp23775"></a> <div class="pExample">End Sub </div><br />
</div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-42983410253371203982012-04-16T19:02:00.004+05:302012-04-25T15:43:25.041+05:30Input/Output Action Parameter Use in QTP<div dir="ltr" style="text-align: left;" trbidi="on"><b><span style="font-family: Georgia, 'Times New Roman', serif;">Input/Output Action Parameter:</span></b><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">Passing Action Input parameter & returning back output value</span><br />
<b><span style="font-family: Georgia, 'Times New Roman', serif;">Action 1(Code)</span></b><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">Dim inputvar</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">Dim outputvar</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">inputvar=100</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">RunAction “Action2″, oneiteration, inputvar,outputvar</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">msgbox(outputvar)</span><br />
<b><span style="font-family: Georgia, 'Times New Roman', serif;">Action2</span></b><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">1. Set Input parameter of action2->ActionProperties with inputvar parameter name</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">2. Set Output parameter of action2->ActionProperties with output parameter name</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">Write this below code in Action2</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">Dim var</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">var=parameter.item(“inputvar”)</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">Msgbox(var)</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">var=var+50</span><br />
<span style="font-family: Georgia, 'Times New Roman', serif;">parameter.item(“outputvar”)=var</span></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com1tag:blogger.com,1999:blog-685727548994491437.post-47588531340860768182012-04-09T22:12:00.003+05:302012-04-25T15:43:25.042+05:30Dictionary Object<div dir="ltr" style="text-align: left;" trbidi="on"><span style="line-height: 140%;">Object that stores data key, item pairs.</span><br />
<div class="MsoNormal"><span lang="EN-US">A <b>Dictionary</b> object is the equivalent of a PERL associative array. Items can be any form of data, and are stored in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually an integer or a string, but can be anything except an array</span></div><div class="MsoNormal"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Dim d ' Create a variable.</span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Set d = CreateObject("<b>Scripting.Dictionary</b>")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "c", "Chart"<o:p></o:p></span></pre><div class="MsoNormal"><b style="line-height: 140%;"><span lang="EN-US"><u>CompareMode Property</u></span></b></div><div style="line-height: 140%; vertical-align: top;"><span lang="EN-US">Sets and returns the comparison mode for comparing string keys in a <b>Dictionary</b> object.<o:p></o:p></span></div><div class="MsoNormal" style="line-height: 140%; vertical-align: top;"><span class="parameter1"><span lang="EN-US" style="font-family: 'Times New Roman', serif;">compare</span></span><span lang="EN-US"> <o:p></o:p></span></div><div class="MsoNormal" style="line-height: 140%; margin-left: 36.0pt; vertical-align: top;"><span lang="EN-US">Optional. If provided, <span class="parameter1"><span style="font-family: 'Times New Roman', serif;">compare</span></span> is a value representing the comparison mode. Acceptable values are 0 (Binary), 1 (Text), 2 (Database). Values greater than 2 can be used to refer to comparisons using specific Locale IDs (LCID). <o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Dim d<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="vertical-align: top;"><b style="line-height: 140%;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.CompareMode</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> = vbTextCompare</span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "c", "Chart"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "B", "<st1:city w:st="on"><st1:place w:st="on">Ball</st1:place></st1:city>" ' Add method fails on this line because the <o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> ' letter b already exists in the Dictionary.<o:p></o:p></span></pre><div class="MsoNormal" style="line-height: 140%; vertical-align: top;"><b style="line-height: 140%;"><span lang="EN-US"><u>Item Property (Script Runtime)</u></span></b></div><div style="line-height: 140%; margin-bottom: .0001pt; margin-bottom: 0cm; vertical-align: top;"><span lang="EN-US">Sets or returns an <i>item</i> for a specified <span class="parameter1"><span style="font-family: 'Times New Roman', serif;">key</span></span> in a <b>Dictionary</b> object. For collections, returns an <i>item</i> based on the specified <span class="parameter1"><span style="font-family: 'Times New Roman', serif;">key</span></span>. Read/write. <o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Function ItemDemo<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Dim d ' Create some variables.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "c", "Chart"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> ItemDemo = <b>d.Item(</b>"c"<b>)</b> ' Get the item.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">End Function<o:p></o:p></span></pre><div style="line-height: 140%; vertical-align: top;"><b style="line-height: 140%;"><span lang="EN-US"><u>Key Property</u></span></b></div><div style="line-height: 140%; margin-bottom: .0001pt; margin-bottom: 0cm; vertical-align: top;"><span lang="EN-US">Sets a <span class="parameter1"><span style="font-family: 'Times New Roman', serif;">key</span></span> in a <b>Dictionary</b> object.<o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Function DicDemo<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Dim d ' Create some variables.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "c", "Chart"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> <b>d.Key(</b>"c"<b>)</b> = "d" ' Set key for "c" to "d".<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> DicDemo = d.Item("d") ' Return associate item.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">End Function<o:p></o:p></span></pre><div style="line-height: 140%; vertical-align: top;"><b style="line-height: 140%;"><span lang="EN-US"><u>Add Method (Script Runtime)</u></span></b></div><div style="line-height: 140%; vertical-align: top;"><span lang="EN-US">Adds a key and item pair to a <b>Dictionary</b> object.<o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Dim d ' Create a variable.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.<b>Add</b> "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.<b>Add</b> "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.<b>Add</b> "c", "Chart"<o:p></o:p></span></pre><div style="line-height: 140%; vertical-align: top;"><b style="line-height: 140%;"><span lang="EN-US"><u>Exists Method (Script Runtime)</u></span></b></div><div style="line-height: 140%; vertical-align: top;"><span lang="EN-US">Returns <b>true</b> if a specified key exists in the <b>Dictionary</b> object, <b>false</b> if it does not.<o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Function KeyExistsDemo<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Dim d, msg ' Create some variables.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "c", "Chart"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> If <b>d.Exists(</b>"c"<b>)</b> Then<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> msg = "Specified key exists."<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Else<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> msg = "Specified key doesn't exist."<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> End If<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> KeyExistsDemo = msg<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">End Function<o:p></o:p></span></pre><div style="line-height: 140%; vertical-align: top;"><b style="line-height: 140%;"><span lang="EN-US"><u>Items Method</u></span></b></div><div style="line-height: 140%; vertical-align: top;"><span lang="EN-US">Returns an array containing all the items in a <b>Dictionary</b> object.<o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Function DicDemo<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Dim a, d, i, s ' Create some variables.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "c", "Chart"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> a = d.<b>Items</b> ' Get the items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> For i = 0 To d.Count -1 ' Iterate the array.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> s = s & a(i) & "<br>" ' Create return string.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Next<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> DicDemo = s<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">End Function<o:p></o:p></span></pre><div style="line-height: 140%; vertical-align: top;"><b style="line-height: 140%;"><u>Keys Method</u></b></div><div style="line-height: 140%; vertical-align: top;"><span lang="EN-US">Returns an array containing all existing keys in a <b>Dictionary</b> object.<o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Function DicDemo<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Dim a, d, i ' Create some variables.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> d.Add "c", "Chart"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> a = d.<b>Keys</b> ' Get the keys.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> For i = 0 To d.Count -1 ' Iterate the array.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> s = s & a(i) & "<br>" ' Return results.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> Next<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> DicDemo = s<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">End Function<o:p></o:p></span></pre><div class="MsoNormal" style="line-height: 140%; vertical-align: top;"><b><span lang="EN-US"><u>Remove Method (Script Runtime)</u><o:p></o:p></span></b></div><div style="line-height: 140%; vertical-align: top;"><span lang="EN-US">Removes a key, item pair from a <b>Dictionary</b> object.<o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Dim a, d ' Create some variables.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "c", "Chart"<o:p></o:p></span></pre><pre style="vertical-align: top;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Remove(</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">"b"</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">)</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> </span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">' Remove second pair.</span></pre><div style="line-height: 140%; vertical-align: top;"><b style="line-height: 140%;"><span lang="EN-US"><u>RemoveAll Method</u>s</span></b></div><div style="line-height: 140%; vertical-align: top;"><span lang="EN-US">The <b>RemoveAll</b> method removes all key, item pairs from a <b>Dictionary</b> object.<o:p></o:p></span></div><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Dim a, d, i ' Create some variables.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">Set d = CreateObject("Scripting.Dictionary")<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "a", "Atlas" ' Add some keys and items.<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "b", "Board"<o:p></o:p></span></pre><pre style="line-height: 140%; vertical-align: top;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">d.Add "c", "Chart"<o:p></o:p></span></pre><pre style="vertical-align: top;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">a = d.</span><b style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">RemoveAll</b><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;"> </span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 140%;">' Clear the dictionary.</span></pre></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-4377926235031643122012-04-07T16:41:00.002+05:302012-04-25T15:43:25.042+05:30Free Download QTP 11 Trial Version<div dir="ltr" style="text-align: left;" trbidi="on"><br />
Download QTP 11 free trial version for 30 days at<br />
<a href="http://www8.hp.com/us/en/software/software-solution.html?compURI=tcm:245-937061#tab=3">http://www8.hp.com/us/en/software/software-solution.html?compURI=tcm:245-937061#tab=3</a><br />
<br />
<br />
</div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com1tag:blogger.com,1999:blog-685727548994491437.post-59742680357149910372012-04-06T19:51:00.000+05:302012-04-25T15:43:53.476+05:30Enter Text in to a WebElement<div>Function EnterWebElementText</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>set oDes=Browser("Br.com").Page("Pg.com").Frame("Frame").WebElement("html <span class="Apple-tab-span" style="white-space:pre"> </span>tag:=BODY")</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>oDes.object.innerText="QTP is a functional tool"</div><div>End Function</div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-8625500340477029312012-04-06T19:49:00.001+05:302012-04-25T15:43:53.476+05:30Function to Page Scroll<div>Function Scroll()</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Browser("micclass:=Browser").Page("micclass:=Page").Sync</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Set oDoc=Browser("micclass:=Browser").Page("micclass:=Page").Object.Body</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>oDoc.doScroll("pageDown")</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Set oDoc=Nothing</div><div>End Function</div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-32383515385245994322012-04-06T19:49:00.000+05:302012-04-25T15:43:53.476+05:30Recovery Scenario Function Call for List Item not found<div>Function Recovery_ListItemIsNotFound(Object, Method, Arguments, retVal)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Dim sAllItems, arrAllItems, intItem</div><div> </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>With Object</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>'Retrieve all items from the Listbox</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>sAllItems = GetROProperty("all items")</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>'Split 'all items' using a delimiter ";" into an array</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>arrAllItems = Split(sAllItems, ";")</div><div> </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>'Select a random number</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>intItem = RandomNumber.Value(LBound(arrAllItems), UBound(arrAllItems))</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>.Select "#" & intItem</div><div> </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Reporter.ReportEvent micInfo, "ListItemIsNotFound", "Item: " & <span class="Apple-tab-span" style="white-space:pre"> </span>.GetROProperty("value")</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>End With</div><div>End Function</div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-20133993580649658392012-04-06T19:47:00.000+05:302012-04-25T15:43:53.476+05:30Function to Execute Multiple QTP Scripts<div><span ><br /></span></div><div><span ><br /></span></div><div><span >Function LoadAndRun()</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>arrColl = Array("C:\filename1","C:\filename2","C:\filename3")</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>For each arrTest in arrColl</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>qtApp.Open arrTest</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>set qtTest = qtApp.Test</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>set objResultsOptions = CreateObject("QuickTest.RunResultsOptions") </span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>objResultsOptions.ResultsLocation = arrTest & "\Res1" </span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>qtTest.Run objResultsOptions </span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>qtTest.Close</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>Next</span></div><div><span >End Function</span></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-32852658104048686232012-04-06T17:44:00.000+05:302012-04-25T15:43:53.477+05:30RegisterUserFunc Example<div><span >' function : GetItemsCountFunction</span></div><div><span >' desc : Returns the number of items from a weblist</span></div><div><span ><br /></span></div><div><span >Function GetItemsCountFunction(objWebList)</span></div><div><span ><br /></span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>If (objWebList = Nothing) Then</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>GetItemsCount = 0</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>Else</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>GetItemsCount = objWebList.GetROProperty("Items Count")</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>End If</span></div><div><span ><br /></span></div><div><span >End Function</span></div><div><span ><br /></span></div><div><span >'add GetItemsCount as a method of the WebList class</span></div><div><span >RegisterUserFunc "WebList", "GetItemsCount", "GetItemsCountFunction"</span></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-38241348745892705892012-04-06T17:40:00.000+05:302012-04-25T15:43:53.477+05:30Function Call to read a Text File<div><span>Function ReadTextFile(strFilePath) </span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' reading a file line by line</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Const ForReading = 1</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' create file system object</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Set objFS = CreateObject("Scripting.FileSystemObject")</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' first check that the file exists</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>If objFS.FileExists(strFilePath) Then</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' open the text file for reading</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Set objFile = objFS.OpenTextFile(strFilePath, ForReading, False)</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' do until at end of file</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Do Until objFile.AtEndOfStream</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' store the value of the current line in the file</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>strLine = objFile.ReadLine</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' show the line from the file</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>MsgBox strLine</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Loop ' next line</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' close the file</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>objFile.Close</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Set objFile = Nothing</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Else ' file doesn't exist</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' report a failure</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Reporter.ReportEvent micFail, "Read File", "File not found"</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>End if ' file exists</span></div><div><span><br /></span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>' destroy the objects</span></div><div><span><span class="Apple-tab-span" style="white-space:pre"> </span>Set objFS = Nothing</span></div><div><span><br /></span></div><div><span>End Function</span></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-17986075302902294942012-04-06T17:35:00.000+05:302012-04-25T15:43:53.477+05:30Function Call for write to a Text File<div><span >Function AppendtTextFile(strFileName, strLine)</span></div><div><span ><br /></span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>Dim objFS</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span></span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>Const ForAppending = 8</span></div><div><span ><br /></span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>' create the file system object</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>Set objFS = CreateObject("Scripting.FileSystemObject")</span></div><div><span ><br /></span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>' open/create the text file</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>Set objFile = objFS.OpenTextFile(strFilename, ForAppending, True)</span></div><div><span ><br /></span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>' write the line</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>objFile.WriteLine strLine</span></div><div><span ><br /></span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>' close the file</span></div><div><span ><span class="Apple-tab-span" style="white-space:pre"> </span>objFile.Close</span></div><div><span ><br /></span></div><div><span >End Function ' </span></div><div><span ><br /></span></div><div><span ><br /></span></div><div><span style="font-family: Georgia, serif; ">AppendtTextFile</span> </div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-5849064013652198182012-04-05T21:05:00.000+05:302012-04-25T15:43:53.478+05:30Benefits of Automated Testing<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="margin-left:3.75pt;border-collapse:collapse;mso-table-layout-alt:fixed; mso-padding-alt:0in 3.75pt 0in 3.75pt"> <tbody><tr> <td width="624" colspan="2" style="width:467.95pt;border:ridge windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" align="center" style="margin-top:5.0pt;margin-right:0in; margin-bottom:5.0pt;margin-left:0in;text-align:center;mso-layout-grid-align: none;text-autospace:none"><b>Benefits of Automated Testing <o:p></o:p></b></p> </td> </tr> <tr> <td width="120" style="width:1.25in;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15521"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Fast <o:p></o:p></p> </td> <td width="504" style="width:377.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15523"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">QuickTest runs tests significantly faster than human users. <o:p></o:p></p> </td> </tr> <tr> <td width="120" style="width:1.25in;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15525"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Reliable <o:p></o:p></p> </td> <td width="504" style="width:377.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15527"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Tests perform precisely the same operations each time they are run, thereby eliminating human error. <o:p></o:p></p> </td> </tr> <tr> <td width="120" style="width:1.25in;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15529"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Repeatable <o:p></o:p></p> </td> <td width="504" style="width:377.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15531"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">You can test how the Web site or application reacts after repeated execution of the same operations. <o:p></o:p></p> </td> </tr> <tr> <td width="120" style="width:1.25in;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15533"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Programmable <o:p></o:p></p> </td> <td width="504" style="width:377.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15535"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">You can program sophisticated tests that bring out hidden information. <o:p></o:p></p> </td> </tr> <tr> <td width="120" style="width:1.25in;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15537"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Comprehensive <o:p></o:p></p> </td> <td width="504" style="width:377.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15539"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">You can build a suite of tests that covers every feature in your Web site or application. <o:p></o:p></p> </td> </tr> <tr> <td width="120" style="width:1.25in;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15541"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Reusable <o:p></o:p></p> </td> <td width="504" style="width:377.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp15543"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">You can reuse tests on different versions of a Web site or application, even if the user interfaces changes. <o:p></o:p></p> </td> </tr> </tbody></table>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-25286158037695288012012-04-05T21:02:00.000+05:302012-04-25T15:43:53.478+05:30Built-in Environment Variables<p class="MsoNormal" style="margin-top: 5pt; margin-right: 0in; margin-bottom: 5pt; margin-left: 0in; page-break-after: avoid; "></p><p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt; margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><b><span style="font-size: 14pt; font-family: Georgia; ">Built-in Environment Variables:</span></b></p><p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt; margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><span style="font-size: 100%; ">QuickTest provides a set of built-in variables that enable you to use current information about the test and the QuickTest computer running your test. These can include the test name, the test path, the operating system type and version, and the local host name.</span></p><p></p><p class="MsoNormal" style="font-size: 100%; font-weight: normal; margin-top: 5pt; margin-right: 0in; margin-bottom: 5pt; margin-left: 0in; "><a name="wp96586"></a></p> <p class="MsoNormal" style="font-size: 100%; font-weight: normal; margin-top: 5pt; margin-right: 0in; margin-bottom: 5pt; margin-left: 0in; ">For example, you may want to perform different checks in your test based on the operating system being used by the computer that is running the test. To do this, you could include the OSVersion built-in environment variable in an If statement. <a name="wp231985"></a></p> <p class="MsoNormal" style="font-size: 100%; font-weight: normal; margin-top: 5pt; margin-right: 0in; margin-bottom: 5pt; margin-left: 0in; ">You can also select built-in environment variables when parameterizing values.</p> <p class="MsoNormal" style="font-size: 100%; font-weight: normal; margin-top: 5pt; margin-right: 0in; margin-bottom: 5pt; margin-left: 0in; ">The following built-in environment variables are available:<span style="font-size: 100%; "> </span></p> <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="font-size: 100%; font-weight: normal; margin-left: 3.75pt; border-collapse: collapse; "> <tbody><tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;mso-border-alt: three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" align="center" style="margin-top:5.0pt;margin-right:0in; margin-bottom:5.0pt;margin-left:0in;text-align:center;mso-layout-grid-align: none;text-autospace:none"><a name="wp111813"></a><b> </b></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><b>Name <o:p></o:p></b></p> </td> <td width="468" style="width:350.95pt;border:ridge windowtext 2.25pt; border-left:none;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" align="center" style="margin-top:5.0pt;margin-right:0in; margin-bottom:5.0pt;margin-left:0in;text-align:center;mso-layout-grid-align: none;text-autospace:none"><a name="wp111815"></a><b> </b></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><b>Description <o:p></o:p></b></p> </td> </tr> <tr style="mso-yfti-irow:1;height:31.5pt"> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt;height:31.5pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp140815"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">ActionIteration </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt; height:31.5pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp140817"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The action iteration currently running. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200354"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">ControllerHostName </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200356"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The name of the controller's computer. This variable is relevant only when running as a GUI Vuser from the LoadRunner controller. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200333"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">GroupName </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200335"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The name of the group in the running scenario. This variable is relevant only when running as a GUI Vuser from the LoadRunner controller. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111817"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">LocalHostName </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111819"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The local host name. </p> </td> </tr> <tr style="mso-yfti-irow:5;height:.5in"> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt;height:.5in"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111821"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">OS </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt; height:.5in"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111823"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The operating system. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111825"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">OSVersion </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111827"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The operating system version. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200379"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">ProductDir </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200381"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The folder path where the product is installed. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp140828"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">ProductName </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp140830"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The product name. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp140832"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">ProductVer </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp140834"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The product version. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111829"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">ResultDir </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111831"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The path of the folder in which the current test results are located. <a name="wp296443"></a></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Note: You cannot use the ResultDir environment variable when running a test from <st1:place st="on"><st1:placename st="on">Business</st1:placename> <st1:placename st="on">Availability</st1:placename> <st1:placetype st="on">Center</st1:placetype></st1:place>, LoadRunner, or the Silent Test Runner in QuickTest. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200361"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">ScenarioId </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200363"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The identification number of the scenario. This variable is relevant only when running as a GUI Vuser from the LoadRunner controller. </p> </td> </tr> <tr style="mso-yfti-irow:12;height:30.15pt"> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt;height:30.15pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111833"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">SystemTempDir </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt; height:30.15pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111835"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The system temporary directory. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111837"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">TestDir </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111839"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The path of the folder in which the test is located. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp140823"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">TestIteration </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp140825"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The test iteration currently running. </p> </td> </tr> <tr style="mso-yfti-irow:15;height:30.6pt"> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt;height:30.6pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111848"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">TestName </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt; height:30.6pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111850"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The name of the test. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200385"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">UpdatingActiveScreen </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200387"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Indicates whether the Active Screen images and values are being updated during the update run process. For more information, see <a href="file:///D:/Vidyasagar/QTP/QTP_PPT/Updating_a_test.htm">Updating a Test Using the Update Run Mode Option</a>. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200389"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">UpdatingCheckpoints </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200405"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Indicates whether checkpoints are being updated during the update run process. For more information, see <a href="file:///D:/Vidyasagar/QTP/QTP_PPT/Updating_a_test.htm">Updating a Test Using the Update Run Mode Option</a>. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200393"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">UpdatingTODescriptions </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200415"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">Indicates whether the set of properties used to identify test objects are being updated during the update run process. For more information, see <a href="file:///D:/Vidyasagar/QTP/QTP_PPT/Updating_a_test.htm">Updating a Test Using the Update Run Mode Option</a>. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111844"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">UserName </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp111846"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The Windows login user name. </p> </td> </tr> <tr> <td width="156" style="width:117.0pt;border:ridge windowtext 2.25pt;border-top: none;mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-alt:three-d-emboss windowtext 2.25pt; padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200368"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">VuserId </p> </td> <td width="468" style="width:350.95pt;border-top:none;border-left:none; border-bottom:ridge windowtext 2.25pt;border-right:ridge windowtext 2.25pt; mso-border-top-alt:three-d-emboss windowtext 2.25pt;mso-border-left-alt:three-d-emboss windowtext 2.25pt; mso-border-alt:three-d-emboss windowtext 2.25pt;padding:0in 3.75pt 0in 3.75pt"> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none"><a name="wp200370"></a><o:p> </o:p></p> <p class="MsoNormal" style="margin-top:5.0pt;margin-right:0in;margin-bottom: 5.0pt;margin-left:0in;mso-layout-grid-align:none;text-autospace:none">The Vuser identification under load. This variable is relevant only when running as a GUI VUser from the LoadRunner controller. </p> </td> </tr> </tbody></table>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-40788884044945459022012-04-05T20:45:00.000+05:302012-04-25T15:43:53.479+05:30<p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; "><b><span style="font-size:18.0pt">QTP Script Performance Tips:</span></b><span style="font-size:11.5pt"><o:p></o:p></span></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt"> </span><span style="font-size: 11.5pt; ">QTP script optimization techniques. It covers ideal QTP settings and VBScript coding best practices to improve script execution performance.</span></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; "><b style="font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">1.Always set QTP to run in Fast mode instead of <st1:place st="on">Normal</st1:place> mode</span></b></p> <p class="Default" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">QTP scripts can be executed in two modes <st1:city st="on"><st1:place st="on">Normal</st1:place></st1:city> and Fast. <o:p></o:p></span></p> <p class="Default" style="font-weight: normal; "><span style="font-size: 11.5pt; ">Normal (displays execution marker)—Runs your test or component with the execution arrow to the left of the Keyword View or Expert View, marking each step or statement as it is performed. If the test contains multiple actions, the tree in the Keyword View Item column expands to display the steps, and the Expert View displays the script, of the currently running action.</span></p> <p class="Default" style="font-weight: normal; "><span style="font-size: 10pt; "> </span><span style="font-size: 11.5pt; ">Fast—Runs your test or component without the execution arrow to the left of the Keyword View or Expert View (for tests) and does not expand the item tree or display the script of each action as it runs. This option requires fewer system resources.</span></p> <p class="Default" style="font-weight: normal; "><span style="font-size: 11.5pt; font-family: Georgia, serif; ">We can save the time which QTP takes to display execution marker and enhance the performance of our scripts.</span></p> <p class="MsoNormal" style="font-weight: normal; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">2. Always disable smart identification.</span></b></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt">If QTP is unable to find an object using the learner object description it uses the smart identification mechanism for object identification. The Smart Identification mechanism takes more time to identify objects in case of failures as it checks all candidate objects and tries to find a match based on base and optional filter properties. If we turn off the Smart Identification mechanism then we can improve script performance in case of failures.<o:p></o:p></span></p> <p class="MsoNormal" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">3. Always release all objects /variables after usage.</span></b></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; "><span style="font-size: 11.5pt; ">Function PrintValue()</span></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; text-indent: 0.5in; "><span style="font-size:11.5pt">Dim a <o:p></o:p></span></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; text-indent: 0.5in; "><span style="font-size:11.5pt">x=100 <o:p></o:p></span></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; text-indent: 0.5in; "><span style="font-size:11.5pt">Print x <o:p></o:p></span></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; text-indent: 0.5in; "><span style="font-size:11.5pt">x=Null <o:p></o:p></span></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt">End Function <o:p></o:p></span></p> <p class="MsoNormal" style="font-weight: normal; font-family: Georgia, serif; "><span style="font-size: 11.5pt; ">The Nothing keyword in VBScript is used to disassociate an object variable from any actual object. Use the Set statement to assign Nothing to an object variable. For example: Set MyObject = Nothing</span></p> <p class="MsoNormal" style="font-weight: normal; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size: 11.5pt;font-family:"Times New Roman"">4.</span></b><span style="font-size: 11.5pt; "> <b>Use QTP's inbuilt dictionary object instead of arrays for storing values wherever possible</b>.</span></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">5. Always use WaitProperty statements instead of hardcoded wait.</span></b></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><span style="font-size: 11.5pt; ">A wait statement will halt the script execution for the specified time irrespective of whether the object we are waiting for has loaded or not. On the other hand Wait Property waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.</span></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">6. Provide a specific time limit for the exist command.</span></b></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">7. Set Global sync time to 1 sec</span></b></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">8. Launch QTP by creating a script that uses the Automation Object model. The script can be used to launch QTP with the required add-ins and QTP settings.</span></b></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">9. Create object references for frequently used objects in scripts.</span></b></p> <p class="Default" style="font-weight: normal; "><span style="font-size: 11.5pt; ">e.g: </span><span style="font-size: 11.5pt; "> </span><span style="font-size: 11.5pt; ">Set UName = Browser("Br").Page("Pg").WebEdit("login").Object</span></p> <p class="Default" style="font-weight: normal; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size: 11.5pt;font-family:"Times New Roman"">10.</span></b><span style="font-size: 11.5pt; "> <b>Use select case construct instead of if.. elseif where it is possible to convert the if..elseif into the select case</b>.</span></p> <p class="Default" style="font-weight: normal; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">11. Use with statements to combine statements into a group that use the same parent hierarchy.</span></b></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">12. If we need to use the data stored in an excel file we should use code to connect to excel as a database and query on it as you would any other database rather than using the QTP datatable object.</span></b></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size: 11.5pt;font-family:"Times New Roman"">13.</span></b><span style="font-size: 11.5pt; "> <b>Use custom error/exception handling instead of Recovery scenarios to handle exceptions in scripts</b></span></p> <p class="Default" style="font-weight: normal; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">14. Use a judicious mix of Actions and functions</span></b></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">15. Declare all variables and functions in a separate .vbs file and associate it with your action.</span></b></p> <p class="Default"><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">16. Turn off image downloads incase they are not validated.</span></b></p> <p class="Default" style="font-weight: normal; font-size: 100%; "><b style="font-family: Georgia, serif; font-size: 100%; "><span style="font-size:11.5pt;font-family:"Times New Roman"">17. Tune your object identification settings for the environments and objects you are dealing with to best reflect your application objects identification.</span></b></p> <p class="Default" style="font-weight: normal; "><span style="font-size: 15px;"><br /></span></p>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-44002262147415796452012-04-05T20:22:00.001+05:302012-04-25T15:43:53.479+05:30Recovery Scenarios in QTP<div dir="ltr" style="text-align: left;" trbidi="on"><div class="MsoNormal"><b>Recovery Scenarios in QTP<o:p></o:p></b></div><div class="MsoNormal"><b> </b>Recovery scenario - a definition of an unexpected event or error or application crash and the operation(s) necessary to recover the run session</div><div class="MsoNormal"><b>A recovery scenario consists of the following:</b></div><div class="MsoNormal">a. Trigger Event—The event that interrupts your run session</div><div class="MsoNormal">b. Recovery Operation(s)—The operation(s) that need to be performed in order to continue running the test or component</div><div class="MsoNormal">c. Post-Recovery Test Run Option—The instructions on how Quick Test should proceed once the recovery operations have been performed, and from which point in the test or component Quick Test should continue, if at all.</div><div class="MsoNormal"><b> Recommendations for using Recovery Scenarios</b></div><div class="MsoNormal"><b> </b>1. If you can predict that a certain event may happen at a specific point in your component, it is highly recommended to handle that event directly within your component by adding steps such as If statements or “Optional Steps” in user-defined functions, rather than depending on a recovery scenario.</div><div class="MsoNormal">2. You should use recovery scenarios only for unpredictable events, or events that you cannot synchronize with a specific step in your component.<b><o:p></o:p></b></div><div class="MsoNormal">3. Handling an event directly within your component enables you to handle errors more specifically than recovery scenarios. It also enables you to control the timing of the corrective operation with minimal resource usage and maximum performance. <b><o:p></o:p></b></div><div class="MsoNormal"><b> Different Recovery Operations:</b></div><div class="MsoNormal"><a href="" name="wp267503">1. </a>Keyboard or mouse operation—Quick Test simulates a click on a button in a window or a press of a keyboard key. <a href="" name="wp265351"></a><b><o:p></o:p></b></div><div class="MsoNormal">2. Close application process—Quick Test closes specified processes.<b><o:p></o:p></b></div><div class="MsoNormal">3. Restart Microsoft Windows—Quick Test restarts Microsoft Windows. <b><o:p></o:p></b></div><div class="MsoNormal">Note: If you use the Restart Microsoft Windows recovery operation, you must ensure that any component associated with this recovery scenario is saved before you run it. You must also configure the computer on which the component is run to automatically log in on restart.</div><div class="MsoNormal"><a href="" name="wp265355">4. </a>Function call—Quick Test calls a VBScript function. <a href="" name="wp265359"></a><b><o:p></o:p></b></div><div class="MsoNormal"><b> </b>Note: User can select an existing function from a library file or he can define a new function. The new function is added to the function library you selected.</div><div class="MsoNormal"><b> Different Post-Recovery Test Run Options:</b></div><div class="MsoNormal"><a href="" name="wp267679" style="font-weight: bold;"> </a>1. <a href="" name="wp263181"></a><a href="" name="wp262061"></a>Repeat current step and continue</div><div class="MsoNormal"><a href="" name="wp292199"></a>The current step is the step that Quick Test was running when the recovery scenario was triggered. <b><o:p></o:p></b></div><div class="MsoNormal">Note: If you are using the On error activation option for recovery scenarios, the step that returns the error is often one or more steps later than the step that caused the trigger event to occur. <a href="" name="wp296427"></a>Thus, in most cases, repeating the current step does not repeat the trigger event. <b><o:p></o:p></b></div><div class="MsoNormal"><a href="" name="wp262071">2. </a>Proceed to next step<b><o:p></o:p></b></div><div class="MsoNormal"><a href="" name="wp292239"></a>Skips the step that Quick Test was running when the recovery scenario was triggered. <b><o:p></o:p></b></div><div class="MsoNormal">Note: Keep in mind that skipping a step that performs operations on your application may cause subsequent steps to fail. <b><o:p></o:p></b></div><div class="MsoNormal"><a href="" name="wp292276">3. </a>Restart current test run<b><o:p></o:p></b></div><div class="MsoNormal"><a href="" name="wp292277"></a>Stops performing steps and re-runs the component from the beginning. <b><o:p></o:p></b></div><div class="MsoNormal"><a href="" name="wp292278">4. </a>Stop the test run<b><o:p></o:p></b></div><div class="MsoNormal"><a href="" name="wp292285"></a>Stops running the component. <b><o:p></o:p></b></div><div class="MsoNormal"><a href="" name="wp292292"></a>Note: If you chose Restart Microsoft Windows as a recovery operation, you can choose from only the last two test run options listed above. <b><o:p></o:p></b></div><div class="MsoNormal"><b> Associating Recovery Scenarios with the test:</b></div><div class="MsoNormal">a. While associating the recovery with your test, you need to specify when you want to activate recovery scenarios i.e. only on errors or on every steps. <b><o:p></o:p></b></div><div class="MsoNormal">b. If you select On errors option then keep in mind that by default, recovery operations will be activated only when a step returns an error, which can potentially occur several steps after the one that actually caused the error. So you may get the advantages of using recovery scenarios.<b><o:p></o:p></b></div><div class="MsoNormal">Note: If you are using “On Error Resume Next” statement in a script which has some activated Recovery scenarios then keep in mind that “On Error Resume Next” is NOT going to affect the triggering of Recovery Scenario i.e. Recovery Scenarios has priority over “On Error Resume Next”.<b><o:p></o:p></b></div><div class="MsoNormal">c. If you select on every steps then keep in mind that checking for trigger events after every step, may slow performance. <b><o:p></o:p></b></div><div class="MsoNormal">Note: In this case, use “Recovery Object” which enables you to control the recovery scenario mechanism programmatically during the run session. “Activate Method” is an useful method associated with Recovery Object which explicitly activates the recovery scenario mechanism at a specific point in the run. Activating recovery scenarios in particular section of the script, where the probability of unexpected event or error or application crash is high, can improve performance.<b><o:p></o:p></b></div><div class="MsoNormal"><span style="color: #333333; font-family: 'times new roman';"><b><br />
</b></span></div><div class="MsoNormal"><span style="color: #333333; font-family: 'times new roman';"><b>When To Use Recovery Scenarios</b></span></div><div class="MsoNormal"><span style="color: #333333; font-family: 'times new roman';">Recovery scenarios are intended for use only with events that you cannot predict in advance, or for events that you cannot otherwise synchronize with a specific step in your test. For example, you could define a recovery scenario to handle printer errors. Then if a printer error occurs during a run session, the recovery scenario could instruct QuickTest to click the default button in the Printer Error message box.</span></div><div class="MsoNormal"><b><a href="" name="wp441238"></a><a href="http://draft.blogger.com/post-edit.g?blogID=7989568078672676567&postID=1371653431479112875"></a><span style="color: #333333;"><o:p></o:p></span></b></div><div class="MsoNormal"><span style="color: #333333;">You would use a recovery scenario in this example because you cannot handle this type of error directly in your test. This is because you cannot know at what point the network will return the printer error. Even if you try to handle this event by adding an If statement in your test immediately after a step that sends a file to the printer, your test may progress several steps before the network returns the actual printer error. <b><o:p></o:p></b></span></div><div class="MsoNormal"><b><a href="" name="wp441199"></a><a href="http://draft.blogger.com/post-edit.g?blogID=7989568078672676567&postID=1371653431479112875"></a><span style="color: #333333;"><o:p></o:p></span></b></div><div class="MsoNormal"><span style="color: #333333;">If you can predict that a certain event may happen at a specific point in your test, it is highly recommended to handle that event directly within your test by adding steps such as If statements or optional steps, rather than depending on a recovery scenario. For example, if you know that an Overwrite File message box may open when a Save button is clicked during a run session, you can handle this event with an If statement that clicks OK if the message box opens or by adding an optional step that clicks OK in the message box. <b><o:p></o:p></b></span></div><div class="MsoNormal"><b><a href="" name="wp441296"></a><a href="http://draft.blogger.com/post-edit.g?blogID=7989568078672676567&postID=1371653431479112875"></a><span style="color: #333333;"><o:p></o:p></span></b></div><div class="MsoNormal"><span style="color: #333333;">Handling an event directly within your test enables you to handle errors more specifically than recovery scenarios, which by nature are designed to handle a more generic set of unpredictable events. It also enables you to control the timing of the corrective operation with minimal resource usage and maximum performance. By default, recovery scenario operations are activated only after a step returns an error. This can potentially occur several steps after the step that originally caused the error. The alternative, checking for trigger events after every step, may slow performance. For this reason, it is best to handle predictable errors directly in your test. <b><o:p></o:p></b></span></div><div class="MsoNormal"><b><a href="" name="wp636096"></a><a href="http://draft.blogger.com/post-edit.g?blogID=7989568078672676567&postID=1371653431479112875"></a><span style="color: #333333;"><o:p></o:p></span></b></div><div class="MsoNormal"><b><br />
</b></div></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-84535426259095729042012-04-05T20:02:00.000+05:302012-04-25T15:43:53.479+05:30Test Automation Guidelines<div><span >Test Automation guidelines</span></div><div><span ><br /></span></div><div><span >Test Automation now an integrated part of software testing activity. It defines the quality of product by regressive testing the areas in short time. Proper guidance, strategy & framework make the automation effective and right investment for testing. </span></div><div><span ><br /></span></div><div><span >The main factors are:</span></div><div><span ><br /></span></div><div><span >1.Basics of Test Automation</span></div><div><span >2.Need for Automation</span></div><div><span >3.Relationship with Regression Testing</span></div><div><span >4.Industry Facts</span></div><div><span >5.Automation requirements Analysis</span></div><div><span >6.Guideline for Test Automation</span></div><div><span >7.Selection of tools</span></div><div><span >8.Optimum usage of test automation in test life cycle </span></div><div><span >9.Automation Framework</span></div><div><span >10.Estimation for Automation & Factors affecting estimation</span></div><div><span >11.Automation Entry and Exit Criteria</span></div><div><span >12.Test Plan development</span></div><div><span >13.Automation test plan review and understanding</span></div><div><span >14.Managing test data and environment</span></div><div><span >15.Script Design, Development and Execution</span></div><div><span >16.Reporting</span></div><div><span >17.Case study</span></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-67628908774757943232012-01-25T16:59:00.000+05:302012-04-25T15:43:53.479+05:30Automation Benefits<div>Automation Benefits:</div><div><br />1. Run existing(Regresson) tests on a new version of a program</div><br /><div>2. Run more tests more often</div><br /><div>3. Perform tests which would be difficult or impossible to do manually</div><br /><div>4. Better use of resources</div><br /><div>5. Consistency and repeatability of tests</div><br /><div>6. Reuse of tests</div><br /><div>7. Earlier time to market</div><br /><div>8. Increased confidence</div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0tag:blogger.com,1999:blog-685727548994491437.post-40811737333386152202012-01-06T20:20:00.001+05:302012-06-14T21:14:28.909+05:30Xpath Usage in QTP 11<div dir="ltr" style="text-align: left;" trbidi="on"><div></div><br />
<span style="font-size: 100%;">Dim ObjPage</span><br />
<br />
<div>Set ObjPage=Browser("name:=Brw").Page("title:=Pge") </div><br />
<div>ObjPage.WebEdit("xpath:=//INPUT[@name='username']").Set "FirstUser"</div><br />
<div>ObjPage.WebEdit("xpath:=//INPUT[@name='password']").Set "Password"</div><br />
<div>ObjPage.WebButton("xpath:=//INPUT[@name=Login]").Click</div></div>Vidyasagarhttp://www.blogger.com/profile/10804467371171004760noreply@blogger.com0