<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5528709051591542403</id><updated>2012-01-27T15:46:17.294+05:30</updated><category term='Automated testing'/><category term='QTP Actions'/><category term='Recording'/><category term='DataTable'/><category term='Certification'/><category term='QTP'/><category term='Checkpoint'/><title type='text'>QTP Tutorials</title><subtitle type='html'>This blog contains QTP tutorials for the beginners</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>66</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-4267588618260301218</id><published>2012-01-05T21:28:00.001+05:30</published><updated>2012-01-05T21:51:19.018+05:30</updated><title type='text'>QTP11 Support for Google Chrome</title><content type='html'>The wait has finally over. QTP 11 now supports Google Chrome. Google Chrome was released in March 2008 and after stuggling a bit initially, now it enjoys a very healthy market share amongst other browsers. With Google chrome reaching near to 25% market share according to stats from Statcounter, HP people were forced to provide chrome support for HP QTP 11.&lt;br /&gt;&lt;br /&gt;For that, we need to install HP Patch&lt;span style="font-weight: bold;"&gt; QTPWEB_00088&lt;/span&gt;. But it comes with few limitations too.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;QTP can not record on Google Chrome. It can only play back scripts in Chrome, a big limitation.&lt;/li&gt;&lt;li&gt;Support for multiple tabs is not available unlike in IE or firefox.&lt;/li&gt;&lt;li&gt;Few methods like Browser.Home, Browser.FullScreen, Browser.ClearCache and Browser.Object are not supported in Google Chrome.&lt;/li&gt;&lt;li&gt;Few environments: SAP Web, Siebel, Java,.NET WebForms are not supported on Google Chrome browser with QTP 11.&lt;/li&gt;&lt;/ul&gt;You can download this QTP patch from here: &lt;a href="http://support.openview.hp.com/selfsolve/document/KM1276297"&gt;Link&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-4267588618260301218?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/4267588618260301218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=4267588618260301218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4267588618260301218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4267588618260301218'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2012/01/qtp11-google-chrome-support-qtpweb00088.html' title='QTP11 Support for Google Chrome'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-7767765423084116378</id><published>2011-12-29T20:53:00.000+05:30</published><updated>2011-12-29T20:54:12.895+05:30</updated><title type='text'>VBScript Passing Values ByVal ByRef</title><content type='html'>In VBScript, there are two ways values can be passed to functions: by value or by reference.&lt;br /&gt;&lt;br /&gt;Lets see a quick example to see how parameters are passed by value.&lt;br /&gt;&lt;br /&gt;Function func_Value( ByVal var)&lt;br /&gt;   var = var + 1&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Dim x&lt;br /&gt;x = 10&lt;br /&gt;&lt;br /&gt;func_Value x&lt;br /&gt;&lt;br /&gt;When you run the above code in your QTP editor, you will get the output as 10. What has actually happened is when you have passed the argument by value, a copy of the variable x is passed to the variable "var". Inside the function, this "var" variable gets incremented to 1 and when the function ends, this variable gets destroyed as it was a local variable. So no change is being done to our global variable "x".&lt;br /&gt;&lt;br /&gt;In order to increment the global variable x, we need to make a very small change in our VBScript code. Instead of the ByVal keyword, all we need to do is to change it to ByRef keyword.&lt;br /&gt;&lt;br /&gt;The modified code would be:&lt;br /&gt;&lt;br /&gt;Function func_Value( ByRef var)&lt;br /&gt;   var = var + 1&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Dim x&lt;br /&gt;x = 10&lt;br /&gt;&lt;br /&gt;func_Value x&lt;br /&gt;&lt;br /&gt;Now on executing the above code, the output would be 11. The reason being, the local variable "var" is pointing to the same location in memory as the variable x. So whatever changes we will make through the variable "var", they will be reflected in variable "x" also. This technique is called passing values by reference.&lt;br /&gt;&lt;br /&gt;In the above code, if we omit the ByRef keyword, still the arguments would be passed by reference.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;Function func_Value(var)&lt;br /&gt;   var = var + 1&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Dim x&lt;br /&gt;x = 10&lt;br /&gt;&lt;br /&gt;func_Value x&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-7767765423084116378?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/7767765423084116378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=7767765423084116378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7767765423084116378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7767765423084116378'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/12/vbscript-passing-values-byval-byref.html' title='VBScript Passing Values ByVal ByRef'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-6343091745906023632</id><published>2011-12-28T22:24:00.002+05:30</published><updated>2011-12-28T22:53:52.349+05:30</updated><title type='text'>VBScript GetRef Function</title><content type='html'>VBScript GetRef function returns a reference to a sub procedure or a function.&lt;br /&gt;&lt;br /&gt;Copy the below VBScript code in QTP editor and see the output:&lt;br /&gt;&lt;br /&gt;Function ShowMsg(ByVal sName)&lt;br /&gt;ShowMsg = "Hello, " + sName&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Set fnPtr = GetRef("ShowMsg")&lt;br /&gt;&lt;br /&gt;After using GetRef, fnPtr actually contains a reference of our function "ShowMsg". It means, now onwards both the function and its reference will do the same thing.&lt;br /&gt;&lt;br /&gt;Example, see the below code&lt;br /&gt;&lt;br /&gt;Msgbox fnPtr("HP_QTP")&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-6343091745906023632?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/6343091745906023632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=6343091745906023632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6343091745906023632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6343091745906023632'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/12/vbscript-set-getref-function-reference.html' title='VBScript GetRef Function'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-6534556627254996522</id><published>2011-08-03T21:40:00.005+05:30</published><updated>2011-08-03T22:27:33.159+05:30</updated><title type='text'>QTP Compare Two Dictionary Objects</title><content type='html'>The following function compares two Dictionary objects. This function assumes that the two dictionary objects hold simple values for example String, Date, Integer etc.&lt;br /&gt;&lt;br /&gt;The code goes here:&lt;br /&gt;&lt;br /&gt;###########################################################&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Function CompareDictionary(oDict1, oDict2)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; Dim i, arrKeys&lt;br /&gt;&lt;br /&gt; 'Check the most basic criteria - do the two Dictionary objects have the same number of items?&lt;br /&gt;&lt;br /&gt; If oDict1.Count &amp;lt;&amp;gt; oDict2.Count Then&lt;br /&gt;    CompareDictionary = False&lt;br /&gt;    Exit Function&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt; 'Compare all keys and their values&lt;br /&gt;&lt;br /&gt; arrKeys = oDict1.Keys&lt;br /&gt;For i = 0 to uBound(arrKeys)&lt;br /&gt;    'Compare keys&lt;br /&gt;If Not oDict2.Exists(arrKeys(i)) Then&lt;br /&gt;'oDict1 has a key which oDict2 doesn't have&lt;br /&gt;CompareDictionary = False&lt;br /&gt;Exit Function    &lt;br /&gt;&lt;br /&gt;  End If&lt;br /&gt;&lt;br /&gt;  'Compare values&lt;br /&gt;If oDict1(arrKeys(i)) &amp;lt;&amp;gt; oDict2(arrKeys(i)) Then&lt;br /&gt;'oDict1 value for arrKeys(i) differs from oDic2&lt;br /&gt;CompareDictionary = False&lt;br /&gt;Exit Function    &lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;'No need to check if oDict2 has values and keys that oDic1 doesn't have,&lt;br /&gt;'since oDict2 and oDict1 have the same number of values.&lt;br /&gt;'So if oDict2 has every value &amp;amp; key oDict1 has, it can't have any extra values and keys&lt;br /&gt;&lt;br /&gt;CompareDictionary = True 'If this executes, both Dictionaries match&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;###########################################################&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Have questions on this article? Feel free to ask me in the comments section below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If you like this post, I would suggest you to subscribe my &lt;/span&gt;&lt;a style="font-style: italic;" href="http://feeds.feedburner.com/QTPTutorials"&gt;RSS feed&lt;/a&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt; to have future articles delivered to your email address directly.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-6534556627254996522?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/6534556627254996522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=6534556627254996522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6534556627254996522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6534556627254996522'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/08/qtp-compare-two-dictionary-objects.html' title='QTP Compare Two Dictionary Objects'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5287884841584071542</id><published>2011-08-03T21:09:00.002+05:30</published><updated>2011-08-03T21:30:35.634+05:30</updated><title type='text'>QTP Select Complete Text</title><content type='html'>In our previous &lt;a href="http://qtpgoodtutorials.blogspot.com/2011/06/qtp-mercury-devicereplay-vs-sendkeys.html"&gt;article&lt;/a&gt;, we have discussed two powerful utilities : &lt;a href="http://qtpgoodtutorials.blogspot.com/2011/06/qtp-mercury-devicereplay-vs-sendkeys.html"&gt;Mercury DeviceReplay and Sendkeys&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here we will discuss a quick tip using Mercury DeviceReplay which will simulate "Control-A" through the keyboard.&lt;br /&gt;&lt;br /&gt;The code goes here:&lt;br /&gt;&lt;br /&gt;Const VK_CONTROL = 29&lt;br /&gt;Const VK_A = 30&lt;br /&gt;&lt;br /&gt;Set DeviceReplay = CreateObject("Mercury.DeviceReplay")&lt;br /&gt;DeviceReplay.KeyDown VK_CONTROL&lt;br /&gt;DeviceReplay.PressKey VK_A&lt;br /&gt;DeviceReplay.KeyUp VK_CONTROL&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Have questions on this article? Feel free to ask me in the comments section below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If you like this post, I would suggest you to subscribe my &lt;/span&gt;&lt;a style="font-style: italic;" href="http://feeds.feedburner.com/QTPTutorials"&gt;RSS feed&lt;/a&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt; to have future articles delivered to your email address directly.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5287884841584071542?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5287884841584071542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5287884841584071542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5287884841584071542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5287884841584071542'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/08/qtp-select-complete-text-ctrl.html' title='QTP Select Complete Text'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-1832782225018843004</id><published>2011-07-31T00:40:00.004+05:30</published><updated>2011-07-31T01:02:05.450+05:30</updated><title type='text'>QTP Multiple Choice Questions Part4</title><content type='html'>1. To modify a called external action, you may or may not open the test with which the action is stored and make your modifications there.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;2. Input values for an action parameter in QTP can be retrieved from any of the following:&lt;br /&gt;&lt;br /&gt;A) the test (for a top-level action)&lt;br /&gt;B) the parameters of the parent action that calls it (for a nested action)&lt;br /&gt;C) the VBScript Engine&lt;br /&gt;D) the output of a previous action call (for a sibling action)&lt;br /&gt;&lt;br /&gt;3. Action parameters in Quicktest enable you&lt;br /&gt;&lt;br /&gt;A) to transfer input values from your test to a top-level action,&lt;br /&gt;B) to transfer input values from a parent action to a nested action,&lt;br /&gt;C) to transfer input values from an action to a sibling action that occurs later in the test.&lt;br /&gt;D) to transfer output values from a step in an action to its parent action,&lt;br /&gt;E) to transfer output values from a top-level action back to the script or application that ran (called) your test.&lt;br /&gt;&lt;br /&gt;4. The actual value specified for an input action parameter and the location specified for action output parameter cannot be different for each call to the action.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;5. You can share a value that is generated in one action with other actions in your test by storing the value in the global data table. Other actions can then use the value in the data table as an ..... parameter.&lt;br /&gt;&lt;br /&gt;A) input&lt;br /&gt;B) output&lt;br /&gt;C) both&lt;br /&gt;D) none&lt;br /&gt;&lt;br /&gt;6. As an alternative to using environment variables to share values between actions, you can use the Dictionary object.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;7. An action call in the Expert View of QTP can define&lt;br /&gt;&lt;br /&gt;A) the action iterations,&lt;br /&gt;B) inputparameter values,&lt;br /&gt;C) output parameter storage locations,&lt;br /&gt;D) an action return values.&lt;br /&gt;E) Both A &amp;amp; B&lt;br /&gt;&lt;br /&gt;8. An action call with parameters has the following syntax:&lt;br /&gt;&lt;br /&gt;A) RunAction ActionCall, IterationQuantity, Parameters&lt;br /&gt;B) RunAction ActionName, IterationQuantity, Parameters, Time&lt;br /&gt;C) RunAction ActionName, IterationQuantity, Parameters,&lt;br /&gt;D) RunAction ActionName, IterationQuality, Parameters&lt;br /&gt;&lt;br /&gt;9. If you expect other users to open your tests and all actions in your tests are stored in the same drive, you should use ....... paths for your reusable actions so that other users will be able to open your tests even if they have mapped their network drives differently.&lt;br /&gt;&lt;br /&gt;A) Relative&lt;br /&gt;B) Absolute&lt;br /&gt;C) Any&lt;br /&gt;D) None&lt;br /&gt;&lt;br /&gt;10. If a test contains a call to an action from another test, and that other test&lt;br /&gt;was renamed in Quality Center, the original test name still appears (in&lt;br /&gt;square brackets) in the Test Flow pane.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answers:&lt;br /&gt;&lt;br /&gt;1)b, 2)a,b,d 3) a,b,c,d,e 4) b, 5)a, 6) a, 7)a,b,c,d 8) c 9)a, 10) a&lt;br /&gt;&lt;br /&gt;You can view other questions here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp-multiple-choice-questions-answers.html"&gt;QTP Multiple Choice Questions in QTP Part1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp11-multiple-choice-questions-answers.html"&gt;QTP Multiple Choice Questions in QTP Part2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp10-download-multiple-choice.html"&gt;QTP Multiple Choice Questions in QTP Part3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp-features-multiple-choice-questions.html"&gt;QTP Multiple Choice Questions in QTP Part4&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-1832782225018843004?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/1832782225018843004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=1832782225018843004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1832782225018843004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1832782225018843004'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/qtp-features-multiple-choice-questions.html' title='QTP Multiple Choice Questions Part4'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-6715904345180326196</id><published>2011-07-31T00:22:00.004+05:30</published><updated>2011-07-31T01:03:14.166+05:30</updated><title type='text'>QTP Multiple Choice Questions Part3</title><content type='html'>1. You can use the Keyword View to add new steps to your test and but you cannot view and modify existing steps.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;2. In the keyword view, in a Value cell, press ....... to add line breaks (multi-line arguments) to your argument value.&lt;br /&gt;&lt;br /&gt;A) CTRL+ENTER&lt;br /&gt;B) SHIFT+ENTER&lt;br /&gt;C) ALT+ENTER&lt;br /&gt;D) F12+ENTER&lt;br /&gt;&lt;br /&gt;3. In a Value cell (keyword view),if you enter quotation marks as part of the argument value, they are included in the argument value used during the run session.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;4. You can copy or cut a parent object together with only some of its child objects.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;5. In case of Keyboard Shortcuts in the Keyword View, Press.... to add a new step below the currently selected step.&lt;br /&gt;&lt;br /&gt;A) F9&lt;br /&gt;B) F11&lt;br /&gt;C) F8&lt;br /&gt;D) F12&lt;br /&gt;&lt;br /&gt;6. ....... tool enables you to encode passwords so that you can use the resulting strings as method arguments or data table parameter values (enabling you to place secure values into the data table).&lt;br /&gt;&lt;br /&gt;A) Password Tool&lt;br /&gt;B) Password coder Tool&lt;br /&gt;C) Password decoder Tool&lt;br /&gt;D) Passworder Tool&lt;br /&gt;&lt;br /&gt;7. IntelliSense information works in the QTP keyword view.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;8. A test comprises calls from actions.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;9. An action consists of its own test script, including all of the steps in that action, and any objects in its shared object repository.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;10. An action in HP QTP can correspond to more than one DataSheet.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answers:&lt;br /&gt;&lt;br /&gt;1)b, 2)b, 3) a, 4) b, 5)c, 6) b, 7)a, 8) b, 9)a, 10) a&lt;br /&gt;&lt;br /&gt;You can view other questions here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp-multiple-choice-questions-answers.html"&gt;QTP Multiple Choice Questions in QTP Part1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp11-multiple-choice-questions-answers.html"&gt;QTP Multiple Choice Questions in QTP Part2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp10-download-multiple-choice.html"&gt;QTP Multiple Choice Questions in QTP Part3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp-features-multiple-choice-questions.html"&gt;QTP Multiple Choice Questions in QTP Part4&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-6715904345180326196?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/6715904345180326196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=6715904345180326196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6715904345180326196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6715904345180326196'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/qtp10-download-multiple-choice.html' title='QTP Multiple Choice Questions Part3'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5101352175303461715</id><published>2011-07-31T00:11:00.004+05:30</published><updated>2011-07-31T01:05:49.052+05:30</updated><title type='text'>QTP Multiple Choice Questions Part2</title><content type='html'>1. The automation infrastructure usually includes ...................&lt;br /&gt;&lt;br /&gt;A) one or more shared object repositories&lt;br /&gt;B) one or more function libraries&lt;br /&gt;C) Both A &amp;amp; B&lt;br /&gt;D) None&lt;br /&gt;&lt;br /&gt;2. HP QTP provides support for development environments using add-ins.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;3. While you record your test steps, QuickTest Professional creates test objects representing the objects in your application on which you perform operations. This enables QuickTest to identify the objects in your application both while and .&lt;br /&gt;&lt;br /&gt;A) creating a test&lt;br /&gt;B) during a run session&lt;br /&gt;C) Both A &amp;amp; B&lt;br /&gt;B) None&lt;br /&gt;&lt;br /&gt;4. By default, each test includes a single action, but can include multiple&lt;br /&gt;actions.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;5. By default, QuickTest records in the ............ recording mode.&lt;br /&gt;&lt;br /&gt;A) Analog&lt;br /&gt;B) Standard&lt;br /&gt;C) Normal&lt;br /&gt;D) Low Level&lt;br /&gt;&lt;br /&gt;6. This method enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window.&lt;br /&gt;&lt;br /&gt;A) Analog&lt;br /&gt;B) Standard&lt;br /&gt;C) Normal&lt;br /&gt;D) Low Level&lt;br /&gt;&lt;br /&gt;7. When you record in Analog Recording mode, QuickTest adds to your test a .......... statement that calls the recorded analog file.&lt;br /&gt;&lt;br /&gt;A) RunTime&lt;br /&gt;B) RunAnalog&lt;br /&gt;C) RunAction&lt;br /&gt;D) None&lt;br /&gt;&lt;br /&gt;8. You can switch to either Analog Recording or Low Level Recording in the middle of a recording session for specific steps.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;9. QuickTest can record only on Web browsers that were opened after QuickTest.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;10. QuickTest records the visual relation identifier property when recording steps.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answers:&lt;br /&gt;&lt;br /&gt;1)c, 2)a, 3) c, 4) a, 5)c, 6) a, 7)b, 8) a, 9)a, 10) b&lt;br /&gt;&lt;br /&gt;You can view other questions here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp-multiple-choice-questions-answers.html"&gt;QTP Multiple Choice Questions in QTP Part1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp11-multiple-choice-questions-answers.html"&gt;QTP Multiple Choice Questions in QTP Part2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp10-download-multiple-choice.html"&gt;QTP Multiple Choice Questions in QTP Part3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp-features-multiple-choice-questions.html"&gt;QTP Multiple Choice Questions in QTP Part4&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5101352175303461715?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5101352175303461715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5101352175303461715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5101352175303461715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5101352175303461715'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/qtp11-multiple-choice-questions-answers.html' title='QTP Multiple Choice Questions Part2'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2105791944370155316</id><published>2011-07-30T23:56:00.007+05:30</published><updated>2011-07-31T01:09:17.193+05:30</updated><title type='text'>QTP Multiple Choice Questions Part 1</title><content type='html'>1. You can create tests using the …...&lt;br /&gt;&lt;br /&gt;A) keyword-driven methodology&lt;br /&gt;B) Step recording&lt;br /&gt;C) Stop recording&lt;br /&gt;D) Both A &amp;amp; B&lt;br /&gt;&lt;br /&gt;2. ...... enables you to record the operations you perform on your application.&lt;br /&gt;&lt;br /&gt;A) keyword-driven methodology&lt;br /&gt;B) Step recording&lt;br /&gt;C) Stop recording&lt;br /&gt;D) Both A &amp;amp; B&lt;br /&gt;&lt;br /&gt;3. Keyword-driven testing enables you to design your tests at a business level rather than at the object level.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;4. As you navigate through your application, HP QTP graphically displays each step you perform as a …... in the Keyword View.&lt;br /&gt;&lt;br /&gt;A) row&lt;br /&gt;B) Column&lt;br /&gt;C) Cell&lt;br /&gt;D) None&lt;br /&gt;&lt;br /&gt;5. After creating an initial test in Quicktest Professional, you can further enhance it by adding and modifying steps in the or .&lt;br /&gt;&lt;br /&gt;A) Keyword View&lt;br /&gt;B) Expert View&lt;br /&gt;C) Both A &amp;amp; B&lt;br /&gt;D) You cannot enhance it.&lt;br /&gt;&lt;br /&gt;6. You can also use the CheckProperty method, which enables you to verify the property value of an object without using the checkpoint interface.&lt;br /&gt;&lt;br /&gt;A) CheckpointProperty&lt;br /&gt;B) CheckProperty&lt;br /&gt;C) VerifyProperty&lt;br /&gt;D) CheckingProperty&lt;br /&gt;&lt;br /&gt;7. While parameterizing tests, you can supply data from …..&lt;br /&gt;&lt;br /&gt;A) data table&lt;br /&gt;B) environment variables&lt;br /&gt;C) values that QuickTest generates during the run session&lt;br /&gt;D) All of above&lt;br /&gt;E) None&lt;br /&gt;&lt;br /&gt;8. QTP enables you to define the path to a resource that you are adding to the file system or to Quality Center, as only a relative path.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;9. Using relative paths means that the paths remain valid when files or folders containing files are moved or copied to other locations or computers, provided that they are moved within the same folder structure.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;10. QuickTest resource files can be locked by QuickTest to protect the information in the file from being overwritten.&lt;br /&gt;&lt;br /&gt;A) True&lt;br /&gt;B) False&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answers:&lt;br /&gt;&lt;br /&gt;1)d, 2)b, 3) a, 4) a, 5)c, 6) b, 7)d, 8) b, 9)a, 10) a&lt;br /&gt;&lt;br /&gt;You can view other questions here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp-multiple-choice-questions-answers.html"&gt;QTP Multiple Choice Questions in QTP Part1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp11-multiple-choice-questions-answers.html"&gt;QTP Multiple Choice Questions in QTP Part2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp10-download-multiple-choice.html"&gt;QTP Multiple Choice Questions in QTP Part3&lt;/a&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/qtp-features-multiple-choice-questions.html"&gt;QTP Multiple Choice Questions in QTP Part4&lt;/a&gt;&lt;br /&gt;&lt;div style="clear:both; padding-bottom:0.25em"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2105791944370155316?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2105791944370155316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2105791944370155316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2105791944370155316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2105791944370155316'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/qtp-multiple-choice-questions-answers.html' title='QTP Multiple Choice Questions Part 1'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2273161005287186186</id><published>2011-07-28T22:05:00.002+05:30</published><updated>2011-08-03T21:31:25.451+05:30</updated><title type='text'>QTP Menu bar items missing</title><content type='html'>Very recently, I found a very weird QTP issue that all menu items went missing. I kept on trying all menu bar items but most of the items went missing. I thought my QTP 11 software got corrupt and I reinstalled it.&lt;br /&gt;&lt;br /&gt;After a fresh installation, the same issue was there. I did a lot of hit and trials and finally got the solution. Sometimes the issue comes when we use RestoreLayout method from Automation Object Model. Then unpredictable errors may occur while the script execution is in process including these menu items missing from "File", "Edit", "View" menus etc.&lt;br /&gt;&lt;br /&gt;The solution I got is to right click anywhere on the toolbar area, click Customize, choose toolbars tab and click on the Restore all button. This should definitely fix this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Have questions on this article? Feel free to ask me in the comments section below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If you like this post, I would suggest you to subscribe my &lt;/span&gt;&lt;a style="font-style: italic;" href="http://feeds.feedburner.com/QTPTutorials"&gt;RSS feed&lt;/a&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt; to have future articles delivered to your email address directly.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2273161005287186186?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2273161005287186186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2273161005287186186' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2273161005287186186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2273161005287186186'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/qtp-menu-bar-items-missing-patch.html' title='QTP Menu bar items missing'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-7600472606181446133</id><published>2011-07-23T13:59:00.002+05:30</published><updated>2011-07-23T14:05:58.193+05:30</updated><title type='text'>VBScript Coding Guidelines</title><content type='html'>When you first start writing code, you have to concentrate so hard on just getting the syntax correct for the computer that it may be easy for you to forget about all the things you need to do in order to make sure your code is human friendly as well. However, attentiveness early on will pay huge dividends in the long run.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Expect the Unexpected&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Always remember that anything that can happen probably will happen. The idea here is to code defensively — preparing for the unexpected. You don’t need to become totally fixated on preparing for all contingencies and remote possibilities, but you can’t ignore them either. You especially have to worry about the unexpected when receiving input from the user, from a database, or from a file.&lt;br /&gt;&lt;br /&gt;Whenever you’re about to perform an action on something, ask yourself questions such as:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    What could go wrong here?&lt;/li&gt;&lt;li&gt;    What happens if the file is flagged read-only?&lt;/li&gt;&lt;li&gt;    What happens if the file isn’t there?&lt;/li&gt;&lt;li&gt;    What happens if the user doesn’t run the program from the right folder?&lt;/li&gt;&lt;li&gt;    What happens if the database table doesn’t have any records?&lt;/li&gt;&lt;li&gt;    What happens if the registry keys I was expecting aren’t there?&lt;/li&gt;&lt;li&gt;    What happens if the user doesn’t have the proper permission to carry out the operation?&lt;/li&gt;&lt;/ul&gt;If you don’t know what might go wrong with a given operation, find out through research or trial and error. Get others to try out your code and get their feedback on how it worked for them, on their system configuration, and on their operating system. Don’t leave it up to your users to discover how well (or not) your script reacts to something unexpected.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Always Favor the Explicit over the Implicit&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you are writing code, constantly ask yourself: Is my intent clear to someone reading this code? Does the code speak for itself? Is there anything mysterious here? Are there any hidden meanings? Are the variable names too similar to be confusing? Even though something is obvious in your mind at the moment you are typing the code, it doesn’t mean it will be obvious to you six months or a year from now — or to someone else tomorrow. Always endeavor to make your code as self-documenting as possible, and where you fall short of that goal (which even the best programmers do — self-documenting code can be an elusive goal), use good comments to make things clearer.&lt;br /&gt;&lt;br /&gt;Be wary of using too many generics in code, such as x, y, and z as variable names and Function1, Function2, and Function3 as function names. Instead, make them explicit. Use variable names such as UserName and TaxRate. When naming a variable, use a name that will make it clear what that variable is used for. Be careful using abbreviations. Don’t make variable names too short, but don’t make them too long either (10–16 characters is a good length, but ideal length is largely a matter of preference). Even though VBScript is not case-sensitive, use mixed case to make it easier to distinguish multiple words within the variable name (for example, UserName is easier to read than username).&lt;br /&gt;&lt;br /&gt;When naming procedures, try to choose a name that describes exactly what the procedure does. If the procedure is a function that returns a value, indicate what the return value is in the function name (for example, PromptUserName). Try to use good verb–noun combinations to describe first, what action the procedure performs, and second, what the action is performed on (for example, SearchFolders, MakeUniqueRegistryKey, or LoadSettings).&lt;br /&gt;&lt;br /&gt;Good procedure names tend to be longer than good variable names. Don’t go out of your way to make them longer, but don’t be afraid to either. Fifteen to thirty characters for a procedure name is perfectly acceptable (they can be a bit longer because you generally don’t type them nearly as much). If you are having trouble giving your procedure a good name, that might be an indication that the procedure is not narrow enough — a good procedure does one thing, and does it well.&lt;br /&gt;&lt;br /&gt;That said, if you are writing scripts for web pages to be downloaded to a user’s browser, it is sometimes necessary to use shorter variable and procedure names. Longer names mean larger files to download. Even if you sacrifice some readability to make the file smaller, you can still take time to create descriptive names. With web scripts, however, you may encounter instances where you don’t want the code to be clear and easy to understand (at least for others).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Modularize Your Code into Procedures, Modules, Classes, and Components&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you write code, you should constantly evaluate whether any given code block would be better if you moved it to its own function or sub procedure:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    Is the code rather complex? If so, break it into procedures.&lt;/li&gt;&lt;li&gt;    Are you using many Ands and Ors in an If...End If statement? Consider moving the evaluation to its own procedure.&lt;/li&gt;&lt;li&gt;    Are you writing a block of code that you think you might need again in some other part of the script, or in another script? Move it to its own procedure.&lt;/li&gt;&lt;li&gt;    Are you writing some code that you think someone else might find useful? Move it.&lt;/li&gt;&lt;/ul&gt;This isn’t a science and there are no hard and fast rules for code — after all, only you know what you want it to do. Only you know if parts are going to be reused later. Only you know how complex something will turn out. However, always keep an eye out for possible modularization.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Use the “Hungarian” Variable Naming Convention&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You might hear programmers (especially C++ programmers) mention this quite a bit. While this is a bit out of scope of this introductory discussion, it is still worth mentioning nonetheless. The Hungarian naming convention involves giving variable names a prefix that indicates what the scope and data type of the variable are intended to be. So as not to confuse matters, the Hungarian convention was not used in this chapter, but you will find that most programmers prefer this convention. Properly used, it makes your programs much clearer and easier to write and read.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Don’t Use One Variable for More Than One Job&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a big no-no and a common mistake of both beginner and experienced programmers alike (but the fact that experienced programmers might have a bad habit does not make it any less bad). Each variable in your script should have just one purpose.&lt;br /&gt;&lt;br /&gt;It might be very tempting to just declare a bunch of generic variables with fuzzy names at the beginning of your script, and then use them for multiple purposes throughout your script — but don’t do it. This is one of the best ways to introduce very strange, hard to track down bugs into your scripts. Giving a variable a good name that clearly defines its purpose will help prevent you from using it for multiple purposes. The moral here is that while reusing variables might seem like a total time saver, it isn’t and can lead to hours of frustration and wasted time looking for the problem.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Always Lay Out Your Code Properly&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Always remember that good code layout adds greatly to readability later. Don’t be tempted to save time early on by writing messy, hard to follow code because as sure as day turns to night, you will suffer if you do.&lt;br /&gt;&lt;br /&gt;Without reading a single word, you should be able to look at the indentations of the lines to see which ones are subordinate to others. Keep related code together by keeping them on consecutive lines. Also, don’t be frightened of white space in your code. Separate blocks of unrelated code by putting a blank line between them. Even though the script engine will let you, avoid putting multiple statements on the same line. Also, remember to use the line continuation character (_) to break long lines into multiple shorter lines.&lt;br /&gt;&lt;br /&gt;The importance of a clean layout that visually suggests the logic of the underlying code cannot be overemphasized.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Use Comments to Make Your Code More Clear and Readable, but Don’t Overuse Them&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When writing code, strive to make it as self-documenting as possible. You can do this by following the guidelines set out earlier. However, self-documenting code is hard to achieve and no one is capable of 100% self-documenting code. Everyone writes code that can benefit from a few little scribbles to serve as reminders in the margins. The coding equivalents of these scribbles are comments. But how can you tell a good comment from a bad comment?&lt;br /&gt;&lt;br /&gt;Generally speaking, a good comment operates at the level of intent. A good comment answers the questions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    Where does this code block fit in with the overall script?&lt;/li&gt;&lt;li&gt;    Why did the programmer write this code?&lt;/li&gt;&lt;/ul&gt;The answers to these questions fill in the blanks that can never be filled by even the best, most pedantic self-documenting code. Good comments are also generally “paragraph-level” comments. Your code should be clear enough that you do not need a comment for each and every line of code it contains, but a comment that quickly and clearly describes the purpose for a block of code allows a reader to scan through the comments rather than reading every line of code. The idea is to keep the person who might be reading your code from having to pore over every line to try and figure out why the code exists. Commenting every line (as you probably noticed with the earlier examples) makes the code hard to follow and breaks up the flow too much.&lt;br /&gt;&lt;br /&gt;Bad comments are generally redundant comments, meaning they repeat what the code itself already tells you. Try to make your code as clear as possible so that you don’t need to repeat yourself with comments. Redundant comments tend to add clutter and do more harm than good. Reading the code tells you the how; reading the comments should tell you the why.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Have questions on this article? Feel free to ask me in the comments section below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If you like this post, I would suggest you to subscribe my &lt;/span&gt;&lt;a style="font-style: italic;" href="http://feeds.feedburner.com/QTPTutorials"&gt;RSS feed&lt;/a&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt; to have future articles delivered to your email address directly.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-7600472606181446133?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/7600472606181446133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=7600472606181446133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7600472606181446133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7600472606181446133'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/vbscript-error-handling-coding.html' title='VBScript Coding Guidelines'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-7613712871197363690</id><published>2011-07-23T13:32:00.008+05:30</published><updated>2011-07-23T13:56:53.569+05:30</updated><title type='text'>VBScript Event Driven Code Example</title><content type='html'>In our previous &lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/vbscript-top-down-versus-event-driven.html"&gt;article&lt;/a&gt;, we have discussed &lt;a href="http://qtpgoodtutorials.blogspot.com/2011/07/vbscript-top-down-versus-event-driven.html"&gt;Top Down vs Event Driven approach&lt;/a&gt; in programming. In this example, I am going to present a very simple example for Event driven approach.&lt;br /&gt;&lt;br /&gt;Type the following code into your text editor, save the file with a .HTM or .HTML extension, and then load it into Internet Explorer 6 (if you are running Internet Explorer 6/7 and you are running this file off your desktop, you might have to dismiss some security warnings and allow ActiveX).&lt;br /&gt;&lt;br /&gt;The code goes here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-W7-1bG4Eo8E/TiqCCfywZ_I/AAAAAAAAADU/_PiIiwxOmwo/s1600/VBScript%2Bevent%2Bdriven.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 187px;" src="http://2.bp.blogspot.com/-W7-1bG4Eo8E/TiqCCfywZ_I/AAAAAAAAADU/_PiIiwxOmwo/s400/VBScript%2Bevent%2Bdriven.png" alt="" id="BLOGGER_PHOTO_ID_5632457263385962482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The below figure shows the result of clicking the button on the page. In this case it’s only a message box but it could be much more.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-ZoVXuFis-uk/TiqBM57nfFI/AAAAAAAAADM/-Aqqx__AKdo/s1600/VBScript%2Bevent%2Bdriven.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 350px; height: 236px;" src="http://3.bp.blogspot.com/-ZoVXuFis-uk/TiqBM57nfFI/AAAAAAAAADM/-Aqqx__AKdo/s400/VBScript%2Bevent%2Bdriven.jpg" alt="" id="BLOGGER_PHOTO_ID_5632456342689512530" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Have questions on this article? Feel free to ask me in the comments section below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If you like this post, I would suggest you to subscribe my &lt;/span&gt;&lt;a style="font-style: italic;" href="http://feeds.feedburner.com/QTPTutorials"&gt;RSS feed&lt;/a&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt; to have future articles delivered to your email address directly.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-7613712871197363690?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/7613712871197363690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=7613712871197363690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7613712871197363690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7613712871197363690'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/vbscript-event-driven-code-example.html' title='VBScript Event Driven Code Example'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-W7-1bG4Eo8E/TiqCCfywZ_I/AAAAAAAAADU/_PiIiwxOmwo/s72-c/VBScript%2Bevent%2Bdriven.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5260491855761628863</id><published>2011-07-23T13:26:00.012+05:30</published><updated>2011-07-23T13:54:42.025+05:30</updated><title type='text'>VBScript Top-Down versus Event-Driven Approach</title><content type='html'>There are two different models of programming: top-down approach and event-driven approach.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Understanding Top-Down Programming&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In simple top-down programming, the approach is very simple:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    Write the code.&lt;/li&gt;&lt;li&gt;    Save the code in a script file.&lt;/li&gt;&lt;li&gt;    Use Windows Script Host to execute the script.&lt;/li&gt;&lt;li&gt;    The Script Host starts executing at the first line and continues to the last line.&lt;/li&gt;&lt;li&gt;    If a script file contains some procedure definitions (such as any user defined function), then the Script Host only executes those procedures if some other code calls them.&lt;/li&gt;&lt;li&gt;    Once the Script Host reaches the last line of code, the lifetime of the script ends.&lt;/li&gt;&lt;/ul&gt;Top-down programs are very useful for task-oriented scripts. For example, you might write a script to search your hard drive for all the files with the extension .htm and copy all the names and file locations to a file, formatted in HTML to act as a sitemap. Or you might write a script that gets executed every time Windows starts and which randomly chooses a different desktop wallpaper bitmap file for that session of Windows. Top-down programming is perfect for these kinds of scripts.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Understanding Event-Driven Programming&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Event-driven approach is quite different, and is useful in different contexts. As the name implies, event-driven code only gets executed when a certain event occurs. Until the event occurs, the code won’t get executed. If a given event does not occur during the lifetime of the script, the code associated with that event won’t be executed at all. If an event occurs, and there’s no code associated with that event, then the event is essentially ignored.&lt;br /&gt;&lt;br /&gt;Event-driven programming is the predominant paradigm in Windows programming. Most of the Windows programs you use every day were written in the event-driven model. This is because of the graphical nature of Windows programs. In a graphical user interface (GUI), you have all sorts of buttons, drop-down lists, fields in which to type text, and so on. For example, the word processor program Microsoft Word is totally jam-packed with these. Every time a user clicks a button, chooses an item in a list, or types some text into a field, an event is “raised” within the code. The person who wrote the program may or may not have decided to write code in response to that event. However, if the program is well written, an item such as a button for saving a file, which the user expects to have code behind it, will indeed have code behind it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;How Top-Down and Event-Driven Work Together&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When a GUI-based program starts, there is almost always some top-down style code that executes first. This code might be used to read a setting stored in the registry, prompt the user for a name and password, load a particular file at startup or prompt to take the user through setup if this is the first time the application has been run, and so on. Then a form typically comes up. The form contains all the menus, buttons, lists, and fields that make up the user interface of the program. At that point, the top-down style coding is done, and the program enters what is known as a wait state. No code is executing at this point and the program just waits for the user to do something. From here on, it’s pretty much all about events.&lt;br /&gt;&lt;br /&gt;When the user begins to do something, the program comes to life again. Suppose the user clicks a button. The program raises the Click event for the button that the user clicked. The code attached to that event starts to execute, performs some operations, and when it’s finished, the program returns to its wait state.&lt;br /&gt;&lt;br /&gt;As far as VBScript is concerned, the event-driven model is used heavily in scripting for the Web. Scripts that run inside of HTML web pages are all based on events. One script may execute when the page is loaded, while another script might execute when the user clicks a link or graphic.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Have questions on this article? Feel free to ask me in the comments section below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If you like this post, I would suggest you to subscribe my &lt;/span&gt;&lt;a style="font-style: italic;" href="http://feeds.feedburner.com/QTPTutorials"&gt;RSS feed&lt;/a&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt; to have future articles delivered to your email address directly.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5260491855761628863?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5260491855761628863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5260491855761628863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5260491855761628863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5260491855761628863'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/vbscript-top-down-versus-event-driven.html' title='VBScript Top-Down versus Event-Driven Approach'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-8837123249275577138</id><published>2011-07-22T20:10:00.006+05:30</published><updated>2011-07-23T13:54:59.925+05:30</updated><title type='text'>Variables and Data Types Basics</title><content type='html'>In simple terms, a variable is a place in the computer memory where your script holds a piece of information, or data. The data stored in a variable can be pretty much anything. It may be something simple, like a small number, like 5, or even complex, like a floating-point number such as 4.3, or a much bigger number like 971.123432434. Or it might not be a number at all and could be a word or a combination of letters and numbers. In fact, a variable can store pretty much anything you want it to store.&lt;br /&gt;&lt;br /&gt;Behind the scenes, the variable is a reserved section of the computer’s memory for storing data. Memory is temporary — things stored there are not stored permanently like they are when you use the hard drive. Because memory is a temporary storage area, and variables are stored in the computer’s memory, they are therefore also temporary. Your script will use variables to store data temporarily that the script needs to keep track of for later use. If your script needs to store that data permanently, it would store it in a file or database on the computer’s hard disk.&lt;br /&gt;&lt;br /&gt;To make it easier for the computer to keep track of the millions of bits of data that are stored in memory at any given moment, the memory is broken up into chunks. Each chunk is exactly the same size, and is given a unique address. Don’t worry about what the memory addresses are or how you use them because you won’t need to know any of that to use VBScript, but it is useful to know that a variable is a reserved set of one or more chunks. Also, different types of variables take up different amounts of memory.&lt;br /&gt;&lt;br /&gt;In your VBScript program, a variable usually begins its life cycle after it is being declared before use.&lt;br /&gt;&lt;br /&gt;It is not required to declare all variables before using. By default, VBScript allows you to use undeclared variables. However, it’s strongly recommended that you should declare the variables before you start using them in your scripts. Declaring variables before use makes code easier to read and to debug later. Just go for it!&lt;br /&gt;&lt;br /&gt;Here goes an example for the same:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Dim VariableName&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above code is instructing your computer to reserve some memory space for you and to name that chunk &lt;span style="font-style: italic;"&gt;VariableName&lt;/span&gt;. From now on, your computer (or, more accurately, the VBScript engine) keeps track of that memory for you, and whenever you use the variable name &lt;span style="font-style: italic;"&gt;VariableName&lt;/span&gt;, it will know what you’re talking about.&lt;br /&gt;&lt;br /&gt;Variables are very important in programming. Without them, there is no way to hold all the data that your script will be handling. Every input to the script, output from the script, and process within the script uses variables. They are the computer’s equivalent of the sticky notes that you leave all over the place with little bits of information on them. All the notes are important (otherwise why would you write them?) but they are also temporary. Some might become permanent (so you take a phone number and write it down in your address book or contact list), while others are thrown away after use (say, after reminding you to do something). This is how it works with variables, too. Some hold data that you might later want to keep, while others are just used for general housekeeping and are disposed of as soon as they’re used.&lt;br /&gt;&lt;br /&gt;In VBScript, whenever you have a piece of information that you need to work with, you declare a variable using the exact same syntax you saw a moment ago. At some point in your script, you’ll need to do something with the memory space you’ve allocated yourself (otherwise, what would be the point of declaring it?). And what you do with a variable is place a value in it. This is called initializing the variable. Sometimes you initialize a variable with a default value. Other times, you might ask the user for some information, and initialize the variable with whatever the user enters. Alternatively, you might open a database and use a previously stored value to initialize the variable.&lt;br /&gt;&lt;br /&gt;Initializing the variable gives you a starting point. After it has been initialized, you can begin making use of the variable in your script.&lt;br /&gt;&lt;br /&gt;Here goes a simple VBScript example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Dim strName&lt;br /&gt;' Above we dimensioned the variable&lt;br /&gt;str = "&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Value stored inside variable"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Using Comments&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You already know what the first line of code in the previous block does. It declares a variable for use called &lt;span style="font-style: italic;"&gt;strName&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The second line in the code is a comment. In VBScript, any text preceded by the single quote character (') is treated as a comment, which means that the VBScript engine completely ignores the text, which begs the question why bother typing it in at all? It doesn’t contribute to the execution of the script, right? This is absolutely correct, but don’t forget one of the most important principles of programming: It is not just computers that may have to read script. It is equally important to write a script with human readers in mind as it is to write with the computer in mind.&lt;br /&gt;&lt;br /&gt;Of course, none of this means you should for one moment forget that when you write scripts, you must do so with the computer (or, more specifically, the script engine) in mind. If you don’t type the code correctly (that is, if you don’t use the proper syntax), the script engine won’t be able to execute the script. However, once you’ve written some useful scripts, you’ll probably need to go back to make some changes to a script you wrote six months or a year ago. If you didn’t write that code with human readers, as well as computers, in mind it could be pretty difficult to figure out what you were thinking and how you decided to solve the problems at the time you wrote the script. Things can get worse. What happens when you or one of your coworkers has to make some changes to a script you wrote many months ago? If you did not write that script to be both readable and maintainable, others who use your code will encounter difficulties deciphering it — no matter how well written the actual computer part of the code is.&lt;br /&gt;&lt;br /&gt;Adding comments to your code is just one part of making sure code is clear and readable. There are many other things that you can do:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    Choose clear, meaningful variable names.&lt;/li&gt;&lt;li&gt;    Indent code for clarity.&lt;/li&gt;&lt;li&gt;    Make effective use of white space.&lt;/li&gt;&lt;li&gt;    Organize the code in a logical manner.&lt;/li&gt;&lt;/ul&gt;All of these aid human-readability and are covered later, but clear, concise comments are by far the most important. However, too much of a good thing is never good and the same is true for comments. Over-burdening code with comments doesn’t help. Remember that if you are scripting for the Web that all the code, including the comments, are downloaded to the browser, so unnecessary comments may adversely affect download times.&lt;br /&gt;&lt;br /&gt;You have learnt about some good commenting principles, but for now just be aware of the fact that the comment in line 2 of the script is not really a good comment for everyday use. This is because, to any semi-experienced programmer, it is all too obvious that what you are doing is declaring the strName variable on the code line above. This is because the point of the code is to instruct the reader in how a particular aspect of VBScript programming works, and the best way to do that is to add comments to the code directly. It removes ambiguity and keeps the code and comments together.&lt;br /&gt;&lt;br /&gt;Also worth noting is that comments don’t have to be on a separate line. Comments can also follow the code, like so:&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;br /&gt;Dim strName ' Initialize the variable&lt;br /&gt;strName = InputBox("Hey! What is your name?") ' Ask for the user's name&lt;br /&gt;MsgBox "Hello " &amp;amp; strName &amp;amp; "! Nice to meet you." ' Display a greeting in a popup&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;----------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Have questions on this article? Feel free to ask me in the comments section below.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If you like this post, I would suggest you to subscribe my &lt;/span&gt;&lt;a style="font-style: italic;" href="http://feeds.feedburner.com/QTPTutorials"&gt;RSS feed&lt;/a&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt; to have future articles delivered to your email address directly.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;--&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;---&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-8837123249275577138?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/8837123249275577138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=8837123249275577138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/8837123249275577138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/8837123249275577138'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/07/vbscript-variables-data-types-tutorial.html' title='Variables and Data Types Basics'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-985287450649212034</id><published>2011-06-04T22:45:00.001+05:30</published><updated>2011-06-04T22:52:56.546+05:30</updated><title type='text'>General Run Error on using Browser.Back</title><content type='html'>I got a question from one of my esteemed reader which I am posting below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Issue: &lt;/span&gt;&lt;br /&gt;I am trying to use 'Browser("Browser").Back' but I always General Run Error. I am using QTP 9.5 and IE7. I have tried uninstalling/reinstalling QTP but the issue is still not fixed. It also seems to fail when I try Browser methods (I have also tried Browser("Browser").Refresh and it came up with the same error).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Possible Solution:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. In IE settings, go to Tools -&amp;gt; Manage Add-ons&lt;br /&gt;2. Select the BHOManager Class&lt;br /&gt;3. Click the Enable button&lt;br /&gt;&lt;br /&gt;If the above solution doesnt work, you can also try the below code:&lt;br /&gt;&lt;br /&gt;Set oWshShell = CreateObject("WScript.Shell")&lt;br /&gt;oWshShell .SendKeys "{BS}"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-985287450649212034?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/985287450649212034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=985287450649212034' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/985287450649212034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/985287450649212034'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/06/general-run-error-browser-back-qtp.html' title='General Run Error on using Browser.Back'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-6921162002454012267</id><published>2011-06-04T22:34:00.002+05:30</published><updated>2011-06-04T22:38:17.593+05:30</updated><title type='text'>QTP Tip | Check Status of WebEdit</title><content type='html'>The following QTP code will check if a textbox is enabled or not&lt;br /&gt;&lt;br /&gt;If Not oWebEdit.Object.Disabled Then&lt;br /&gt;   Msgbox "Object is Enabled"&lt;br /&gt;Else&lt;br /&gt;   Msgbox "Object is Disabled&lt;br /&gt;End If&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-6921162002454012267?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/6921162002454012267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=6921162002454012267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6921162002454012267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6921162002454012267'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/06/qtp-tip-check-status-of-webedit.html' title='QTP Tip | Check Status of WebEdit'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5524841703320942904</id><published>2011-06-04T21:02:00.002+05:30</published><updated>2011-06-04T22:33:38.475+05:30</updated><title type='text'>QTP Mercury DeviceReplay vs SendKeys</title><content type='html'>Mercury DeviceReplay is a powerful utility to simulate keyboard input and also for simulating mouse clicks and movements. Under Java Add-in, you can find the DeviceReplay property. At times, Object.Set and Object.Type doesnt help in QTP for some applications. You can use Mercury DeviceReplay to type Non English symbols and letters even without changing the keyboard layout or installing the special fonts.&lt;br /&gt;&lt;br /&gt;In Order to use the DeviceReplay methods, you need to create DeviceReplay object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Set objDeviceReplay = CreateObject("Mercury.DeviceReplay")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We use SendKeys method to send keyboard input/keystrokes to applications that dont have automation interface. We can also send more than one keystroke at a time using Sendkeys method. To send keystrokes x,y and z, you would send the string argument "xyz".&lt;br /&gt;&lt;br /&gt;Note: You cannot send Print Screen key to an application.&lt;br /&gt;&lt;br /&gt;So, the difference between Mercury DeviceReplay and Sendkeys is&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SendKeys &lt;/span&gt;-&amp;gt; Support only Keyboard Operations&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DeviceReplay&lt;/span&gt;-&amp;gt; Support Keyboard + Mouse Operations like Drag Drop too.&lt;br /&gt;&lt;br /&gt;In addition to that DeviceReplay supports sending multilingual characters and symbols, while sendkeys support limited keyboard operations.&lt;br /&gt;&lt;br /&gt;The other operational difference is dependency on QTP software.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Mercury.DeviceReplay&lt;/span&gt; :- It comes with QTP as a module, so you need QTP on the system and only from QTP action you can use it.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SendKeys&lt;/span&gt; :- It could be used in VBS script to simulate keyboard inputs with native windows shell commands. It has no dependency on QTP as such.&lt;br /&gt;&lt;br /&gt;Out of Mercury DeviceReplay and SendKeys, which one should I use for Automation testing with QTP?&lt;br /&gt;&lt;br /&gt;1. Depends on your objective like mouse operations &amp;amp; multilingual testing required.&lt;br /&gt;2.In case of normal keyboard operations supported by both, SendKeys is easy to use due to English like syntax for keyboard input. Whereas for devicereplay you need to define user friendly names/constants (like VK_SHIFT etc) to numeric keycodes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5524841703320942904?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5524841703320942904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5524841703320942904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5524841703320942904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5524841703320942904'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/06/qtp-mercury-devicereplay-vs-sendkeys.html' title='QTP Mercury DeviceReplay vs SendKeys'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5481520133507614343</id><published>2011-02-08T22:23:00.001+05:30</published><updated>2011-02-08T22:27:13.129+05:30</updated><title type='text'>QTP Web Services</title><content type='html'>What are web services?&lt;br /&gt;&lt;br /&gt;Web Services: A vague term that refers to distributed or virtual applications or processes that use the internet to link activities or software components.&lt;br /&gt;&lt;br /&gt;With the use of Web services, an application can publish its function or message to the rest of the world.&lt;br /&gt;&lt;br /&gt;For example a travel website that takes a reservation from a customer, and then sends a message to a hotel application, accesses via the web, to determine if a room is available, books it, and then tells the customer he or she has a reservation is an example of a web services application. [Real world web services By Will Iverson]&lt;br /&gt;&lt;br /&gt;Why web services are important when we have other technologies like RMI, CORBA etc.?&lt;br /&gt;&lt;br /&gt;Web Services are platform-independent and language-independent, since they use standard XML languages. This means that my client program can be programmed in C++ and running under Windows, while the Web Service is programmed in Java and running under Linux.&lt;br /&gt;&lt;br /&gt;Most Web Services use HTTP for transmitting messages (such as the service request and response). This is a major advantage if you want to build an Internet-scale application, since most of the Internet's proxies and firewalls won't mess with HTTP traffic.&lt;br /&gt;&lt;br /&gt;One of the oft-cited advantages of web services is the fact that they lend themselves naturally to build loosely coupled systems. These types of systems are more scalable than strongly coupled systems, and impose fewer architectural requirements on the actual implementation of the web services. Suffice it to say that the reason why web services are ideal to build loosely coupled systems is because they are message-oriented and rely on language-neutral XML dialects to send messages, to specify interfaces, etc.&lt;br /&gt;&lt;br /&gt;What are the disadvantages of web services?&lt;br /&gt;&lt;br /&gt;Overhead: Transmitting all your data in XML is obviously not as efficient as using a proprietary binary code. What you win in portability, you lose in efficiency. Even so, this overhead is usually acceptable for most applications, but you will probably never find a critical real-time application that uses Web Services.&lt;br /&gt;&lt;br /&gt;Lack of maturity: Web Services are relatively new and, though the core specifications that deal with fundamental languages (XML, WSDL,..) and protocols (HTTP, SOAP,…) are pretty stable the world of web services is still evolving at a fast pace. Standards dealing with more advanced capabilities expected from distributed systems, such as transactions, security, etc. are either very new or still in the works. [Globus Toolkit 4: programming Java Services By Borja Sotomayor, Lisa Childers]&lt;br /&gt;&lt;br /&gt;Some Definitions:&lt;br /&gt;&lt;br /&gt;Web Services Description Language (WSDL)&lt;br /&gt;&lt;br /&gt;WSDL (Web Services Description Language) is an XML-based language for describing Web services and how to access them. You can see more on it &lt;a href="http://www.w3schools.com/wsdl/default.asp"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;SOAP (Simple Object Access Protocol, or Service Oriented Architecture Protocol)&lt;br /&gt;SOAP is a simple XML-based protocol to let applications exchange information over HTTP. You can see more on it &lt;a href="http://www.w3schools.com/soap/default.asp"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;UDDI (Universal Description, Discovery and Integration)&lt;br /&gt;&lt;br /&gt;Universal Description, Discovery and Integration (UDDI) is a directory service where businesses can register and search for Web services.&lt;br /&gt;&lt;br /&gt;UDDI is a platform-independent framework for describing services, discovering businesses, and integrating business services by using the Internet.&lt;br /&gt;&lt;br /&gt;UDDI stands for Universal Description, Discovery and Integration&lt;br /&gt;UDDI is a directory for storing information about web services&lt;br /&gt;UDDI is a directory of web service interfaces described by WSDL&lt;br /&gt;UDDI communicates via SOAP&lt;br /&gt;UDDI is built into the Microsoft .NET platform&lt;br /&gt;You can see more on it &lt;a href="http://www.w3schools.com/WSDL/wsdl_uddi.asp"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A small example of Web Service (invocation) to make it even more understandable:&lt;br /&gt;&lt;br /&gt;1. A client may have no knowledge of what Web Service it is going to invoke. So, our first step will be to discover a Web Service that meets our requirements. For example, we might be interested in locating a public Web Service which can give me the weather forecast in US cities. We'll do this by contacting a discovery service (which is itself a Web service).&lt;br /&gt;&lt;br /&gt;2. The discovery service will reply, telling us what servers can provide us the service we require.&lt;br /&gt;&lt;br /&gt;3. We now know the location of a Web Service, but we have no idea of how to actually invoke it. Sure, we know it can give me the forecast for a US city, but how do we perform the actual service invocation? The method I have to invoke might be called "string getCityForecast(int CityPostalCode)", but it could also be called "string getUSCityWeather(string cityName, bool isFarenheit)". We have to ask the Web Service to describe itself (i.e. tell us how exactly we should invoke it).&lt;br /&gt;&lt;br /&gt;4. The Web Service replies in a language called WSDL.&lt;br /&gt;&lt;br /&gt;5. We finally know where the Web Service is located and how to invoke it. The invocation itself is done in a language called SOAP. Therefore, we will first send a SOAP request asking for the weather forecast of a certain city.&lt;br /&gt;&lt;br /&gt;6. The Web Service will kindly reply with a SOAP response which includes the forecast we asked for, or maybe an error message if our SOAP request was incorrect.&lt;br /&gt;For more on web services you can read [Globus Toolkit 4: programming Java Services By Borja Sotomayor, Lisa Childers]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5481520133507614343?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5481520133507614343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5481520133507614343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5481520133507614343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5481520133507614343'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2011/02/qtp-web-services.html' title='QTP Web Services'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-970903269869864108</id><published>2010-12-27T21:55:00.002+05:30</published><updated>2010-12-27T21:59:33.231+05:30</updated><title type='text'>How to verify if Browser Window is already maximized</title><content type='html'>QTP Code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;hwnd = browser("creationtime:=1").GetROProperty("hwnd")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Msgbox window("hwnd:=" &amp;amp; hwnd).getroproperty("maximized") &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However, this code won't work with IE7.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-970903269869864108?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/970903269869864108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=970903269869864108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/970903269869864108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/970903269869864108'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/verify-browser-window-maximize-tutorial.html' title='How to verify if Browser Window is already maximized'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-6773653206558405848</id><published>2010-12-27T21:47:00.001+05:30</published><updated>2010-12-27T21:50:04.248+05:30</updated><title type='text'>QTP Tip | Difference between micclass &amp; micClass</title><content type='html'>Technically speaking there is no difference. You can try this code out to see it&lt;br /&gt;&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;obj("micClass").Value="Link"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;MsgBox obj("micclass").Value&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But for some very rare cases it has been observed that using micClass instead of micclass throws an error when calling ChildObjects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-6773653206558405848?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/6773653206558405848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=6773653206558405848' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6773653206558405848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6773653206558405848'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/quicktest-professional-11-micclass.html' title='QTP Tip | Difference between micclass &amp; micClass'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-3894440930659034748</id><published>2010-12-25T10:58:00.002+05:30</published><updated>2010-12-25T11:23:29.384+05:30</updated><title type='text'>QTP Performance Issue</title><content type='html'>I am presenting a scenario for you to think on&lt;br /&gt;&lt;br /&gt;#################################################################&lt;br /&gt;&lt;br /&gt;I am using HP Quicktest Professional 11. My one Test Script makes call to around 30 External actions. (it uses most of them in one run)&lt;br /&gt;&lt;br /&gt;When I modify a cell in one tab of the Datatable (of the 30 tabs referencing the 30 external actions in my script) and attempts to save the script, it takes so long; sometimes close to 45 seconds upto 1 minute.&lt;br /&gt;If I try to open this kind of script, again it takes this much amount of time.&lt;br /&gt;&lt;br /&gt;a) Does that mean QTP always try to save the 30 'Default.xls' files in addition to the one 'Default.xls' file that has been modified?&lt;br /&gt;b) Should QTP not save just the one 'Default.xls' file that has been modified?&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;All the actions in my Test Script uses only the Descriptive Programming.&lt;br /&gt;&lt;br /&gt;#################################################################&lt;br /&gt;&lt;br /&gt;Having a look at the above scenario, what you could think of the reason behind this?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-3894440930659034748?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/3894440930659034748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=3894440930659034748' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/3894440930659034748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/3894440930659034748'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/qtp-script-multiple-actions-take-time.html' title='QTP Performance Issue'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2304148321890563972</id><published>2010-12-25T10:49:00.001+05:30</published><updated>2010-12-25T10:54:06.126+05:30</updated><title type='text'>QTP Tip | Include Action In a Function</title><content type='html'>Question:  Is there any way we use Reusable Actions in a specific function located in the function library?&lt;br /&gt;&lt;br /&gt;Answer: Yes it is possible. You can insert the RunAction or LoadAndRunAction (QTP 10 or higher versions) statement inside your function.&lt;br /&gt;&lt;br /&gt;The following code will illustrate the concept:&lt;br /&gt;&lt;br /&gt;###############################################################&lt;br /&gt;&lt;br /&gt;'Library&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Function Test()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;  RunAction "My Action", oneIteration&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;'Action or Library&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Call Test&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2304148321890563972?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2304148321890563972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2304148321890563972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2304148321890563972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2304148321890563972'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/include-action-in-function-runaction.html' title='QTP Tip | Include Action In a Function'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2779100744196547092</id><published>2010-12-25T09:53:00.002+05:30</published><updated>2010-12-25T09:56:12.671+05:30</updated><title type='text'>QTP Tip | Reduce Object Repository Size</title><content type='html'>Question: Is there any way to reduce the Object Repository size in HP Quicktest Professional 11. I know that Descriptive Programming is one option. Is there any other way to do this?&lt;br /&gt;&lt;br /&gt;Answer: You can export the XML file and then delete extra information that QTP stores about the object. This will definitely not allow QTP to perform smart identification. But your script can still recognize the objects present in the application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2779100744196547092?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2779100744196547092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2779100744196547092' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2779100744196547092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2779100744196547092'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/reduce-object-repository-size-qtp11-tip.html' title='QTP Tip | Reduce Object Repository Size'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-4652050149251229818</id><published>2010-12-25T09:43:00.003+05:30</published><updated>2010-12-25T09:51:12.433+05:30</updated><title type='text'>QTP Tip | Disable QTP Results Report</title><content type='html'>There is definitely a way to disable the QTP results report which means no result file would be created even after the execution. This is certainly different from turning off the option "View results when the run session ends"&lt;br /&gt;&lt;br /&gt;The solution for this is very simple. Go to Regedit and browse the key&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Logger\Media\Report&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Change value of Active from 1 to 0 :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-4652050149251229818?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/4652050149251229818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=4652050149251229818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4652050149251229818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4652050149251229818'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/disable-qtp-results-report.html' title='QTP Tip | Disable QTP Results Report'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-4290572342515504785</id><published>2010-12-19T13:50:00.003+05:30</published><updated>2010-12-25T09:42:22.723+05:30</updated><title type='text'>QTP Environment Variables Lost</title><content type='html'>I got a query from one of my esteemed readers which is shown below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Query:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;I am using QTP 10.0 with .NET Addin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;I load environment variable from external file using&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Environment.LoadFromFile &lt;filepath&gt;&lt;/filepath&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;and this statement is the very first statement in my function library&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;and When QTP is executed it runs fine loading all environment variables&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;now after script has run through some time I pause QTP script for some time&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;and then continue script execution&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Now I see that all the environment variables are lost&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note that this does not happen for If my QTP action code has few number&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;of lines of code&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;but If my QTP Action code contains more than 800 lines of code I observe this issue&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;has anyone observed such issue Huh?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Could someone comment if there is any patch Available to resolve this issue ??&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;##########################################################&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Resolution:&lt;/span&gt; As far as this query is concerned, this is definitely a performance issue with QTP and should be raised to the HP team&lt;br /&gt;&lt;br /&gt;I would like to know has anyone else faced this type of issue before!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-4290572342515504785?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/4290572342515504785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=4290572342515504785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4290572342515504785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4290572342515504785'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/qtp-bug-environment-variables-lost.html' title='QTP Environment Variables Lost'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-4264144313122930315</id><published>2010-12-19T13:44:00.002+05:30</published><updated>2010-12-19T13:46:53.303+05:30</updated><title type='text'>QTP Tip | Capture Application Screenshot during Execution</title><content type='html'>We can certainly capture application screenshots during execution. Use "Capturebitmap" method to accomplish this. For details please refer to QTP help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-4264144313122930315?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/4264144313122930315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=4264144313122930315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4264144313122930315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4264144313122930315'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/capture-application-screenshot.html' title='QTP Tip | Capture Application Screenshot during Execution'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5875294069041846730</id><published>2010-12-18T10:46:00.008+05:30</published><updated>2010-12-19T13:24:01.619+05:30</updated><title type='text'>QTP11 Complete List of New Features</title><content type='html'>Here I am presenting a complete list of features which are available in the newly launched HP Quicktest Professional 11.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;1. Syntax Hints for Regular Expressions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is now easy to create regular expressions taking help of syntax hints. Regular expression evaluator is available in QTP 11 to test Regular expressions which you have created.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;2. Visual Relation Identifiers: Identify objects in relation to other objects&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;HP R&amp;amp;D team has looked beyond the unreliability of ordinal identifers and come up with a new feature called Visual Relation Identifiers. Ordinal identifers hold good only as long as the relative positions of objects are maintained but if this position changes, the object identification fails.&lt;br /&gt;&lt;br /&gt;According to HP Team&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"A visual relation identifier is a set of definitions that enable you to identify the object in the application according its neighboring objects in the application. You can select neighboring objects that will maintain the same relative location to your object, even if the user interface design changes. You define visual relations in the Visual Relation Identifier dialog box, which is accessible from the local or shared object repository, and from the Object Properties dialog box."&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;3. Recording on Firefox Browser&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The much anticipated feature ie recording on Mozilla Firefox browser is now available.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;4. Load Function Libraries at Run Time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With the help of LoadFunctionLibrary statement. You can now load a function library when a step runs instead of at the beginning of a run session.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;5. Much Awaited Log Tracking is available now&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;HP QTP 11 is nowcapable of receiving Java or .NET log framework messages from your application which can then be embedded in the QTP run results.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;6. Managing Test Data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;QTP 11 now boasts of an improved test data management on integrating with HP Quality Center.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;7. XPath and CSS based object identification&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Identify objects not only using normal object identification but with XPath and CSS identifier properties. This is a much awaited and a great feature.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;8. Good Looking and Enhanced Results Viewer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;HP team has now created a very good looking and some advanced Results viewer in QTP 11. The new improved results viewer provides an executive summary page with summary data, pie charts and statistics for both the current and previous runs and a quick link to the previous run results.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_izaCDvRg_oo/TQ22M6NKYcI/AAAAAAAAAAU/CMLmnG61Fno/s1600/qtpresultsviewer1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 447px; height: 375px;" src="http://1.bp.blogspot.com/_izaCDvRg_oo/TQ22M6NKYcI/AAAAAAAAAAU/CMLmnG61Fno/s400/qtpresultsviewer1.png" alt="" id="BLOGGER_PHOTO_ID_5552294248516837826" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;9. WPF and Silverlight Add-in Extensibility SDK&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;It enables you to develop support for testing third-party and custom WPF and Silverlight controls that are not supported out-of-the-box by the relevant QuickTest add-ins.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;10. Embed/Run Javascript in web pages&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can use the new EmbedScript/EmbedScriptFromFile and RunScript/RunScriptFromFile functions to embed JavaScripts in all loaded browser pages and frames or to run JavaScripts in specific pages.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;11. Extensibility Accelerator for QuickTest Professional&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It provides a Visual Studio like IDE that accelerates and facilitates the design, development and deployment of QuickTest Web add-in extensibility support sets. These support sets extend the web add-ins so that you can test web controls that are not supported out of the box.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;12. Automatically Parameterize Steps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can instruct QTP 11 to automatically parameterize test steps at the end of record session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5875294069041846730?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5875294069041846730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5875294069041846730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5875294069041846730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5875294069041846730'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/qtp11-complete-list-new-features.html' title='QTP11 Complete List of New Features'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_izaCDvRg_oo/TQ22M6NKYcI/AAAAAAAAAAU/CMLmnG61Fno/s72-c/qtpresultsviewer1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2684071028171292616</id><published>2010-12-12T09:19:00.002+05:30</published><updated>2010-12-12T09:28:47.863+05:30</updated><title type='text'>VBScript Code | Writing text to File</title><content type='html'>&lt;div&gt;Write the below written QTP code inside a notepad and save it as a .vbs file. You can either run it from command prompt or run it by double-clicking on it.&lt;/div&gt;&lt;div&gt;&lt;b&gt;VBScript Code - The following code reads first line from a text file.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;/div&gt;&lt;div&gt;Set FSO = CreateObject("Scripting.FilesystemObject")&lt;/div&gt;&lt;div&gt;Set QTPfile = FSO.OpenTextFile("c:\myfile.txt", ForWriting, False)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;QTPfile.WriteLine(" This is my demo text")&lt;/div&gt;&lt;/div&gt;&lt;div&gt;QTPfile.Close&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2684071028171292616?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2684071028171292616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2684071028171292616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2684071028171292616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2684071028171292616'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/qtp-vbscript-code-writing-text-file.html' title='VBScript Code | Writing text to File'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-4073636922038531160</id><published>2010-12-12T09:12:00.002+05:30</published><updated>2010-12-12T09:18:32.575+05:30</updated><title type='text'>VBScript Code | Reading all lines from File</title><content type='html'>&lt;div&gt;Write the below written QTP code inside a notepad and save it as a .vbs file. You can either run it from command prompt or run it by double-clicking on it.&lt;/div&gt;&lt;div&gt;&lt;b&gt;VBScript Code - The following code reads first line from a text file.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;/div&gt;&lt;div&gt;Set FSO = CreateObject("Scripting.FilesystemObject")&lt;/div&gt;&lt;div&gt;Set QTPfile = FSO.OpenTextFile("c:\myfile.txt", ForReading , False)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While not QTPfile.AtEndOfStream&lt;/div&gt;&lt;div&gt;a=QTPfile.ReadLine&lt;/div&gt;&lt;div&gt;Print a&lt;/div&gt;&lt;div&gt;Wend&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-4073636922038531160?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/4073636922038531160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=4073636922038531160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4073636922038531160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4073636922038531160'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/vbscript-code-reading-all-complete-file.html' title='VBScript Code | Reading all lines from File'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-9123859596691483731</id><published>2010-12-12T09:06:00.003+05:30</published><updated>2010-12-12T09:11:10.438+05:30</updated><title type='text'>VBScript Code | Reading text from File</title><content type='html'>Write the below written QTP code inside a notepad and save it as a .vbs file. You can either run it from command prompt or run it by double-clicking on it.&lt;div&gt;&lt;b&gt;VBScript Code - The following code reads first line from a text file.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Const ForReading = 1, ForWriting = 2, ForAppending = 8&lt;/div&gt;&lt;div&gt;Set FSO = CreateObject("Scripting.FilesystemObject")&lt;/div&gt;&lt;div&gt;Set QTPfile = FSO.OpenTextFile("c:\myfile.txt", ForReading , False)&lt;/div&gt;&lt;div&gt;a=QTPfile.ReadLine&lt;/div&gt;&lt;div&gt;QTPfile.Close&lt;/div&gt;&lt;div&gt;Print a&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-9123859596691483731?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/9123859596691483731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=9123859596691483731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/9123859596691483731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/9123859596691483731'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/qtp-vbscript-code-reading-text-file.html' title='VBScript Code | Reading text from File'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-7044271635788546592</id><published>2010-12-12T08:58:00.001+05:30</published><updated>2010-12-12T09:02:15.667+05:30</updated><title type='text'>VBScript Code | Appending text to File</title><content type='html'>Write the below written QTP code inside a notepad and save it as a .vbs file. You can either run it from command prompt or run it by double-clicking on it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;VBScript Code&lt;/b&gt; - &lt;b&gt;The following code appends a &lt;span id="IL_AD1" class="IL_AD"&gt;text to&lt;/span&gt; a file. If the file does  not exist, it creates the file.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: small"&gt;Const ForReading = 1, ForWriting = 2, ForAppending =  8&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: small"&gt;Set FSO =  CreateObject("Scripting.FilesystemObject")&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: small"&gt;Set QTPfile = FSO.OpenTextFile("c:\myfile.txt",  ForAppending, True)&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: small"&gt;QTPfile.WriteLine("Myfirst line of  text.")&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-SIZE: small"&gt;QTPfile.Close&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-7044271635788546592?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/7044271635788546592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=7044271635788546592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7044271635788546592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7044271635788546592'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/vbscript-append-create-text-file.html' title='VBScript Code | Appending text to File'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5094827659682463025</id><published>2010-12-03T20:02:00.002+05:30</published><updated>2010-12-03T20:23:18.253+05:30</updated><title type='text'>HP Quicktest VBScript Palindrome</title><content type='html'>&lt;div&gt;Write the below written QTP code inside a notepad and save it as a .vbs file. You can either run it from command prompt or run it by double-clicking on it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;VBScript Code - Finding whether a string is Palindrome or Not.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;x=Inputbox("Enter a string")&lt;/div&gt;&lt;div&gt;if x= strreverse(x) then&lt;/div&gt;&lt;div&gt;  Msgbox "Its a Palindrome"&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;  Msgbox "Its not a Palindrome"&lt;/div&gt;&lt;div&gt;End if&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5094827659682463025?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5094827659682463025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5094827659682463025' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5094827659682463025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5094827659682463025'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/12/hp-quicktest-vbscript-palindrome.html' title='HP Quicktest VBScript Palindrome'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5991243025548408447</id><published>2010-10-15T12:19:00.003+05:30</published><updated>2010-10-15T12:49:23.759+05:30</updated><title type='text'>VBScript- Property Let, Property Get, Property Set</title><content type='html'>&lt;p&gt;Class properties in VBScript are used to assign values to private variable  and handle the process of data validation. &lt;/p&gt; &lt;p&gt;&lt;b&gt;Property Let&lt;/b&gt;: Which is used by the outside code to store a &lt;span id="IL_AD5" class="IL_AD"&gt;value in&lt;/span&gt; the &lt;span id="IL_AD2" class="IL_AD"&gt;private  property&lt;/span&gt; variable. It is similar to a procedure in the sense that it does  not return a value. A Property Let procedure must accept at least one argument.  If the private variable you are using is an object then the process of  assignment and data validation is handled by Property Set. &lt;b&gt;Property Set:&lt;/b&gt;  Similar &lt;span id="IL_AD6" class="IL_AD"&gt;to Property&lt;/span&gt; Let but used for object  based properties. By default, the Property Set procedure is Public.&lt;/p&gt; &lt;p&gt;To retrieve the &lt;span id="IL_AD4" class="IL_AD"&gt;value of&lt;/span&gt; a private  variable we will retrieve the &lt;span id="IL_AD3" class="IL_AD"&gt;value of a  property&lt;/span&gt;. &lt;b&gt;Property Get&lt;/b&gt;: This is used by code outside of your class  to read the value of a private property variable. It is similar to a function in  the sense that it returns a value to the calling code -- this value is the  private variable value.&lt;/p&gt; &lt;p&gt;The Property Get procedure does not accept any arguments. You can add an  argument to it, but then you have to add an additional argument to the  property's corresponding Property Let or Property Set procedure, because  Property Let/Set procedure must always have exactly one more argument than its  corresponding Property Get procedure.&lt;/p&gt; &lt;p&gt;If the property get procedure returns an object then we can use the set  statement (but it works well without set also) to return the value.&lt;/p&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold; font-style: italic;"&gt;Class ABC&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold; font-style: italic;"&gt;    'Private Object&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold; font-style: italic;"&gt;    Private var_obj&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold; font-style: italic;"&gt;    Public Property Get username()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold; font-style: italic;"&gt;        Set username = var_obj&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold; font-style: italic;"&gt;    End Property&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold; font-style: italic;"&gt;End CLass&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Read only Properties&lt;/strong&gt; have only Property Get procedure&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Write-only properties&lt;/strong&gt; have only a Property Let or a Property  Set procedure&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Read-Write properties&lt;/strong&gt; have a Property Get procedure and  either a Property Let or a Property Set procedure&lt;/p&gt; &lt;p&gt;&lt;b&gt;Example 1 of Property Let, Property Get, Property Set&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Below Example, which shows a simple class that defines a private variable,  m_var, and a two read-write properties, one_type and two_type, the latter of  which is an object&lt;br /&gt;property.&lt;/p&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;Class Computer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    Private m_var&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    Private o_var&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    Public Property Let one_type(stringtype)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;        m_var = stringtype&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    End Property&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    Public Property Get one_type( )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;        one_type = m_var&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    End Property&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    Public Property Set two_type(oObj)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;        Set o_var = oObj&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    End Property&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    Public Property Get two_type( )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;        Set two_type = o_var&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;    End Property&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 255);"&gt;End CLass&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Example 2 of Property Set&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Here is the syntax for a Property Set procedure.&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;Class Main_class&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    'Private FS_Object object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    Private var_Obj&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    Public Property Set FSPro(objFSPro)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;        Set var_Obj = objFSPro&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    End Property&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;End CLass&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;img alt="" src="http://www.blogger.com/qtp-recovery-scenario_files/vbscriptpropertylet2.jpg" /&gt;  &lt;p&gt;For example, here is what code that is using an object based on the above  class might look like.&lt;/p&gt;&lt;span style="color: rgb(255, 255, 255); font-style: italic; font-weight: bold;"&gt;Dim objMain_class&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-style: italic; font-weight: bold;"&gt;Dim objFSPro&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-style: italic; font-weight: bold;"&gt;Set objFSPro=WScript.CreateObject("Scripting.FS_Object")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-style: italic; font-weight: bold;"&gt;Set objMain_class = New Main_class&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-style: italic; font-weight: bold;"&gt;Set objMain_class.FSPro = objFSPro&lt;/span&gt;&lt;br /&gt;&lt;p&gt;Last line uses the Set Statement when it writes to the FSPro property. This  is required because the Main_class class used a Property Set procedure for the  FSPro property. Without the Set statement at the beginning of the last line,  VBScript would produce an error. When a property on a class is object based, it  is typical to use a Property Set procedure. Most programmers using this class  would expect this.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Example 3 of Property Set&lt;/b&gt;&lt;/p&gt; &lt;p&gt;For example imagine we had a class that contained a private property named  ob_var_conn that was expected to be an ADO Connection object. This class  definition, with the&lt;br /&gt;property Set and Property Get Statements might look  like:&lt;/p&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;Class Connect_Class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    'Create a Private property to hold our connection object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    Private ob_var_conn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    Public Property Get Connection()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    Set Connection = ob_var_conn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    End Property&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    Public Property Set Connection(ob_var_Connection)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    'Assign the private property ob_var_conn to ob_var_Connection&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    Set ob_var_conn = ob_var_Connection&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;    End Property&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 255, 255); font-style: italic;"&gt;End Class&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The end developer would use the Property Set statement in the following  manner:&lt;/p&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;'Create an instance of Connect_Class&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;Dim ob_var_Class, ob_var_record&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;Set ob_var_class = New Connect_Class&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;Set ob_var_Connection = Server.CreateObject('ADODB.Connection')&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;'Assign ob_var_Connection to the connection property&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255); font-weight: bold;"&gt;Set ob_var_class.Connection = ob_var_Connection&lt;/span&gt;&lt;br /&gt;&lt;p&gt;As with the Property Let statement, the Property Set statement has an  optional argument list. This argument list must be identical to the  corresponding Property Get's argument list.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5991243025548408447?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5991243025548408447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5991243025548408447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5991243025548408447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5991243025548408447'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/10/qtp-vbscript-property-let-get-set.html' title='VBScript- Property Let, Property Get, Property Set'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-7597521343413275522</id><published>2010-10-10T18:38:00.001+05:30</published><updated>2010-10-10T18:43:56.305+05:30</updated><title type='text'>QTP Recovery Scenario</title><content type='html'>QuickTest Professional Recovery Scenarios are summarized in the below mentioned points with three "easy to understand" examples.&lt;br /&gt;&lt;br /&gt;1) With "Recovery Scenario Manager" you can&lt;br /&gt;&lt;br /&gt;a) create and edit recovery files,&lt;br /&gt;b) create and manage the recovery scenarios stored in those files.&lt;br /&gt;&lt;br /&gt;2) A unique icon corresponds to a recovery scenario that indicates its type.&lt;br /&gt;&lt;br /&gt;3) Each recovery scenario is represented by an icon that indicates its type.&lt;br /&gt;&lt;br /&gt;4) You are guided step-by-step, through the process of creating a recovery scenario by Recovery Scenario Wizard.&lt;br /&gt;&lt;br /&gt;5) You start by defining the trigger event. [4 trigger types are there Pop-up window, Object state, Test run error, Application crash]&lt;br /&gt;&lt;br /&gt;6) After that you specify the recovery operation(s) [Recovery Operation can be Keyboard or mouse operation, Close application process, Function call, Restart Microsoft Windows]&lt;br /&gt;&lt;br /&gt;When using Function call, Functions have to be defined using a prototype syntax, which is different for each trigger type.(See QTP User Guide.)&lt;br /&gt;&lt;br /&gt;7) Then you select a post-recovery test run operation. [Which can be Repeat current step and continue, Proceed to next step, Proceed to next action or component iteration, Proceed to next test iteration, Restart current test run, Stop the test run]&lt;br /&gt;&lt;br /&gt;8) The recovery file is saved in the specific location with the file extension .qrs.&lt;br /&gt;&lt;br /&gt;9) Properties for any defined recovery scenario can be viewed from Recovery Scenario Properties dialog box&lt;br /&gt;&lt;br /&gt;10) During the run session, QuickTest ignores deleted recovery scenario that is associated with a test or component.&lt;br /&gt;&lt;br /&gt;11) You can copy recovery scenarios from one recovery scenario file to another.&lt;br /&gt;&lt;br /&gt;12) The scenarios can be prioritized so that QuickTest applies the scenarios during the run session in a order of priority.&lt;br /&gt;&lt;br /&gt;13) Some or all of the scenarios can be disabled.&lt;br /&gt;&lt;br /&gt;14) Recovery Scenario(s) can be set as default for all new tests.&lt;br /&gt;&lt;br /&gt;15) Go to File &gt; Settings, the Test Settings dialog box opens. Select the Recovery tab.&lt;br /&gt;&lt;br /&gt;You can edit a recovery scenario file path by clicking the path once to highlight it, and then clicking it again to enter edit mode.&lt;br /&gt;&lt;br /&gt;16) In the Recovery tab itself you can define when the recovery mechanism is activated:&lt;br /&gt;&lt;br /&gt;On every step.&lt;br /&gt;On error&lt;br /&gt;Never.&lt;br /&gt;&lt;br /&gt;17) You can use the Recovery object to control the recovery mechanism programmatically during the run session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-7597521343413275522?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/7597521343413275522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=7597521343413275522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7597521343413275522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7597521343413275522'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/10/qtp-11-recovery-scenario-tutorial.html' title='QTP Recovery Scenario'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-1180335888123959660</id><published>2010-07-06T19:36:00.002+05:30</published><updated>2010-07-06T19:39:07.161+05:30</updated><title type='text'>What is QTP ?</title><content type='html'>&lt;p&gt;&lt;b&gt;QTP (QuickTest Professional)&lt;/b&gt; is HP's advanced keyword-driven  testing solution. &lt;b&gt;QTP (QuickTest Professional)&lt;/b&gt; provides for functional  test and regression test automation.&lt;/p&gt; &lt;p&gt;With &lt;b&gt;QTP (QuickTest Professional)&lt;/b&gt; you will be able to test&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Standard Windows applications&lt;/li&gt;&lt;li&gt;Web objects,&lt;/li&gt;&lt;li&gt;ActiveX controls, and&lt;/li&gt;&lt;li&gt;.Net&lt;/li&gt;&lt;li&gt;Java&lt;/li&gt;&lt;li&gt;SAP (Systeme, Anwendungen und Produkte in der Datenverarbeitung, Systems,  Applications and Products in Data Processing)&lt;/li&gt;&lt;li&gt;&lt;span id="IL_AD1" class="IL_AD"&gt;Visual Basic applications&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Siebel&lt;/li&gt;&lt;li&gt;Oracle&lt;/li&gt;&lt;li&gt;PeopleSoft and&lt;/li&gt;&lt;li&gt;Terminal emulators (  &lt;a href="http://www.emtec.com/zoc/terminal-emulator.htm"&gt;http://www.emtec.com/zoc/terminal-emulator.htm&lt;/a&gt;l)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;We need additional QuickTest add-ins for special environments e.g. .Net,  Terminal emulators. The current version of &lt;b&gt;QTP&lt;/b&gt; (version 10.0) supports  running tests on the following browsers:&lt;/p&gt; &lt;p&gt;     . &lt;span id="IL_AD2" class="IL_AD"&gt;Microsoft Internet Explorer 6&lt;/span&gt;.0  Service Pack 1 or 7.0 Beta 2 and lower,&lt;br /&gt;     . Netscape Browser 8.0&lt;br /&gt;     .  Mozilla FireFox 1.5.&lt;/p&gt; &lt;p&gt;QuickTest &lt;span id="IL_AD3" class="IL_AD"&gt;Professional&lt;/span&gt; 9.2 is compatible  with: SAP 8.2, .NET 9.2, Web Services 9.2, Java 9.1, Oracle 8.2, PeopleSoft 8.2,  Siebel 8.0, Stingray 8.2, Terminal Emulator 8.0, and VisualAge Smalltalk  8.2.&lt;/p&gt; &lt;p&gt;QTP (QuickTest Professional) is Unicode compliant according to the  requirements of the Unicode standard, enabling you to test applications in many  international languages.&lt;/p&gt; &lt;p&gt;As and when an application under test changes, such as when a "Log in" button  is renamed "Sign Into," we can make one update to an XML-based Shared Object  Repository (within the new Object Repository Manager), and the update will  circulate (propagate) to all tests that reference this object.  QuickTestProfessional keeps object-level changes synchronized among users  throughout test creation efforts. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-1180335888123959660?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/1180335888123959660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=1180335888123959660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1180335888123959660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1180335888123959660'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/07/hp-qtp-quicktest-professional.html' title='What is QTP ?'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-4495357720281293774</id><published>2010-07-06T19:28:00.002+05:30</published><updated>2010-07-06T19:33:00.930+05:30</updated><title type='text'>QTP Testing Process</title><content type='html'>&lt;p&gt;&lt;b&gt;QTP (QuickTest Professional)&lt;/b&gt; lets you create &lt;span id="IL_AD6" class="IL_AD"&gt;tests and&lt;/span&gt; &lt;span id="IL_AD1" class="IL_AD"&gt;business  components&lt;/span&gt; by recording &lt;span id="IL_AD3" class="IL_AD"&gt;operations&lt;/span&gt; as  you perform them in your application.&lt;/p&gt; &lt;p&gt;Test - A compilation of steps organized into one or more actions, which we  can use to verify that our application performs as expected. A test is composed  of actions (3 kinds of actions are there in QTP Non-reusable action, Reusable  action and External action).&lt;/p&gt;1)&lt;b&gt; First&lt;/b&gt; step is &lt;b&gt;Planning&lt;/b&gt; &lt;p&gt;Before starting &lt;span id="IL_AD5" class="IL_AD"&gt;to build&lt;/span&gt; a test, you  should plan it and prepare the required infrastructure.&lt;/p&gt; &lt;p&gt;For example, determine the functionality you want to test, short tests that  check specific functions of the application or complete site.&lt;/p&gt; &lt;p&gt;Decide how you want to &lt;span id="IL_AD2" class="IL_AD"&gt;organize&lt;/span&gt; your  object repositories.&lt;/p&gt;  &lt;p&gt;2) &lt;b&gt;Second&lt;/b&gt; step in QTP is &lt;b&gt;Creating Tests or Components&lt;/b&gt;&lt;/p&gt; &lt;p&gt;We can create a test or component by&lt;/p&gt; &lt;p&gt;a) Either recording a session on your application or Web site.&lt;/p&gt; &lt;p&gt;As we navigate through the application or site, QuickTest graphically  displays each step we perform as a row in &lt;span id="IL_AD4" class="IL_AD"&gt;the  Keyword&lt;/span&gt; View. The &lt;b&gt;Documentation&lt;/b&gt; column of the Keyword View also  displays a description of each step in easy-to-understand sentences. A step is  something that causes or makes a change in your site or application, such as  clicking a link or image, or submitting a data form.&lt;/p&gt; &lt;p&gt;OR&lt;/p&gt; &lt;p&gt;b) Build an object repository and use these objects to add steps manually in  the Keyword View or Expert View. We can then modify your test or component with  special testing options and/or with programming statements.&lt;/p&gt;   &lt;p&gt;3) Third step is Inserting checkpoints into your test or component.&lt;/p&gt; &lt;p&gt;A checkpoint is a verification point that compares a recent value for a  specified property with the expected value for that property. This enables you  to identify whether the Web site or application is functioning correctly.&lt;/p&gt;  &lt;p&gt;4) &lt;b&gt;Fourth&lt;/b&gt; step is&lt;/p&gt; &lt;p&gt;Broaden the scope of your test or component by replacing fixed values with  parameters.&lt;/p&gt; &lt;p&gt;To check how your application performs the same operations with different  data you can parameterize your test or component.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;When you parameterize your test or component, QuickTest substitutes the fixed  values in your test or component with parameters&lt;/p&gt; &lt;p&gt;Each run session that uses a different set of parameterized data is called an  iteration.&lt;/p&gt; &lt;p&gt;We can also use output values to extract data from our test or component. An  output value is a value retrieved during the run session and entered into the  Data Table or saved as a variable or a parameter. We can subsequently use this  output value as input data in your test or component.&lt;/p&gt; &lt;p&gt;We can use many functional testing features of QuickTest to improve your test  or component and/or add programming statements to achieve more complex testing  goals.&lt;/p&gt;  &lt;p&gt;5) &lt;b&gt;Fifth&lt;/b&gt; step is &lt;b&gt;running the test&lt;/b&gt;&lt;/p&gt; &lt;p&gt;After creating test or component, we run it.&lt;/p&gt; &lt;p&gt;Run test or component to check the site or application.&lt;/p&gt; &lt;p&gt;When we run the test or component, QuickTest connects to your Web site or  application and performs each operation in a test or component, checking any  text strings, objects, or tables you specified. If we parameterized the test  with Data Table parameters, QuickTest repeats the test (or specific actions in  your test) for each set of data values we defined.&lt;/p&gt; &lt;p&gt;Run the test or component to debug it.&lt;/p&gt; &lt;p&gt;We can control the run session to identify and eliminate defects in the test  or component. We can use the&lt;/p&gt; &lt;p&gt;&lt;b&gt;Step Into&lt;/b&gt;,&lt;/p&gt; &lt;p&gt;&lt;b&gt;Step Over&lt;/b&gt;,&lt;/p&gt; &lt;p&gt;And &lt;b&gt;Step Out&lt;/b&gt;&lt;/p&gt; &lt;p&gt;commands to run a test or component step by step.&lt;/p&gt; &lt;p&gt;We can also set breakpoints to pause the test or component at pre-determined  points.&lt;/p&gt; &lt;p&gt;We can view the value of variables in the test or component each time it  stops at a breakpoint in the Debug Viewer.&lt;/p&gt;  &lt;p&gt;6)&lt;b&gt; Sixth&lt;/b&gt; step is &lt;b&gt;analyzing the results&lt;/b&gt;&lt;/p&gt; &lt;p&gt;After we run test or component, we can view the results.&lt;/p&gt; &lt;p&gt;➤ View the results in the Results window.&lt;/p&gt; &lt;p&gt;After running the test or component, we can view the results of the run in  the &lt;span id="IL_AD7" class="IL_AD"&gt;Test Results&lt;/span&gt; window. We can view a  summary of the results as well as a detailed report.&lt;/p&gt; &lt;p&gt;➤ Report defects identified during a run session.&lt;/p&gt; &lt;p&gt;If Quality Center is installed, we can report the defects fond out to a  database. We can instruct QuickTest to automatically report each failed step in  the test or component, or we can report them manually from theTest Results  window. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-4495357720281293774?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/4495357720281293774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=4495357720281293774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4495357720281293774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/4495357720281293774'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/07/qtp-testing-process-quicktest.html' title='QTP Testing Process'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-6328432068458964210</id><published>2010-07-06T19:23:00.002+05:30</published><updated>2010-07-06T19:26:38.891+05:30</updated><title type='text'>QTP Test Object Model</title><content type='html'>&lt;p&gt;&lt;b&gt;Test object Model&lt;/b&gt; is a set of object types or Classes that QuickTest  uses to represents the objects in our &lt;span id="IL_AD1" class="IL_AD"&gt;application&lt;/span&gt;.&lt;/p&gt; &lt;p style="text-align: left;"&gt;A &lt;b&gt;test object class&lt;/b&gt; comprises of a list of  &lt;span id="IL_AD2" class="IL_AD"&gt;properties&lt;/span&gt; that can individually (uniquely)  &lt;span id="IL_AD3" class="IL_AD"&gt;identify&lt;/span&gt; objects of that class and a set of  appropriate methods that QuickTest can record for it.&lt;br /&gt;&lt;/p&gt;A &lt;b&gt;test object&lt;/b&gt; is an object that QuickTest creates in the test to  correspond to (represent) the actual object in the application. QuickTest uses  the stored &lt;span id="IL_AD6" class="IL_AD"&gt;information&lt;/span&gt; about the object  during the run session to identify and check the object. &lt;p&gt;A &lt;b&gt;run-time object&lt;/b&gt; is the real (actual) object in the application or  Web site on which methods are performed during the run session.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Properties and methods of objects:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;&lt;span id="IL_AD5" class="IL_AD"&gt;The property&lt;/span&gt; set for each test object is  created and maintained by QuickTest. The property set for each run-time object  is created and maintained by the object architect (creator) (Microsoft for  Internet Explorer objects, Netscape for Netscape objects).&lt;/p&gt; &lt;p&gt;Similarly, methods of test objects are methods that QuickTest recognizes and  records when they are executed (performed) on an object while we are recording,  and that QuickTest executes when the test or component runs. Methods of Run-time  object are the methods of the object in theapplication as defined by the object  architect (creator). We can access and execute run-time object methods using the  Object property. &lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Some important points to remember about methods and properties  :&lt;/u&gt;&lt;/b&gt;&lt;/p&gt; &lt;div align="justify"&gt;&lt;li&gt;Each test object method we execute (perform) while recording is recorded as  a separate step in the test. When we run the test, QuickTest executes (performs)  the recorded test object method on the run-time object.&lt;br /&gt;&lt;/li&gt; &lt;li&gt;Properties of test object are captured from object while recording.  QuickTest uses the values of these properties to identify runtime objects in the  application during a run session.&lt;/li&gt; &lt;li&gt;&lt;span id="IL_AD4" class="IL_AD"&gt;Property values&lt;/span&gt; of objects in the  application may change .To make the test object property values match the  property values of the run-time object, we can modify test object properties  manually while designing the test or component or using SetTOProperty statements  during a run session. We can also use regular expressions to identify property  values.&lt;/li&gt; &lt;li&gt;We can view or modify the test object property values that are stored with  the test or component in the Object Properties or Object Repository dialog  box.&lt;/li&gt; &lt;li&gt;We can view the syntax of the test object methods as well as the run-time  methods of any object on our desktop using the Methods tab of the Object  Spy.&lt;/li&gt; &lt;li&gt;We can retrieve or modify property values of the &lt;b&gt;TEST OBJECT&lt;/b&gt; during  the run session by adding GetTOProperty and SetTOProperty statements in the  Keyword View or Expert View. We can retrieveproperty values of the &lt;b&gt;RUNTIME  OBJECT&lt;/b&gt; during the run session by adding GetROProperty statements.&lt;/li&gt; &lt;p&gt;If the available test object methods or properties for an object are not  sufficient or they do not provide the functionality we need, we can access the  internal methods and properties of any &lt;b&gt;run-time object&lt;/b&gt; using the Object  property. We can also use the attribute object property to identify Web objects  in the application according to user-defined properties.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-6328432068458964210?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/6328432068458964210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=6328432068458964210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6328432068458964210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6328432068458964210'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/07/qtp-test-object-model.html' title='QTP Test Object Model'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-1646592349693691081</id><published>2010-07-03T10:07:00.001+05:30</published><updated>2010-07-03T10:30:38.504+05:30</updated><title type='text'>QTP 9.2 Installation Guide</title><content type='html'>The installation of QTP is very easy. You just need to click on the setup.exe application and provide the appropriate license information when asked for. The installation process is very user friendly.&lt;br /&gt;&lt;br /&gt;Initially or after the installation process, you need to install Microsoft Script Debugger on your machine where QTP is installed. Installation of Microsoft Script Debugger enables some of the features of QTP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-1646592349693691081?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/1646592349693691081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=1646592349693691081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1646592349693691081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1646592349693691081'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/07/qtp-10-installation-guide.html' title='QTP 9.2 Installation Guide'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2713191104319696028</id><published>2010-07-02T23:57:00.002+05:30</published><updated>2010-07-03T10:07:06.294+05:30</updated><title type='text'>Descriptive Programming QTP Tutorial</title><content type='html'>&lt;p&gt;Whenever you record on any object using QTP, QTP adds the test object to the Object Repository. While running a test, QTP finds the object in the Object Repository and uses the stored test object’s description to identify the object in your application/website. Only after the object is found in the Object Repository, QTP can perform methods on those objects.&lt;/p&gt; &lt;p&gt;We can also instruct QTP to perform methods on objects without referring to the Object Repository. This is possible with the help of Programmatic descriptions or descriptive programming.&lt;/p&gt; &lt;p&gt;This implies that descriptive programming is very helpful if you want to perform an operation on an object that is not stored in Object Repository.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Descriptive Programming&lt;/b&gt; is also useful to perform the same operation  on several objects with certain matching &lt;span id="IL_AD2" class="IL_AD"&gt;properties&lt;/span&gt; e.g. suppose there are 8 check boxes on a web page with names as chk_1, chk_2 and so on. So it’s not a good idea to put these in an Object Repository. With the help of &lt;b&gt;Descriptive Programming&lt;/b&gt; you can Set  these check boxes ON or OFF according to your application needs.&lt;/p&gt; &lt;p&gt;If you are dynamically creating test objects during the run session then also  &lt;b&gt;Descriptive Programming&lt;/b&gt; goes a long way to help you. Suppose in a web site you have to generate a list of all the customer's email addresses, who brought iPhone from you, based on the geographical information you provided and then after the email addresses are provided as checkboxes you have to send a rebate letter to them. You don't know how many check boxes will be there based on the geographical information you provided. So in this case, you can use a Descriptive programming to instruct QTP to perform a Set "ON" method for all objects that fit the description: HTML TAG = input, TYPE = check box.&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Descriptive programming can be done in two ways:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Static: We provide the set of properties and values, that describe the  object, directly.&lt;/p&gt; &lt;p&gt;Dynamic: We have to add a &lt;span id="IL_AD3" class="IL_AD"&gt;collection&lt;/span&gt; of  properties and values to a description object and then provide the &lt;span id="IL_AD4" class="IL_AD"&gt;statement&lt;/span&gt; with the description object's name.&lt;/p&gt; &lt;p&gt;Static is easier but Dynamic provides more power, efficiency, and  flexibility.&lt;/p&gt; &lt;p&gt;We will see examples of both static and dynamic type of descriptive  programming in QTP.&lt;/p&gt; &lt;p&gt;First let’s take a look at Static:&lt;/p&gt; &lt;p&gt;This below example uses Descriptive Programming to open Flight Application and does not use object repository at all. So one of the other advantages is you can copy this script and Run this from any other machine (other than on which it was created) and it is supposed to work fine.&lt;/p&gt; &lt;p&gt;For this time just read the script and move on, you will better understand it  as you read more.&lt;/p&gt; &lt;p&gt;[ I have given Example 1a's recorded version (which uses Object Repository)in Example 1b just for your comparison of the two so that you can better understand both ]&lt;/p&gt; &lt;p&gt;Example 1a: uses DP&lt;br /&gt;We can describe the object directly by specifying  &lt;span id="IL_AD5" class="IL_AD"&gt;property&lt;/span&gt;: =value pairs.&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;SystemUtil.Run "C:\&lt;span id="IL_AD1" class="IL_AD"&gt;Program&lt;/span&gt; Files\Mercury &lt;span id="IL_AD7" class="IL_AD"&gt;Interactive&lt;/span&gt;\QuickTest &lt;span id="IL_AD6" class="IL_AD"&gt;Professional&lt;/span&gt;\samples\flight\app\flight4b.exe"&lt;br /&gt;window("Title:=Login").WinEdit("AttachedText:=Agent  Name:").Set  "sachin"&lt;br /&gt;window("Title:=Login").WinEdit("AttachedText:=Password:").Set  "mercury"&lt;br /&gt;window("Title:=Login").winbutton("Text:=OK").Click&lt;br /&gt;window("Title:=Flight  Reservation").close&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Examle 1b: uses OR&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:100%;"&gt;SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"&lt;br /&gt;Dialog("Login").WinEdit("Agent  Name:").Set "sachin"&lt;br /&gt;Dialog("Login").WinEdit("Agent Name:").Type  micTab&lt;br /&gt;Dialog("Login").WinEdit("Password:").SetSecure  "476a9c021bc5a7422cf5a84ad08503823abcbaae"&lt;br /&gt;Dialog("Login").WinButton("OK").Click&lt;br /&gt;Window("Flight  Reservation").WinMenu("Menu").Select "File;Exit"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Note: When using programmatic descriptions from a specific point within a test object hierarchy, you must continue to use programmatic descriptions from that point onwards within the samestatement . If you specify a test object by its object repository name after other objects in the hierarchy have been specified using programmatic descriptions, QTP cannot identify the object.&lt;/p&gt; &lt;p&gt;For example, you can use the following statement since it uses programmatic descriptions throughout the entire test object hierarchy:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Browser("Title:=Mercury  Tours").Page("Title:=Mercury Tours").WebEdit("Name:=Author", "Index:=3").Set  "Testing" &lt;/span&gt;&lt;/p&gt; &lt;p&gt;Above line uses Descriptive Programming for all objects like Browser, Page,  WebEdit.&lt;/p&gt; &lt;p&gt;You can also use the statement below, since it uses programmatic descriptions from a certain point in the description (starting from the Page object description):&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Browser("Mercury Tours").Page("Title:=Mercury  Tours").WebEdit("Name:=Author", "Index:=3").Set "&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Testing&lt;/span&gt;&lt;span style="font-size:100%;"&gt;" &lt;/span&gt;&lt;/p&gt; &lt;p&gt;Above line uses Object Repository for Browser object and Descriptive  Programming for Page and WebEdit.&lt;/p&gt; &lt;p&gt;However, you cannot use the following statement, since it uses programmatic descriptions for the Browser and Page objects but then attempts to use an object repository name for the WebEdit test object:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Browser("Title:=Mercury  Tours").Page("Title:=Mercury Tours"). WebEdit("Author").Set "&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Testing&lt;/span&gt;&lt;span style="font-size:100%;"&gt;" &lt;/span&gt;&lt;/p&gt; &lt;p&gt;QTP tries to locate the WebEdit object based on its name, but cannot locate it in the repository because the parent objects were specified using programmatic descriptions.&lt;/p&gt; &lt;p&gt;If the same programmatic description is being used several times then we can  assign the object to a variable:&lt;br /&gt;E.g. in the above Example 1a script,  window("Title:=Login") is being used several times so we do this:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Set var =  window("Title:=Login")&lt;br /&gt;SystemUtil.Run "C:\Program Files\Mercury  Interactive\QuickTest  Professional\samples\flight\app\flight4b.exe"&lt;br /&gt;var.WinEdit("AttachedText:=Agent  Name:").Set "&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Testing&lt;/span&gt;&lt;span style="font-size:100%;"&gt;"&lt;br /&gt;var.WinEdit("AttachedText:=Password:").Set  "mercury"&lt;br /&gt;var.winbutton("Text:=OK").Click&lt;br /&gt;window("Title:=Flight  Reservation").close&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Or &lt;/p&gt; &lt;p&gt;We can use 'With &amp;amp; End With' Statement like below:&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;SystemUtil.Run "C:\Program Files\Mercury  Interactive\QuickTest Professional\samples\flight\app\flight4b.exe"&lt;br /&gt;With  window("Title:=Login")&lt;br /&gt;.WinEdit("AttachedText:=Agent Name:").Set  "&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Testing&lt;/span&gt;&lt;span style="font-size:100%;"&gt;"&lt;br /&gt;.WinEdit("AttachedText:=Password:").Set  "mercury"&lt;br /&gt;.winbutton("Text:=OK").Click&lt;br /&gt;End with&lt;br /&gt;window("Title:=Flight  Reservation").close&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Now let’s take a look at the dynamic type:&lt;/p&gt; &lt;p&gt;Understand it like this – A Property Object is a property name and value. We use Description object to return a Properties collection object containing a set of Property Objects. Then only in place of an object name, returned properties collection, can be specified in a statement.&lt;/p&gt; &lt;p&gt;For creating Properties collection "Description.Create" statement is used.  &lt;/p&gt;Set Myvar = Description.Create() &lt;p&gt;Once Property Object (Myvar) is created, statements to add, edit, remove and retrieve properties and values to or from properties objects can be entered during the run time.&lt;/p&gt; &lt;p&gt;Lets take a complete example of this: [these extra values (height &amp;amp; width) are not important in our example. Our example can run without height and widthproperties. I have just added those in order to make you understand this] &lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;SystemUtil.Run "C:\Program Files\Mercury  Interactive\QuickTest  Professional\samples\flight\app\flight4b.exe"&lt;br /&gt;window("Title:=Login").WinEdit("AttachedText:=Agent  Name:","height:=20","width:=119" ).Set  "&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Testing&lt;/span&gt;&lt;span style="font-size:100%;"&gt;"&lt;br /&gt;window("Title:=Login").WinEdit("AttachedText:=Password:").Set  "mercury"&lt;br /&gt;window("Title:=Login").winbutton("Text:=OK").Click&lt;br /&gt;window("Title:=Flight  Reservation").close&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Now modifying the above script using Description.Create.&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Set myvar=  description.Create()&lt;br /&gt;myvar("AttachedText").value="Agent  Name:"&lt;br /&gt;myvar("height").value=20&lt;br /&gt;myvar("width").value=119&lt;br /&gt;SystemUtil.Run  "C:\Program Files\Mercury Interactive\QuickTest  Professional\samples\flight\app\flight4b.exe"&lt;br /&gt;window("Title:=Login").WinEdit(myvar  ).Set "&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Testing&lt;/span&gt;&lt;span style="font-size:100%;"&gt;"&lt;br /&gt;window("Title:=Login").WinEdit("AttachedText:=Password:").Set  "mercury"&lt;br /&gt;window("Title:=Login").winbutton("Text:=OK").Click&lt;br /&gt;window("Title:=Flight  Reservation").close&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Retrieving child objects in Descriptive Programming:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;There is a ChildObjects method which can be used to get all objects located within a specific parent object or only those that match some criteria for programmatic description. In short we first of all need to create a description and then use a particular syntax to retrieve all child objects that match that description and manipulate them according to our own wish.&lt;/p&gt; &lt;p&gt;I will straightway show you an example of how to do this:&lt;/p&gt; &lt;p&gt;Make sure that Flight Reservation window is open (Start- Programs- QuickTest Professional- Sample Applications- Flight). In this Flight reservation window go to File- Open Order. &lt;/p&gt; &lt;p&gt;We will use this childobjects method to count the checkboxes in this 'Open Order' dialogbox.In the below script childobjects method is being applied to dialog object and childobjects method uses mydescription property object we created.&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Set  mydescription=Description.Create()&lt;br /&gt;mydescription("Class  Name").value="WinCheckBox"&lt;br /&gt;Set Checkboxes = window("text:=FLight  Reservation").dialog("text:=Open  Order").ChildObjects(mydescription)&lt;br /&gt;a=Checkboxes.count&lt;br /&gt;msgbox(a)&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Just try to understand the above code. This is just an example, in real life  you can use this count in some kind of loop.&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Creating checkpoints programmatically:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Run-time value of a specified object property can be compared with expected value of that property by using programmatic description.&lt;br /&gt;Descriptive programming checks are helpful for the object whose properties you want to check but the object is not stored in Object Repository.&lt;/p&gt; &lt;p&gt;I will show a small example here which checks if the "Flights.." button in Flight Reservation window is enable or disable. I have used a message box to show whether it is enable or disable, you can use the Report.ReportEvent Statement to send the results to the result window of QTP.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;For the below script make sure that Flight reservation window is open:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;a=window("Title:=Flight  Reservation").winbutton("Text:=FLIGHT").GetROProperty("enabled")&lt;br /&gt;msgbox  (a)&lt;br /&gt;If a = True Then&lt;br /&gt;msgbox ("button is enable")&lt;br /&gt;else&lt;br /&gt;msgbox  ("button is disable")&lt;br /&gt;End If&lt;/span&gt;&lt;/p&gt; &lt;p&gt;In the above script GetROProperty method is being applied to 'Flight..'  button to check the 'enable' property of the button.&lt;/p&gt; &lt;p&gt;[you can see an object's properties and methods from QTP help. Definitely  there are other ways also to get these].&lt;/p&gt; &lt;p&gt;&lt;b&gt;DP is also useful in case of programming WebElement objects&lt;/b&gt; (A  WebElement is a general web object which can represent any web object.)&lt;/p&gt; &lt;p&gt;As an example, just open the website (http://newtours.demoaut.com/) and make sure the cursor is in the “User Name” text box and write the following line in the Expert View of new test:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;browser("title:=Welcome: Mercury  Tours").page("title:=Welcome: Mercury  Tours").webelement("name:=password","index:=2").Click&lt;/span&gt;&lt;/p&gt; &lt;p&gt;It will just click the “Password” text box which just highlights that text  box and places the mouse cursor in that box.&lt;/p&gt; &lt;p&gt;For all the methods and properties of WebElement object please refer QTP User  Guide.&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Index property&lt;/u&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Index property is useful to identify a test object uniquely. QTP also, while learning an object, can assign a value to test object’s index property to uniquely identify it. Index property values are specific to an object and also the value is based on the order in which the object appears in the source code.&lt;br /&gt;The value starts with 0.&lt;/p&gt; &lt;p&gt;If you use Index:=1 with WebEdit test object, QTP will search for the second  WebEdit object on a web page.&lt;/p&gt; &lt;p&gt;As an example, just open the website (http://newtours.demoaut.com/) and write the following line in the expert view of new test:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;browser("title:=Welcome: Mercury  Tours").page("title:=Welcome: Mercury Tours").WebEdit("Index:=1").Set  "hello"&lt;/span&gt;&lt;/p&gt; &lt;p&gt;This will write “hello” in the “Password” text box. In the above line if you do Index:=0 then “hello” will be written in the “User Name” text box.&lt;/p&gt; &lt;p&gt;On the other hand if you use Index:=2 to describe a WebElement object, QTP will search for the third object on the page (it can be any, regardless of type) because WebElement object is general object that applies to all objects.&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Last but not the least SystemUtil object&lt;/u&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;SystemUtil object allows you to open and close application by writing its  code manually in the Expert view of QTP.&lt;br /&gt;Below example shows how to open or  close a Notepad using code:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;systemutil.Run  "Notepad.exe"&lt;br /&gt;wait(3)&lt;br /&gt;SystemUtil.CloseProcessByName("Notepad.exe")&lt;/span&gt;&lt;/p&gt; &lt;p&gt;This example uses Run and CloseProcessByName methods to open and close the application (Notepad). Instead of closing the Notepad with CloseProcessByName method, we can use the below line also which is mostly used.&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;window("title:=Untitled -  Notepad").Close&lt;/span&gt;&lt;/p&gt; &lt;p&gt;For opening the application we can use complete paths also e.g.&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-size:100%;"&gt;systemutil.Run "C:\Program Files\Internet  Explorer\iexplore.exe"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This opens an Internet explorer.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2713191104319696028?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2713191104319696028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2713191104319696028' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2713191104319696028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2713191104319696028'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/07/descriptive-programming-qtp-tutorial.html' title='Descriptive Programming QTP Tutorial'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2729076521638842574</id><published>2010-07-02T23:27:00.001+05:30</published><updated>2010-07-02T23:45:03.545+05:30</updated><title type='text'>Introduction to Quicktest Professional 9.2</title><content type='html'>Quicktest Professional is a Functional Test Automation tool. It is a GUI testing tool from HP Software(originally created by Mercury Interactive Corporation) that allows the automation of user actions on several web based and client based applications developed with a variety of technologies.&lt;br /&gt;&lt;br /&gt;QTP was developed by combining the features of Astra Quicktest and Mercury Interatcive Winrunner. Few years ago, Mercury Interactive acquired Astra Quicktest and of course, later, HP(Hewlett Packard) acquired Mercury Interactive. So, QTP is now HP software. Hence it is called "HP Quicktest Professional" from the version 9.5.&lt;br /&gt;&lt;br /&gt;QTP used a scripting language built of top of VB Script(Visual Basic Script) to specify the test procedure and to manipulate the objects and controls of the AUT(Application under test).&lt;br /&gt;&lt;br /&gt;QTP Overview&lt;br /&gt;&lt;ul&gt;&lt;li&gt;QTP deploys the concept of keyword-driven testing to enhance test creation and maintenance.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Keyword-driven testing is a technique that separates much of the programming work from the actual test steps so that the test steps can be developed earlier and can often be maintained with only minor updates, even when the application or testing needs a significant change.&lt;/li&gt;&lt;li&gt;QTP brings non-technical subject matter experts into the quality process in a meaningful way.&lt;/li&gt;&lt;li&gt;QTP is widely used for regression test automation.&lt;/li&gt;&lt;li&gt;QuickTest Professional is Unicode-compliant and supports Unicode 2.0, UTF-8 and UTF-16.&lt;/li&gt;&lt;li&gt;Quicktest Professional supports working with Winrunner( HP no longer sells Winrunner), Quality Center, Business Process Testing and Loadrunner softwares.&lt;/li&gt;&lt;/ul&gt;By deafult, Quicktest Professional enables you to test&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Standard Windows applications&lt;/li&gt;&lt;li&gt;Web objects&lt;/li&gt;&lt;li&gt;ActiveX controls&lt;/li&gt;&lt;li&gt;Visual Basic Applications&lt;/li&gt;&lt;/ul&gt;You can also acquire additional Quicktest add-ins for a number of special environments(such as Java, Oracle, SAP Solutions, .NET Windows and Web Forms, Siebel, PeopleSoft, Web services and terminal emulator applications.&lt;br /&gt;&lt;br /&gt;QTP versions: From the past many years, several versions of QTP have been launched. They are QTP 6.0, 6.5,8.0,8.2,9.0,9.1,9.2,9.5 and 10.00. Amond all of these, QTP 8.2 and QTP 9.2 are very successful and are used for most of the Test Automation projects.&lt;br /&gt;QTP 9.5 was launched in Feb 2008 and QTP 10.0 was launched in Feb 2009.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2729076521638842574?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2729076521638842574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2729076521638842574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2729076521638842574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2729076521638842574'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/07/introduction-hp-quicktest-professional.html' title='Introduction to Quicktest Professional 9.2'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2672076354240813318</id><published>2010-07-01T23:36:00.001+05:30</published><updated>2010-07-02T00:19:45.662+05:30</updated><title type='text'>Functional Test Automation Life Cycle</title><content type='html'>Functional Test Automation life cycle Methodology comprises 11 main phases:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Decision to automate testing:&lt;/span&gt; it is not that, directly we can kick-start automation for any project/AUT. The Test Manager and client has to take the deicison on whether to go for Test Automation or not. First, the need for Test Automation for the current project has to be determined considering the current status and future plan of the project. During that phase a Cost-Benefit Analysis has to be performed, during which the ROI(Return-On-Investment) has to be calculated and when the ROI is positive and considerable in acceptable time frame, the automation for the project can be given a nod.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Acquisition of Testing Tool:&lt;/span&gt; Once the decision has been made to go for automation, then the tool to automate the manual test cases has to be decided based on analysis of all the available tools in the market. There are several factors to consider like capability of the tool, compatability of the tool with the application, cost and ease of automation- design, execution and maintenance. If the tool is an easy to learn one then the aspect of "Availability of skilled resources" which we discussed earlier can be waived off as the available resources can be trained to make them skillful to work on the project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Automation test planning:&lt;/span&gt; Once the Automation and tool are decided, the most important phase is the Test Planning Phase. This is the phase where the Test Manager/Automation Lead along with the client, has to plan on how to automate, what to automate, when to automate and who to automate. This phase also included the plan for the creation of Automation framework. The framework needs to be designed based on the need and scope of the project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. Set-up the automation environment:&lt;/span&gt; When the plan is ready, then the environment needs to be setup. This includes several activities like creating the application environment for automation similar to Dev-Environment and QA-environment. Sometimes due to budget/ any other constraint, a separate application environment for automation may not be available. In such cases, the QA-environment is used for automation. But, it is always a best practice to create a separate test data for automation so as not to interfere with regular manual testing activities. This phase also involves the formation of the team, necessary trainings and making the required test wares available.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. Design the Automation framework:&lt;/span&gt; The automation framework is designed in this phase so as to carry on the automation script development, integration, execution and maintenance activities at ease.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. Design/development of test scripts:&lt;/span&gt; Automation scripts are created in this phase/&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7. Review and rework of test scripts:&lt;/span&gt; This is one of the most important phases, which is neglected by many. Each and every test script has to be reviewed with the help of an optimal checklist and by entering the review comments in a pre-defined review template. Once the review is completed, appropriate rework needs to be done implementing the review comments.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;8. Integration of test scripts:&lt;/span&gt; All the scripts created by the Automation team are integrated in order to be executed during the execution phase.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;9. Execution of test scripts:&lt;/span&gt; Test scripts are executed in this phase either by the Automation team or the manual testers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10. Analysis of test results:&lt;/span&gt; Test results are analysed after execution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;11. Enhancement of test scripts(Maintenance Phase): &lt;/span&gt;Some of the test scripts may need to be updated depending on the change in the functionality for a particular version/build/release of the application and sometimes test scripts may need to added if new functionality is included in the application. Again, review comes into picture, followed by rework and so on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2672076354240813318?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2672076354240813318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2672076354240813318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2672076354240813318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2672076354240813318'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/07/functional-test-automation-life-cycle.html' title='Functional Test Automation Life Cycle'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2057928600428007915</id><published>2010-06-30T23:39:00.005+05:30</published><updated>2011-08-21T21:42:56.527+05:30</updated><title type='text'>Software Automation Testing Benefits</title><content type='html'>Software Test Automation is the use of software to execute the tests. Test Automation involves automating manual execution of test cases for enhancing speed and reliability.&lt;br /&gt;&lt;br /&gt;Automation Testing is nothing but simulation of Manual Actions. Automation testing includes an additional activity of writing test scripts after Test case Development.&lt;br /&gt;&lt;br /&gt;1. &lt;span style="font-weight: bold;"&gt;Saves time during the test execution:&lt;/span&gt; The execution of an automation test case( test script) is faster compared to the manual execution of a test case.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Execution of tests in un-attended mode:&lt;/span&gt; Once the entire automation suite( the automated test cases of the manual test case suite) is ready for the execution, the automation suite can be executed in an un-attended mode( human attendance is not required for the entire execution), if the framework is designed in such a way. You can use the human brain for better innovative testing to improve the productivity of the overall testing process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Consistency of test execution:&lt;/span&gt; When you execute manual regression suite several times, it is a general human tendency that we get bored of executing the same test cases time and again and because of which we may miss to execute one or many steps which may finally lead to an undetected bug!!! But, if you execute the automation suite, may be for 1 time or 100 times, it executes with the same efficiency and effectiveness.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. Reducing cycle time of regression test cycles.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. Data Driven Testing:&lt;/span&gt; This feature helps to parameterize the data in the script. This helps to get rid of hard coding of the values required for the test. Also, this feature helps in the concept of Retesting i.e, re-execution of the test/functionality with multiple sets of input data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. Coverage:&lt;/span&gt; Test coverage can be increased with the help of Automation. In real-time, testers have very less time to test n number of features. This makes the testers limit their scope in testing the application/products by determining the priority of the feature/functionality to be tested. But, that limitation can be overcome to a great extent with the help of automation.&lt;br /&gt;&lt;br /&gt;With the above benefits of automation, automation has actually become a part of the entire life project life cycle and more importantly Automation life cycle has become an important subset of the entire Test life cycle. To reap good benefits from Test Automation to the entire project, you need to have good planning and coordination from the Development team, Manual Testing team and the Automation team.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2057928600428007915?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2057928600428007915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2057928600428007915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2057928600428007915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2057928600428007915'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/06/software-automation-testing-benefits.html' title='Software Automation Testing Benefits'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2706237373531575434</id><published>2010-06-30T21:44:00.003+05:30</published><updated>2011-08-21T22:27:36.333+05:30</updated><title type='text'>Pros &amp; Cons of Automation Testing</title><content type='html'>&lt;ul&gt;&lt;li&gt;If you have to run a set of tests repeatedly, Test Automation is a huge win for you.&lt;/li&gt;&lt;li&gt;It gives you the ability to run automation against code that frequently changes to catch regressions in a timely manner.&lt;/li&gt;&lt;li&gt;It gives you the ability to run automation in mainstream scenarios to catch regressions in a timely manner.&lt;/li&gt;&lt;li&gt;Aids in testing a large matrix(different languages on large OS platforms).&lt;/li&gt;&lt;li&gt;Automated tests can be run at the same time on different machines, whereas manual tests would have to be run sequentially.&lt;/li&gt;&lt;li&gt;Automation Testing takes more initial investment to design and develop Automation framework and automation test scripts.&lt;/li&gt;&lt;li&gt;Can't automate visual References. For example the look and feel of the application should be done manually.&lt;/li&gt;&lt;li&gt;What you automate depends on the tools you use. If the tools have any limitations, those tests are manual.&lt;/li&gt;&lt;li&gt;It may not be worth automating if the repetition of test case execution is minimal.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2706237373531575434?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2706237373531575434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2706237373531575434' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2706237373531575434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2706237373531575434'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/06/pros-cons-of-automation-testing.html' title='Pros &amp; Cons of Automation Testing'/><author><name>Shruti</name><uri>http://www.blogger.com/profile/17331632118209600610</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5074909038296857927</id><published>2010-06-21T21:04:00.003+05:30</published><updated>2010-06-30T23:35:30.733+05:30</updated><title type='text'>QTP checkpoints tutorial</title><content type='html'>&lt;p&gt;A &lt;b&gt;checkpoint&lt;/b&gt; enables you to identify whether the Web site or &lt;span id="IL_AD3" class="IL_AD"&gt;application&lt;/span&gt; under test is functioning correctly or  not by comparing a current value for a particular property with the expected  value for that property.&lt;/p&gt;&lt;p&gt;After we add a &lt;b&gt;checkpoint&lt;/b&gt;, QuickTest adds a checkpoint to the  current row in the Keyword View and adds a &lt;b&gt;Check CheckPoint&lt;/b&gt; statement in  the Expert View.&lt;/p&gt; &lt;p&gt;By default, the checkpoint name receives the name &lt;span id="IL_AD7" class="IL_AD"&gt;of the&lt;/span&gt; test object on which the checkpoint is being  performed. We can change the name of the checkpoint if&lt;br /&gt;needed.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Types of Checkpoints:&lt;/b&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;b&gt;Standard checkpoint&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Image checkpoints&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Bitmap Checkpoint&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Table checkpoints&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Accessibility Checkpoint&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Text Checkpoint&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Page Checkpoint&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;Database Checkpoint&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;b&gt;XML checkpoints&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;Standard checkpoints&lt;/b&gt; allow checking the object property values in the  Web site or application under test. &lt;b&gt;Standard checkpoints&lt;/b&gt; evaluate  (compare) the expected values of object &lt;span id="IL_AD6" class="IL_AD"&gt;properties&lt;/span&gt; captured during recording to the object's current  values during a run session. For example we can check that a radio button is  activated after it is selected. &lt;b&gt;Standard checkpoints&lt;/b&gt; are supported for  all add-in environments.&lt;/p&gt; &lt;p&gt;Standard checkpoints can be used to perform checks on&lt;/p&gt; &lt;p&gt;Images,&lt;br /&gt;Tables,&lt;br /&gt;Web page properties, and&lt;br /&gt;Other objects within your  application or Web site.&lt;/p&gt; &lt;p&gt;Standard checkpoints can be created for all supported &lt;span id="IL_AD5" class="IL_AD"&gt;testing&lt;/span&gt; environments (as long as the appropriate add-in(s)  are loaded).&lt;/p&gt; &lt;p&gt;&lt;b&gt;Image checkpoints&lt;/b&gt; allow you to check the properties of an image in the  application or Web page. &lt;span id="IL_AD4" class="IL_AD"&gt;For example&lt;/span&gt;, you can  check that a selected image's source file is correct or not. An image checkpoint  can also be created by inserting a standard checkpoint on an image object.  &lt;b&gt;Image checkpoints&lt;/b&gt; are supported for the Web add-in environment&lt;/p&gt; &lt;p&gt;With &lt;b&gt;Bitmap Checkpoint&lt;/b&gt; we can check an area of a Web page or  application as a bitmap. While creating a test, we have to specify the area to  check by selecting an object. An entire object or any area within an object can  be checked. &lt;b&gt;Bitmap checkpoints&lt;/b&gt; are supported for all add-in  environments&lt;/p&gt; &lt;p&gt;By adding table checkpoints to the test, we can check the content of tables  displayed in the application. For example, we can check that a specified value  is displayed in a certain cell. Certain environments also support checking the  properties of the table object. For example, a check that a table has the  expected number of rows and columns. A &lt;b&gt;table checkpoint&lt;/b&gt; can also be  created by inserting a standard checkpoint on a table object.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Accessibility Checkpoint&lt;/b&gt; recognizes areas of your Web site that may  not conform to the World Wide Web Consortium (W3C) Web Content Accessibility  Guidelines.For example, check if the images on a Web page &lt;span id="IL_AD1" class="IL_AD"&gt;include&lt;/span&gt; ALT properties, required by the W3C Web Content  Accessibility Guidelines. &lt;b&gt;Accessibility checkpoints&lt;/b&gt; are supported for the  Web add-in environment&lt;/p&gt;QuickTest can check that a text string is displayed in  the appropriate place in an application or on a Web page with Text Checkpoint.  &lt;b&gt;Text checkpoints&lt;/b&gt; are supported for the Web add-in environment, plus some  Web-based add-in environments  &lt;p&gt;&lt;b&gt;Page Checkpoint&lt;/b&gt; checks the features of a Web page. For example, you  can check how long a Web page takes to load or whether a Web page contains  broken links. A &lt;b&gt;page checkpoint&lt;/b&gt; can also be created by inserting a  standard checkpoint on page object. &lt;b&gt;Page checkpoints&lt;/b&gt; are supported for  the Web add-in environment&lt;/p&gt; &lt;p&gt;The contents of a database accessed by your application can be checked by  &lt;b&gt;Database Checkpoint&lt;/b&gt;. &lt;b&gt;Database checkpoints&lt;/b&gt; are supported for all  add-in environments&lt;/p&gt; &lt;p&gt;By adding &lt;b&gt;XML checkpoints&lt;/b&gt; to your test, you can check the contents of  individual XML data files or documents that are part of your Web application.  The &lt;b&gt;XML Checkpoint&lt;/b&gt; &lt;span id="IL_AD2" class="IL_AD"&gt;option&lt;/span&gt; is supported  for all add-in environments.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5074909038296857927?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5074909038296857927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5074909038296857927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5074909038296857927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5074909038296857927'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/06/checkpoints-qtp-quicktest-professional.html' title='QTP checkpoints tutorial'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5743287383115824783</id><published>2010-06-21T20:48:00.002+05:30</published><updated>2010-06-21T21:01:08.570+05:30</updated><title type='text'>HP QTP recording modes</title><content type='html'>&lt;p&gt;The default mode of recording is the &lt;b&gt;Normal recording mode&lt;/b&gt;. There are  other&lt;br /&gt;&lt;br /&gt;recording modes also like &lt;b&gt;Analog Recording&lt;/b&gt; or &lt;b&gt;Low Level  Recording&lt;/b&gt;. &lt;b&gt;Normal mode&lt;/b&gt; is the default and takes full advantage of the  QuickTest test object model, as it recognizes the objects in the application  regardless of their location on the screen.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Analog Recording&lt;/b&gt; : Exact mouse and keyboard operations are recorded in  relation to either the screen or the application window. In this QTP also  records and tracks every movement of the mouse for example, recording a  signature produced by dragging the mouse. &lt;b&gt;Analog Recording&lt;/b&gt; steps are not  editable from within QuickTest.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Low Level Recording&lt;/b&gt; : At any time, if an environment or on an object  not recognized by QuickTest, use &lt;b&gt;Low Level Recording&lt;/b&gt;. It records at  object level and records all run-time objects as Window or WinObject test  objects. QuickTest records all parent level objects as Window test objects and  all other objects as WinObject test objects.&lt;/p&gt; &lt;p&gt;Each step recorded in &lt;b&gt;Low Level Recording&lt;/b&gt; mode is shown in the Keyword  View and Expert View.&lt;/p&gt; &lt;p&gt;All the three modes of recording can be used in a single test e.g. we can  switch to either &lt;b&gt;Analog Recording&lt;/b&gt; or &lt;b&gt;Low Level Recording&lt;/b&gt; in the  middle of a recording session for specific steps and then return to &lt;b&gt;normal  recording&lt;br /&gt;mode&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;&lt;i&gt;&lt;b&gt;Analog Recording&lt;/b&gt; and &lt;b&gt;Low Level Recording&lt;/b&gt; require more disk  space than &lt;b&gt;normal recording mode&lt;/b&gt;.&lt;/i&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;Use &lt;b&gt;Analog Recording&lt;/b&gt; when :&lt;/b&gt;&lt;/p&gt; &lt;p&gt;The actual movement of the mouse is what you want to record.&lt;/p&gt; &lt;p&gt;Recording in Analog mode can be relative to the screen or relative to a  specific window (see user guide for detail)&lt;/p&gt; &lt;p&gt;In &lt;b&gt;Analog Recording&lt;/b&gt; a separate file is saved and stored with the  action.&lt;/p&gt; &lt;p&gt;In &lt;b&gt;Analog Recording&lt;/b&gt; mode, QuickTest adds to your test a RunAnalog  statement that calls the recorded analog file.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Use &lt;b&gt;Low Level Recording&lt;/b&gt; when :&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Environments or objects not supported by QuickTest.&lt;/p&gt; &lt;p&gt;Exact location of the operation on your application screen is necessary. in  normal mode QuickTest performs the step on an object even if it has moved to a  new location on the screen.&lt;/p&gt; &lt;p&gt;If the location of the object is important to your test, switch to &lt;b&gt;Low  Level Recording&lt;/b&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5743287383115824783?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5743287383115824783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5743287383115824783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5743287383115824783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5743287383115824783'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/06/qtp-analog-recording-tutorial.html' title='HP QTP recording modes'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5738200610715620163</id><published>2010-06-21T20:41:00.001+05:30</published><updated>2010-06-21T20:43:43.677+05:30</updated><title type='text'>Parameterizing Tests in QTP (QuickTest Professional)</title><content type='html'>&lt;p&gt;By replacing fixed values with &lt;b&gt;parameters&lt;/b&gt; QuickTest enables you to  enlarge the scope of a basic test. It is known as &lt;b&gt;parameterization&lt;/b&gt;,  greatly increases the power and flexibility of a test. A parameter is a variable  that is assigned a value from an external data source or generator. Values in  steps and checkpoints and also the values of action parameters can be  &lt;b&gt;parameterize&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Parameters&lt;/b&gt; let us check how the application performs the same  operations with multiple sets of data.&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;There are four types of &lt;b&gt;parameters in QTP&lt;/b&gt;:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;Test/action parameters&lt;/b&gt;: &lt;b&gt;Test parameters&lt;/b&gt; make possible for us to  use values passed from the test. Action parameters enable us to pass values from  other actions in your test. To use a value within a specific action, the value  must be passed down through the action hierarchy of the test to the required  action. We can then use that parameter value to parameterize a step in the test.  For example, suppose that we want to parameterize a step in Action3 using a  value that is passed into the test from the external application that runs  (calls) the test. We can pass the value from the test level to Action1  (atop-level action) to Action3 (a nested action of Action1), and then  parameterize the required step using this action input parameter value (that was  passed through from the external application). Alternatively, we can pass an  output action parameter value from an action step to a later sibling action at  the same hierarchical level. For example, suppose that Action2, Action3, and  Action4 are sibling actions at the same hierarchical level, and that these are  all nested actions of Action1. We can parameterize a call to Action4 based on an  output value retrieved from Action2 or Action3. We can then use these parameters  in the action step.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Data Table parameters&lt;/b&gt; allow us to create a data-driven test (or  action) that runs several times using the data that we supply. In each  repetition, or iteration, QuickTest uses a different value from the Data  Table.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Environment variable parameters&lt;/b&gt; allow us to use variable values from  other sources during the run session. These may be values that we supply, or  values that QuickTest generates for us based on conditions and options we  choose.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Random number parameters&lt;/b&gt; Enable us to insert random numbers as values  in your test.&lt;/p&gt; &lt;p&gt;Values in steps and checkpoints can be parameterized while recording or  editing the test.&lt;/p&gt; &lt;p&gt;The values of object properties can be parameterized for a selected step.&lt;/p&gt; &lt;p&gt;The values of the operation (method or function arguments) defined for the  step can also be parameterized.&lt;/p&gt; &lt;p&gt;When the value of an object property for a local object is parameterized, we  are amending the test object description in the local object repository.  Therefore, all occurrences of the specified object within the action are  parameterized.&lt;/p&gt; &lt;p&gt;Parameterizing the value of a checkpoint property enables us to check how an  application or Web site performs the same operation based on different data.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5738200610715620163?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5738200610715620163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5738200610715620163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5738200610715620163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5738200610715620163'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/06/parameterizing-tests-hp-qtp-quicktest.html' title='Parameterizing Tests in QTP (QuickTest Professional)'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-7414302055679800653</id><published>2010-06-21T20:36:00.002+05:30</published><updated>2010-06-21T20:39:35.236+05:30</updated><title type='text'>QTP 10 keyword view</title><content type='html'>&lt;p&gt;In &lt;b&gt;QTP&lt;/b&gt; &lt;b&gt;(QuickTest Professional)&lt;/b&gt; we first of all record a test,  then run a test and then analyze the results, but before running the test we can  also enhance it with checkpoints and parameters.&lt;/p&gt;&lt;p&gt;First of all let's talk a little about &lt;b&gt;keyword view&lt;/b&gt; in &lt;b&gt;QTP&lt;/b&gt; and  then we will talk about recording in &lt;b&gt;QTP&lt;/b&gt; and then we will move on to  other things.&lt;/p&gt; &lt;p&gt;After recording all the operations, QuickTest displays them as steps in the  &lt;b&gt;Keyword View&lt;/b&gt;, and generates them in a script (in an Expert View). &lt;/p&gt; &lt;p&gt;In the &lt;b&gt;keyword view&lt;/b&gt; there are 4 visible columns –&lt;/p&gt; &lt;p&gt;(For other valuable information on below points please see QTP user guide pg  92 and pg 114)&lt;/p&gt;&lt;b&gt;Item&lt;/b&gt; The item on which we want to perform the step and it can be a  test object, utility object, function call, or statement. This column shows a  hierarchical icon-based tree. The highest level of the tree is actions, and all  steps are contained within the relevant branch of the tree. &lt;p&gt;&lt;b&gt;Operation&lt;/b&gt; The operation (methods or functions) to be performed on the  item selected in the Item column, for example, Click or Select.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Value&lt;/b&gt; The argument values for the selected operation, for example, the  mouse button to use when clicking the image.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Documentation&lt;/b&gt; It is a Read-only auto-documentation of what the step  does in an easy-to-understand sentence, for example, Click the "findFlights"  image.&lt;/p&gt;&lt;b&gt;Assignment&lt;/b&gt; The assignment of a value to or from a variable for  example, Store in cCols would store the return value of the current step in a  variable called cCols so you can use the value later in the test. This column is  not visible by default. &lt;p&gt;&lt;b&gt;Comment&lt;/b&gt; Any textual information you want to add regarding the step.  This column is also not visible by default.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-7414302055679800653?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/7414302055679800653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=7414302055679800653' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7414302055679800653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7414302055679800653'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/06/qtp-quicktest-professional-keyword-view.html' title='QTP 10 keyword view'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-3938480532224126846</id><published>2010-06-21T20:31:00.002+05:30</published><updated>2010-06-21T20:34:40.551+05:30</updated><title type='text'>Actions in HP QTP software</title><content type='html'>&lt;p&gt;&lt;b&gt;Action&lt;/b&gt;s break up the test into logical sections/units such as specific  activities that we perform in our application.&lt;/p&gt; &lt;p&gt;When we create a new test, it contains a call to &lt;b&gt;one action&lt;/b&gt;. By  breaking up the tests into calls to &lt;b&gt;multiple actions&lt;/b&gt;, we can design more  modular and well organized and professional tests. An action has its own test  script, containing all of the steps recorded in that action, and all objects in  its local object repository. An action is stored with the test in which you  created it.&lt;/p&gt; &lt;p&gt;If you create a test in which you log into the system (email), check inbox,  and then log out of the system (email), your test might be structured as  shown—one test calling three separate actions:&lt;/p&gt;&lt;br /&gt;&lt;table width="100%" align="center"&gt; &lt;tbody&gt; &lt;tr align="middle"&gt; &lt;th&gt;&lt;b&gt;Test 1&lt;/b&gt;&lt;/th&gt; &lt;th&gt;&lt;br /&gt;&lt;/th&gt; &lt;th&gt;&lt;b&gt;Actions stored with Test 1&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;Call to action 1&lt;/td&gt; &lt;td align="middle"&gt;---&gt;&lt;/td&gt; &lt;td align="middle"&gt;Action 1(Logging In)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;Call to action 2 &lt;/td&gt; &lt;td align="middle"&gt;---&gt;&lt;/td&gt; &lt;td align="middle"&gt;Action 2(Checking Inbox Mails)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td align="middle"&gt;Call to action 3&lt;/td&gt; &lt;td align="middle"&gt;---&gt;&lt;/td&gt; &lt;td align="middle"&gt;Action 3(Logging Out)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&lt;b&gt;Actions&lt;/b&gt; make it possible to parameterize and iterate over specific  elements of a test. They also make it easier to re-record steps in one action  when part of your application changes. For every action called in the test,  QuickTest creates a corresponding action sheet in the Data Table so that we can  enter Data Table parameters that are specific to that action only.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Three types of actions are:&lt;/b&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Non-reusable action&lt;/u&gt;&lt;/b&gt; This &lt;b&gt;non reusable action&lt;/b&gt; can be  called only once and that too in the test with which it is stored.&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Reusable action&lt;/u&gt;&lt;/b&gt; &lt;b&gt;Reusable actions&lt;/b&gt; are like functions in  any programming language. If there is a process that needs to be included in  several tests, we can record, modify, and enhance the steps of the process and  save them in a reusable action. Then we can call the action from other tests,  rather than recording, modifying, and enhancing the same steps each time. It can  be called several times by the test with which it is stored (the local test), as  well as by other tests.&lt;/p&gt; &lt;p&gt;Deleting a reusable action that is called by other tests will cause those  tests to fail.&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;External action&lt;/u&gt;&lt;/b&gt; is a reusable action stored with another test.  &lt;b&gt;External actions&lt;/b&gt; are read-only in the calling test, but we can choose to  use a local, editable copy of the Data Table information for the external  action. When a call to an external action is inserted, the action is inserted in  read-only format&lt;/p&gt; &lt;p&gt;We can create an additional call to any reusable or external action in the  test by pressing CTRL while we drag and drop the action to another location at a  parallel (sibling) level&lt;br /&gt;within the test.&lt;/p&gt; &lt;p&gt;By default, new actions are non-reusable. Each action created in a test can  be marked as reusable or non-reusable.&lt;/p&gt; &lt;p&gt;When we run a test with multiple actions, the test results are divided by  actions within each test iteration so that we can see the outcome of each  action, and can view the detailed results for each action individually.&lt;/p&gt; &lt;p&gt;If you expect other users to open your tests and all actions in your tests  are stored in the same drive, you should use relative paths for your reusable  actions so that other users will be able to open your tests even if they have  mapped their network drives differently. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-3938480532224126846?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/3938480532224126846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=3938480532224126846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/3938480532224126846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/3938480532224126846'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/06/actions-in-qtp-9-quicktest-professional.html' title='Actions in HP QTP software'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-2518508355588838026</id><published>2010-03-13T09:29:00.004+05:30</published><updated>2010-03-13T09:40:25.088+05:30</updated><title type='text'>QTP Tutorial Database Checkpoint</title><content type='html'>&lt;span style="color: rgb(255, 255, 255); line-height: 19px;font-family:Arial;font-size:13;"  &gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;Lets try out our hands on Database checkpoint: using Oracle 9i&lt;/p&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;First of all you have to connect oracle 9i to QTP 9.(before doing any recording)&lt;/p&gt;&lt;ol&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;For this go to Insert -&gt; Checkpoint -&gt; Database Checkpoint.&lt;br /&gt;&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;A &lt;b&gt;Database Query Wizard&lt;/b&gt; opens.&lt;br /&gt;Select ' &lt;i&gt;Specify SQL statement manually&lt;/i&gt;' from the Query definition area. Click Next.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Here click on 'Create' button which is on the right of "Connection String:" It will open '&lt;b&gt;Select Data Source&lt;/b&gt;' window. Click on '&lt;b&gt;Machine Data Source&lt;/b&gt;' Tab&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Click on New Button.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;'&lt;b&gt;Create New Data Source&lt;/b&gt;' window opens.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Select '&lt;i&gt;User Data Source&lt;/i&gt;' from Select a type of data source. Click Next.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;It will show all the data source drives it could find.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Select Oracle (on my machine it was 'Oracle in OraHome9'). Click Next. Click Finish.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;It will open '&lt;b&gt;Oracle ODBC Driver Configuration&lt;/b&gt;' window.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Enter 'Data Source name' ( I entered "oracle")&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Enter 'description' (I entered "SQL")&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Select 'TNS Service Name' ( I selected 'DB02', my oracle database name) from combo box.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Enter userid (I used SCOTT).&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Click 'Test Connection' Button. It will ask for a Password. Enter your password for Oracle.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;If successful it will show '&lt;b&gt;Testing Connection&lt;/b&gt;' window with '&lt;i&gt;Connection Successful&lt;/i&gt;' written on it.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;This completes our task of Connecting QTP with Oracle.&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;Now we will record a test.&lt;/p&gt;&lt;ol&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Open a blank test.&lt;br /&gt;&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Click on Record. When we click on Record, "Record and Run Settings" window opens up. Go to "Windows Applications" tab and choose first option "Record and run test on any open Windows based application." and click on ok.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Go to Insert (menu)-&gt;Checkpoint-&gt;Database Checkpoint&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;A 'Database Query Wizard' opens.&lt;br /&gt;&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Select ' Specify SQL statement manually' from the Query definition area. Click Next. Click Create.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Go to 'Machine Data Source' Tab&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Select Oracle from data source name. Click Ok. It will open 'Oracle ODBC Driver Connect'.&lt;br /&gt;&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Enter password. Click ok&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;It will come to Database Query Wizard window with 'Connection String' field filled with: "DSN=oracle;UID=SCOTT;PWD=&lt;wbr&gt;TIGER;DBQ=DB02;DBA&lt;br /&gt;=W;APA=T;EXC=F;FEN=T;QTO=T;&lt;wbr&gt;FRC=10;FDL=10;&lt;br /&gt;LOB=T;RST=T;GDE=F;FRL=F;BAM=&lt;wbr&gt;IfAllSuccessful;MTS=F;&lt;br /&gt;MDI=F;CSR=F;FWC=F;PFC=10;TLO=&lt;wbr&gt;0;"&lt;br /&gt;&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;In the SQL Statement area type "select * from emp;". Click Finish.&lt;br /&gt;&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;It will open 'Database Checkpoint Properties' window with the result of the query. Click Ok.&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;Click Stop in order to stop the Recording.&lt;br /&gt;&lt;/li&gt;&lt;li style="margin: 0px; padding: 0px 0px 0.6em 17px; line-height: 1.5em; list-style-type: disc; list-style-position: inside; vertical-align: top;"&gt;In the Expert View, it just adds one line "DbTable("DbTable").Check CheckPoint "DbTable")"&lt;/li&gt;&lt;/ol&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;This is the simplest database checkpoint example.&lt;/p&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;Now run it.&lt;/p&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;Click on Run. ( we don't need to open any other window or application to run this as our Oracle is running at the back end as a service - default way in which it was installed- nothing special.)&lt;/p&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;When it is passed it will show following in the Result window:&lt;/p&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;Test Checkpoint-database Summary (where Checkpoint-database is the name with which I saved the test)&lt;/p&gt;&lt;blockquote style="margin: 0px 0px 0.6em; padding: 0px 32px; font-style: normal; line-height: 1.6;"&gt;Run-Time Data Table&lt;blockquote style="margin: 0px 0px 0.6em; padding: 0px 32px; font-style: normal; line-height: 1.6;"&gt;Checkpoint-database Iteration 1 (Row 1)&lt;blockquote style="margin: 0px 0px 0.6em; padding: 0px 32px; font-style: normal; line-height: 1.6;"&gt;Action1 Summary&lt;blockquote style="margin: 0px 0px 0.6em; padding: 0px 32px; font-style: normal; line-height: 1.6;"&gt;DbTable&lt;blockquote style="margin: 0px 0px 0.6em; padding: 0px 32px; font-style: normal; line-height: 1.6;"&gt;Checkpoint "DbTable"&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p style="margin: 0px 0px 0.6em; padding: 0px;"&gt;( when you click on this, in details it will show checked 112 cells (in your case number of cells may differ). It means if you go to the oracle and add or delete any row and run this test again it will fail.)&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-2518508355588838026?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/2518508355588838026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=2518508355588838026' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2518508355588838026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/2518508355588838026'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2010/03/qtp-tutorial-database-checkpoint.html' title='QTP Tutorial Database Checkpoint'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-8483884150986316486</id><published>2009-10-21T23:21:00.005+05:30</published><updated>2009-10-22T00:02:48.306+05:30</updated><title type='text'>QTP Tutorial: Moving mouse to a particular object</title><content type='html'>Sometimes its required to place your mouse cursor on an object in your application and then perform some operation like clicking that object or even right clicking. I have created a short QTP tutorial for moving your mouse cursor on any object in your application.&lt;br /&gt;&lt;br /&gt;I used Google webpage to create this small tutorial on HP Quicktest Professional. This script will hover over the mouse cursor inside the search box.(It will not click inside the search box, it will simply bring the mouse over the search box)&lt;br /&gt;&lt;br /&gt;The QTP Script goes here:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;x=Browser("micclass:=Browser").Page("micclass:=Page").WebEdit("name:=q").&lt;br /&gt;GetROProperty("abs_x")&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;y=Browser("micclass:=Browser").Page("micclass:=Page").WebEdit("name:=q").&lt;br /&gt;GetROProperty("abs_y")&lt;/span&gt;  &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Set obj=CreateObject("Mercury.DeviceReplay")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;obj.MouseMove x,y&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Please make sure to resize your QTP window and your application before running the above HP QTP script as shown below to see the effect:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_LFOEX-ZBxzg/St9L574cqEI/AAAAAAAAAeY/0o0uV8Lt-WI/s1600-h/QTP+Resize.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 278px;" src="http://1.bp.blogspot.com/_LFOEX-ZBxzg/St9L574cqEI/AAAAAAAAAeY/0o0uV8Lt-WI/s400/QTP+Resize.bmp" alt="" id="BLOGGER_PHOTO_ID_5395114337312221250" border="0" /&gt;&lt;/a&gt;As you have noticed, your mouse cursor has been shifted to the extreme left corner of the search box. To place it somewhere in the middle, modify the fourth line in the above script to:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;obj.MouseMove x+10,y+10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The output after modifying the QTP script would be as shown below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_LFOEX-ZBxzg/St9L6fmiHHI/AAAAAAAAAeg/eo__-PYwlDg/s1600-h/QTP+Resize1.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 179px;" src="http://1.bp.blogspot.com/_LFOEX-ZBxzg/St9L6fmiHHI/AAAAAAAAAeg/eo__-PYwlDg/s400/QTP+Resize1.bmp" alt="" id="BLOGGER_PHOTO_ID_5395114346900757618" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Explanation of the above QTP code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. "abs_x" and "abs_y" are the object's absolute x and y coordinate relative to the screen. Hence we are finding the extreme top-left coordinate of the search box using the first two lines.&lt;br /&gt;&lt;br /&gt;2. Mercury.DeviceReplay object is an undocumented feature in QTP which is usually used to simulate either keyboard inputs or mouse clicks or mouse movements. Also, to use "Mercury.DeviceReplay" object in HP Quicktest Professional, you need to make sure that your Application is currently the active window. So for the above code, we created an object reference for DeviceReplay object in QTP( here in our case, I used obj) and using that object reference, we used the MouseMove method to shift the mouse cursor to the desired location.&lt;br /&gt;&lt;br /&gt;Just like we used MouseMove to shift my mouse cursor over the search box, we can also simulate clicking on an object using MouseClick.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Syntax of MouseClick Method&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;object.MouseClick x,y, Button&lt;br /&gt;&lt;br /&gt;object: It should always be Mercury.DeviceReplay object&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;x&lt;/span&gt;: The object's absolute x coordinate relative to the screen&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;y&lt;/span&gt;: The object's absolute y coordinate relative to the screen&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Button&lt;/span&gt;: It can have 3 values&lt;br /&gt;1. For Left Mouse Click use 0&lt;br /&gt;2. For Middle Mouse Click use 1&lt;br /&gt;3. For Right Mouse Click use 2&lt;br /&gt;&lt;br /&gt;Hence, if we want to do a left mouse click inside Google search box, our QTP script would be:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;x=Browser("micclass:=Browser").Page("micclass:=Page").WebEdit("name:=q").&lt;br /&gt;GetROProperty("abs_x")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;y=Browser("micclass:=Browser").Page("micclass:=Page").WebEdit("name:=q").&lt;br /&gt;GetROProperty("abs_y")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Set obj=CreateObject("Mercury.DeviceReplay")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;obj.MouseClick x+10,y+10,0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And, if you want to do a right mouse click, replace the last line of above code with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;obj.MouseClick x+10,y+10,2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note: The above code will run successfully if you will resize your QTP window while the script is running so that the search box is not hidden by the QTP window while the script is running otherwise it may not work as desired.&lt;br /&gt;&lt;br /&gt;Do you have any questions related to this QTP Article? Feel free to ask me. Please post your queries in the comments section.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2009/10/qtp-script-checking-datatable-parameter.html"&gt;Click here to read how to check if a DataTable Parameter exists or not&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2009/10/qtp-script-checking-data-table-sheet.html"&gt;Click here to read how to check if a DataTable Sheet exists or not&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-15-regular-expression.html"&gt;Click here to read tutorial on Regular Expressions&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-8483884150986316486?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/8483884150986316486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=8483884150986316486' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/8483884150986316486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/8483884150986316486'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2009/10/hp-qtp-tutorial-mercury-devicereplay.html' title='QTP Tutorial: Moving mouse to a particular object'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_LFOEX-ZBxzg/St9L574cqEI/AAAAAAAAAeY/0o0uV8Lt-WI/s72-c/QTP+Resize.bmp' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5424861306084769096</id><published>2009-10-11T15:56:00.003+05:30</published><updated>2009-10-11T16:53:11.834+05:30</updated><title type='text'>QTP Script: Checking if Datatable Parameter exists</title><content type='html'>In my previous article of Checking if a &lt;a href="http://qtpgoodtutorials.blogspot.com/2009/10/qtp-script-checking-data-table-sheet.html"&gt;Data Table Sheet exists&lt;/a&gt;, I have shown a QTP script which checks if a sheet exists or not in your Datatable. Today, I am going to show you how to check if a parameter exists or not in your DataTable.&lt;br /&gt;&lt;br /&gt;The algorithm goes here:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step I&lt;/span&gt; : Use the On Error Resume Next statement to disable any error popups.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step II&lt;/span&gt; : Use the DataTable's GetSheet method to return the specified sheet. Then add the GetParameter method to seach for the parameter. The following syntax should be used:&lt;br /&gt;DataTable.GetSheet("Your Sheet").GetParameter(" Your Parameter")&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step III&lt;/span&gt; : Check for an error number using Err.Number. If case of no error, Err.Number should return 0.&lt;br /&gt;&lt;br /&gt;With the above algorithm, our QTP Script goes here:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'Disable Error Reporting in QTP&lt;/span&gt;&lt;br /&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'Check for the existence of "Global" sheet inside QTP. Then search for "HPQTP" parameter inside "Global" sheet&lt;/span&gt;&lt;br /&gt;DataTable.GetSheet("Global").GetParameter("HPQTP")&lt;br /&gt;&lt;br /&gt;If Err.&lt;span style="font-weight: bold;"&gt;Number&lt;/span&gt;&lt;&gt;0 Then&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Msgbox &lt;/span&gt;"The specified parameter does not exists"&lt;br /&gt;Else&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Msgbox &lt;/span&gt;"The specified parameter exists"&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'Enable Error Reporting in QTP&lt;/span&gt;&lt;br /&gt;On Error Goto 0&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2009/10/qtp-script-checking-data-table-sheet.html"&gt;Click here to see the script for Checking if Data table sheet exists&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5424861306084769096?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5424861306084769096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5424861306084769096' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5424861306084769096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5424861306084769096'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2009/10/qtp-script-checking-datatable-parameter.html' title='QTP Script: Checking if Datatable Parameter exists'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-8289361269989664334</id><published>2009-10-11T14:29:00.004+05:30</published><updated>2009-10-11T16:49:08.085+05:30</updated><title type='text'>QTP Script: Checking if Data table sheet exists</title><content type='html'>Is there any way to check if a DataTable sheet exists? Yes, offcourse. Open the DataTable and see manually. Now, is there any way to check through code if a DataTable sheet exists? Hmmmm.. Yes it is.&lt;br /&gt;&lt;br /&gt;I have created a small algorithm to check if a HP QTP DataTable sheet exists or not. The algorithm goes here:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step I&lt;/span&gt;   : Use the On Error Resume Next statement to disable any error popups.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step II&lt;/span&gt; : Use the DataTable's GetSheet method to return the specified sheet. The following syntax should be used:&lt;br /&gt;DataTable.GetSheet("Your Sheet")&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step III&lt;/span&gt; : Check for an error number using Err.Number. If case of no error, Err.Number should return 0.&lt;br /&gt;&lt;br /&gt;With the above algorithm, our QTP Script goes here:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'Disable Error Reporting in QTP&lt;/span&gt;&lt;br /&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'Check for the existence of a sheet inside QTP&lt;/span&gt;&lt;br /&gt;DataTable.&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;GetSheet&lt;/span&gt;("Global")&lt;br /&gt;&lt;br /&gt;If Err.&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Number&lt;/span&gt;&lt;&gt;0 Then&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Msgbox &lt;/span&gt;"The specified Sheet does not exists"&lt;br /&gt;Else&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Msgbox &lt;/span&gt;"The specified Sheet exists"&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'Enable Error Reporting in QTP&lt;/span&gt;&lt;br /&gt;On Error Goto 0&lt;br /&gt;&lt;br /&gt;&lt;a href="http://qtpgoodtutorials.blogspot.com/2009/10/qtp-script-checking-datatable-parameter.html"&gt;Click here to see the script for Checking if Data table Parameter exists&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-8289361269989664334?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/8289361269989664334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=8289361269989664334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/8289361269989664334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/8289361269989664334'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2009/10/qtp-script-checking-data-table-sheet.html' title='QTP Script: Checking if Data table sheet exists'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-109098881313022180</id><published>2008-10-27T13:34:00.005+05:30</published><updated>2008-10-27T14:00:10.873+05:30</updated><title type='text'>How to View Object Properties by using Object Spy</title><content type='html'>This short tutorial guides you to a method by which you can view the Object Properties &amp;amp; Methods with the help of Object Spy in QTP.&lt;br /&gt;&lt;br /&gt;We can view the Properties and Methods of any object in an open application with the help of Object Spy pointing hand mechanism. As we move the pointing hand over the objects in the application, ठिर details get displayed in the Object Spy.&lt;br /&gt;&lt;br /&gt;These details displayed in the Object Spy are the hierarchy tree of the test object, its properties and values, and the methods associated with the object. For methods, the syntax is also displayed.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;font-size:180%;" &gt;Steps to view test object properties or methods:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step-1:&lt;/span&gt; Open the application to the page containing the object on which we want to spy say google.com.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step-2:&lt;/span&gt; Choose Tools &gt; Object Spy or click the Object Spy toolbar button to open the Object Spy dialog box and display the Properties tab.&lt;br /&gt;&lt;br /&gt;Or click the Object Spy button from the Object Repository dialog box.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step-3:&lt;/span&gt; Select the details we want to view for the object.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Click Run-time Object Properties or Test Object Properties radio button.&lt;/li&gt;&lt;li&gt;To view the object’s available methods and syntax, click the Methods tab. Properties tab is displayed by default, enabling us to view the object’s properties and values.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Step-4: &lt;/span&gt;In the Object Spy dialog box, click the pointing hand which is displayed on top. QuickTest remains hidden. As we move the pointing hand over the test objects in our application, the test objects get highlighted, and we can view their test object properties or methods in the Object Spy dialog box. We can also view their parent objects in the object hierarchy tree area of the Object Spy dialog box.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step-5:&lt;/span&gt; Highlight or click the object whose properties or methods we want to view। The Object Spy displays the object hierarchy tree and the properties or methods of the object that is selected within the tree.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_LFOEX-ZBxzg/SQV63465yaI/AAAAAAAAAL8/_R1si29vdxE/s1600-h/Object+Spy.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 264px; height: 370px;" src="http://4.bp.blogspot.com/_LFOEX-ZBxzg/SQV63465yaI/AAAAAAAAAL8/_R1si29vdxE/s400/Object+Spy.bmp" alt="" id="BLOGGER_PHOTO_ID_5261746840243128738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step-6:&lt;/span&gt; Click the object whose associated methods we want to view. The Object Spy displays the object hierarchy tree and details for the selected object according to our selection.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step-7:&lt;/span&gt; To view the properties or methods of the test object, click the Test Object Properties radio button. To view the properties or methods of the run-time object, click the Run-time Object Properties radio button.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step-8:&lt;/span&gt; If we want to view properties, values, or methods for another object within the displayed tree, highlight or click the object in the tree and select the relevant options, as described in step 3 above.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step-9:&lt;/span&gt;  If we want to copy an object property or value, or a method’s syntax to the Clipboard, click the property, value, or method to highlight it. The value gets displayed in the selected property / value or method syntax box which is located above the Description box. Highlight the text in the box and use CTRL + C to copy the text to the Clipboard or right-click the highlighted text and choose Copy from the menu.&lt;br /&gt;&lt;br /&gt;Keywords: QTP, Quicktest Professional, QTP Object Spy, QTP Tutorials&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-109098881313022180?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/109098881313022180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=109098881313022180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/109098881313022180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/109098881313022180'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/10/how-to-view-object-properties-by-using.html' title='How to View Object Properties by using Object Spy'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_LFOEX-ZBxzg/SQV63465yaI/AAAAAAAAAL8/_R1si29vdxE/s72-c/Object+Spy.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-7254879180132596758</id><published>2008-06-15T02:41:00.003+05:30</published><updated>2008-06-18T16:43:32.314+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Recording'/><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><title type='text'>QTP Tutorial 1: Learning Recording</title><content type='html'>&lt;span style="color: rgb(0, 0, 153);font-size:180%;" &gt;&lt;span style="font-weight: bold;"&gt;For any suggestions or any topic you want to include in this blog or even discuss, please email me on expert.qtp@gmail.com&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Lets start recording with the mercury sample application &lt;b&gt;FLIGHT&lt;/b&gt;.&lt;/p&gt;  &lt;p&gt;We will begin with a simple test like the "Hello World" program with which we  start learning any programming language.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;1) First of all click on Record toolbar button ( or Automation menu --&gt; Record or press F3). when we click on Record, "Record and Run Settings" window opens up. Go to "Windows Applications" tab and choose first option "Record and run test on any open windows based application." and click on ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;2) Open Flight application (Start --&gt;All programs --&gt;QuickTest  Professional --&gt; Sample Applications --&gt; Flight)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;3) Type Agent name as "Shree" (You can enter any, but must be 4 characters or  more) and enter password as "mercury".&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;4) In the flight reservation window that opens up:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;a) In the Flight Schedule area, in Date of Flight enter tomorrow's date in mm/dd/yyyy format.( I used tabs to move to next fields)&lt;br /&gt;b)In Fly From enter  Denver&lt;br /&gt;c)In Fly To enter London&lt;br /&gt;d) Click on Flights button which is on the  right hand side of "Fly To".&lt;br /&gt;Let the default option be selected in the  Flights Table.&lt;br /&gt;e) Click ok&lt;br /&gt;f)In the name field enter your name. It will  fill rest of the required information by itself.&lt;br /&gt;g) Click on insert order and  after the order is inserted&lt;br /&gt;h) Click on File --&gt; exit.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;5) Now you have recorded your first script. You can click on the expert view tab to see the script which QTP has recorded for you automatically.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;6) Click on run from Automation Menu (or press F5) to open up run dialog box.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;7) Go to the "Results Location" tab, and below "write run results to", in "new run results folder" radio button- let it be the default option --C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\Test1\Res1(you can also change it)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;8) click on ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;This will run you earlier recorded test and show you the results.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;But we have to go a long way. This is just the beginning.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-7254879180132596758?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/7254879180132596758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=7254879180132596758' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7254879180132596758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7254879180132596758'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorial-1-learning-recording_14.html' title='QTP Tutorial 1: Learning Recording'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-1781736765968315734</id><published>2008-06-15T02:37:00.000+05:30</published><updated>2008-06-15T11:14:45.626+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DataTable'/><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><title type='text'>QTP Tutorials 2 - Using Data Table</title><content type='html'>&lt;p&gt;Lets use data table:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;There are two types of data tables Design  time and Run time:&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;Design time data table is what you see in the main QTP window and run time data table you can see only in the test results window. Design time data table is always created before running the test while run time data table is generated after execution of the test.&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;1) Open new test (Ctrl+N)&lt;/p&gt; &lt;p&gt;2) We will click on record toolbar button ( or Automation menu --&gt; record or press F3). when we click on record, "Record and Run Settings" window opens up. Go to "Windows Applications" tab and choose first option "Record and run test on any open windows based application." and click on ok.&lt;/p&gt; &lt;p&gt;3) Open Flight application (Start--&gt;All programs--&gt;QuickTest  Professional-&gt;Sample Applications--&gt;Flight)&lt;/p&gt; &lt;p&gt;4) Type Agent name as "Niyati" (you can enter any, but must be 4 characters or  more) and enter password as "mercury".&lt;/p&gt; &lt;p&gt;5) In the flight reservation window that opens up:&lt;/p&gt; &lt;p&gt;6) Click on File--&gt;exit. Click Stop to stop the recording.&lt;/p&gt; &lt;p&gt;7) In the keyword view you will see four headings- Item, Operation, Value, Documentation. Under Value click on Kumar and on the right hand side of Kumar you will see a small icon, just click on that (or press ctrl + F11), The "Value Configuration Options" dialog box opens. In that dialog box click on parameter radio button and select Data Table from there. In Name field enter any variable name (I entered 'username'). Let all other be the default options in this dialog box and click on ok.&lt;/p&gt; &lt;p&gt;8) QTP will add username column in the data table (bottom, left hand side)  with 'Niyati' as the first value.&lt;/p&gt; &lt;p&gt;9) Now enter more values in the username column, manually. I entered 'Varun'  and 'Tanya' in 2nd and 3rd column respectively.&lt;/p&gt; &lt;p&gt;10) Save the test. (File--&gt;Save).&lt;/p&gt; &lt;p&gt;11) Now run the test. (follow same steps as we did earlier).&lt;/p&gt; &lt;p&gt;12) If the test ran successfully, in the Results summary window on the left hand side you will see three iterations (because we added 3 variables in the 3 rows of a data table). Expand 1st iteration, it will show action summary for that iteration, expand the action summary, it will show Login, Expand the login. Click on the first option under it "Agent Name: SetText". On the right hand side it will show 1st variable name under details.&lt;/p&gt; &lt;p&gt;13) Similarly you can look for 2nd and 3rd.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-1781736765968315734?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/1781736765968315734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=1781736765968315734' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1781736765968315734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1781736765968315734'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-2-using-data-table_14.html' title='QTP Tutorials 2 - Using Data Table'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-6232367326924873754</id><published>2008-06-15T02:28:00.000+05:30</published><updated>2008-06-15T11:15:03.931+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DataTable'/><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><title type='text'>QTP Tutorials 3 - Accessing Data Table values through Script</title><content type='html'>&lt;a href="http://qtp.blogspot.com/2007/07/qtp-tutorials.html"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/a&gt; &lt;div class="post-body"&gt;&lt;div align="justify"&gt; &lt;p&gt;What if we want to write a short script that accesses values from the data  Table.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;1) Make sure that QTP (with a new blank test) and a blank notepad is  open.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;2) In the Data Table below write a, b, c in the first column A.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;3) Click on Record. When we click on Record, "Record and Run Settings" window  opens up. Go to "Windows Applications" tab and choose first option "Record and  run test on any open windows based application." and click on ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;4) Just highlight the notepad and write 'a' on it.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;5) Click on Stop so as to stop recording.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;6) In the expert view your script will look like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Window("Notepad").WinEditor("Edit").SetCaretPos 0,0&lt;/p&gt; &lt;p&gt;Window("Notepad").WinEditor("Edit").Type "a"&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;7) We have to make it look like this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;rc = DataTable.Value("A", dtGlobalSheet)&lt;/p&gt; &lt;p&gt;msgbox rc&lt;/p&gt; &lt;p&gt;Window("Notepad").WinEditor("Edit").SetCaretPos 0,0&lt;/p&gt; &lt;p&gt;Window("Notepad").WinEditor("Edit").Type rc&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;8) Save the Test.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;9) Run the Test again with a blank Notepad open. It will enter all the three  values from Data Table into the Notepad.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-6232367326924873754?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/6232367326924873754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=6232367326924873754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6232367326924873754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6232367326924873754'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-3-accessing-data-table.html' title='QTP Tutorials 3 - Accessing Data Table values through Script'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-8665912918377651273</id><published>2008-06-15T02:24:00.000+05:30</published><updated>2008-06-15T11:15:27.524+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Checkpoint'/><title type='text'>QTP Tutorials 4 - Standard Checkpoint</title><content type='html'>&lt;div class="post-body"&gt;   &lt;div align="justify"&gt; &lt;p&gt;Checkpoints cannot be added manually, they are inserted using QTP's  interface. Results of the checkpoint can be viewed in the Test Results  Window.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Checkpoint information is stored in the Local Object Repository. It is in the  Resource.mtr file which is in the action folder (if you created checkpoint in  action1 then it will be action 1 folder under the folder in which you are saving  the test/script, if you created checkpoint in action 2 then it will be action 2  folder and so on) .&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In the expert view, on any blank line type Checkpoint and put "(". As soon as  you put the starting bracket it will show all the checkpoints you have used in  the test.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Now we will start with checkpoints. I will try to show easy to understand  example of each and every checkpoint.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Lets start with simple example of standard checkpoint which checks a variety  of objects such as buttons, radio buttons, combo boxes etc. Standard checkpoints  are supported for all add-in environments&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Open a blank test. &lt;/li&gt;&lt;li&gt;Make sure that Flight application is open.&lt;br /&gt;(Now only QTP with blank test  and Flight application should be open). &lt;/li&gt;&lt;li&gt;Click on Record. When we click on Record, "Record and Run Settings" window  opens up. Go to "Windows Applications" tab and choose first option "Record and  run test on any open Windows based application." and click ok. &lt;/li&gt;&lt;li&gt;Go to Insert (menu)-&gt;Checkpoint-&gt;Standard Checkpoint (or press  F12).The mouse pointer will become hand and QTP will be minimized.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Click on the "Flights..." button which is on the Right Hand Side of the "Fly  To" combo box in the Flight application.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It will open "Object Selection - Checkpoint Properties" window (with  WinButton:FLIGHT highlighted). Click ok. &lt;/li&gt;&lt;li&gt;It will open checkpoint properties window. (only one property will be  checked in it i.e. 'enabled' with a value of False.) &lt;/li&gt;&lt;li&gt;Click ok. Click on Stop in order to stop the Recording.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Save the test.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;This is a small test in which we have used standard checkpoint and captured  the disabled button on the Flight application. Now we can run the test in two  ways to see how it fails and passes the results of the checkpoint.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;To see a pass test result:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Make sure that this test and Flight application is open. Click on  run.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It will Run the test and show you the result as pass.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;strong&gt;To see a Fail test  result:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;br /&gt;Make sure that this test and  Flight application is open.&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;br /&gt;In the Flight application  enter the Date of Flight, Fly From and Fly To fields and nothing else. (The  reason for doing this is that it will enable the 'Flight...'  button)&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;br /&gt;Click on run in order to run the test.&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;br /&gt;It will Run the  test and show you the result as Fail. This is because QTP was looking for a  disabled 'Flight...' button for which it recorded the information at the record  time, but now since the button was enabled at run time, so it failed.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This will help you in understanding the standard checkpoint in QTP more  deeply.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-8665912918377651273?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/8665912918377651273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=8665912918377651273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/8665912918377651273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/8665912918377651273'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-4-standard-checkpoint.html' title='QTP Tutorials 4 - Standard Checkpoint'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-1500087451811356932</id><published>2008-06-15T02:21:00.000+05:30</published><updated>2008-06-15T11:15:50.267+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Checkpoint'/><title type='text'>QTP Tutorials 5 - Page Checkpoint</title><content type='html'>&lt;div class="post-body"&gt;   &lt;div align="justify"&gt; &lt;p&gt;Page checkpoint:It is for web applications only.Common things to check with  this are load time, broken links etc.&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Open a blank test. &lt;/li&gt;&lt;li&gt;Make sure that&lt;a href="http://www.google.co.in/"&gt;http://www.google.co.in/&lt;/a&gt; is open.(Now only  QTP with blank test and www.google.co.in should be open.) &lt;/li&gt;&lt;li&gt;Click on Record. When we click on Record, "Record and Run Settings" window  opens up. Go to "Web" tab and choose first option "Record and run test on any  open browser." and click ok. &lt;/li&gt;&lt;li&gt;Go to Insert (menu)-&gt;Checkpoint-&gt;Standard Checkpoint (or press F12). &lt;/li&gt;&lt;li&gt;The mouse pointer will become hand and QTP will be minimized. &lt;/li&gt;&lt;li&gt;Click anywhere on the white space on the Google.co.in page. &lt;/li&gt;&lt;li&gt;It will Open "Object Selection - Checkpoint Properties" window. Click on  'Page : Google' option which has a page icon on left of it with right corner of  the page slightly folded. &lt;/li&gt;&lt;li&gt;Click ok. &lt;/li&gt;&lt;li&gt;A 'Page Checkpoint Properties' window opens up. Let all the options be  default. Click ok. &lt;/li&gt;&lt;li&gt;Click on Stop in order to stop the Recording.&lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;In the Expert view it will add  just one line:&lt;/p&gt;&lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;Browser("Google").Page("Google").Check  CheckPoint("Google")&lt;/p&gt;&lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;We will explore this line later  on.&lt;/p&gt;&lt;p style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;I ran this test by opening www.google.co.in in offline mode (not on  internet). It recorded the following properties:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;table style="border-collapse: collapse;" border="0" bordercolor="#111111" cellpadding="0" cellspacing="0" width="50%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td width="50%"&gt;&lt;b&gt;Property Name&lt;/b&gt;&lt;/td&gt; &lt;td width="50%"&gt;&lt;b&gt;Property Value &lt;/b&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td width="50%"&gt;load time&lt;/td&gt; &lt;td width="50%"&gt;"0"&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td width="50%"&gt;number of images&lt;/td&gt; &lt;td width="50%"&gt;"2"&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td width="50%"&gt;number of links&lt;/td&gt; &lt;td width="50%"&gt;"20"&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Here it shows the load time as 0 because I did not open Google at the time of  running the test, it was already open.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;When you run it, in the results window, on left hand side, it will show (when  every option is expanded):&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Test Checkpoint-page Summary (where Checkpoint-page is the name with which I  saved the test&lt;/p&gt; &lt;blockquote&gt;Run-Time Data Table  &lt;blockquote&gt;Checkpoint-page Iteration 1 (Row 1)  &lt;blockquote&gt;Action1 Summary  &lt;blockquote&gt;Google (This will be the browser)  &lt;blockquote&gt;Google (This will be the Page) &lt;blockquote&gt;Checkpoint  "Google"&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If you run this test on www.google.com it may fail.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-1500087451811356932?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/1500087451811356932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=1500087451811356932' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1500087451811356932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1500087451811356932'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-5-page-checkpoint.html' title='QTP Tutorials 5 - Page Checkpoint'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-743011780594052123</id><published>2008-06-15T02:16:00.000+05:30</published><updated>2008-06-15T11:16:17.814+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Checkpoint'/><title type='text'>QTP Tutorials 6 - Bitmap Checkpoint</title><content type='html'>&lt;div class="post-body"&gt;   &lt;div align="justify"&gt; &lt;p&gt;Now we will look at the bitmap checkpoint which is different from the image  checkpoint.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Make sure that QTP and the &lt;b&gt;Flight&lt;/b&gt; application are open.&lt;/p&gt; &lt;p&gt;&lt;b&gt;STYLE A&lt;/b&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Open a blank test.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Click on Record. When we click on Record, "Record and Run Settings"  window&lt;br /&gt;opens up. Go to "Windows Applications" tab and choose first option  "Record and&lt;br /&gt;run test on any open windows based application." and click  Ok.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Go to &lt;b&gt;Insert (menu)-&gt;Checkpoint-&gt;Bitmap Checkpoint&lt;/b&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Click on the "Fly To" combo box. &lt;/li&gt;&lt;li&gt;"Object Selection- Bitmap Checkpoint Properties" window opens up. I will  have "WinComboBox:Fly To" highlighted. Click ok &lt;/li&gt;&lt;li&gt;It will open "Bitmap Checkpoint Properties" window.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Change the "Checkpoint timeout" at the bottom of the window to 0 seconds, so  that we will have no wait time while running the test. &lt;/li&gt;&lt;li&gt;Click ok. &lt;/li&gt;&lt;li&gt;Click stop to stop recording the test.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;b&gt;STYLE B&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Above, after 3rd point, instead of clicking on the "Fly To" combo box, click  somewhere in the empty space above the "Fly From" Combo box but below the line,  i.e. in the "Flight Schedule" area.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;"Object Selection- Bitmap Checkpoint Properties" window opens up. It will  have "WinObject:Flight Schedule" highlighted. Click ok&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;It will open "Bitmap Checkpoint Properties" winodow. This time it will have  "Flight schedule" area instead of just the "Fly To" combo box.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Now click on the "Select Area..." button. Mouse pointer will change so that  you can select any area by dragging. Just select "Fly From" combo box by  dragging.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Change the "Checkpoint timeout" at the bottom of the window to 0 seconds. so  that we will have no wait time while running the test.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click stop to stop recording the test.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Now you can run the test it will pass. To see how it stores the results, just  fail the test. If you have recorded in the style A then just select any value in  the "Fly To" combo box and then run the test. In the result window on the left  hand side when you click on Checkpoint "Fly To:", it will show you the expected  bitmap and actual bitmap on the right hand side. (note: it will show that only  in case of Failed result&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-743011780594052123?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/743011780594052123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=743011780594052123' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/743011780594052123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/743011780594052123'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-7-bitmap-checkpoint.html' title='QTP Tutorials 6 - Bitmap Checkpoint'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5362689683366786016</id><published>2008-06-15T01:47:00.000+05:30</published><updated>2008-06-15T11:16:49.818+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Checkpoint'/><title type='text'>QTP Tutorials 7 - Image Checkpoint</title><content type='html'>&lt;div class="post-body"&gt;   &lt;div align="justify"&gt; &lt;p&gt;Lets see the Image checkpoint. &lt;/p&gt; &lt;p&gt;Open a blank test.&lt;/p&gt; &lt;p&gt;On your system under &lt;b&gt;My Documents,&lt;/b&gt; there will be a folder named &lt;b&gt;My  Pictures,&lt;/b&gt; under this you will will find a folder- &lt;b&gt;Sample Pictures&lt;/b&gt;(  containing 4 pictures - Blue Hills, Sunset, Winter, Water lilies)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;We will run this test with one of the image there- Sunset.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Go to &lt;b&gt;My Documents&lt;/b&gt;-&gt;&lt;b&gt;My Pictures&lt;/b&gt;-&gt; &lt;b&gt;Sample Pictures&lt;/b&gt;  and right click on image&lt;br /&gt;named 'Sunset' and open it with internet  explorer.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Now only a new blank test and internet explorer with this image should be  open.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click on Record. When we click on Record, "Record and Run Settings" window  opens up. Go to "Web" tab and choose first option "Record and run test on any  open browser." and click on Ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Go to &lt;b&gt;Insert (menu)&lt;/b&gt;-&gt;&lt;b&gt;Checkpoint&lt;/b&gt;-&gt;&lt;b&gt;Standard  Checkpoint&lt;/b&gt;(or press F12).The mouse pointer will become hand and QTP will be  minimized.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click on the image which is opened in the explorer.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;It will open 'Object Selection Checkpoint Properties' window with Image:  Sunset highlighted. Click Ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;It will Open 'Image Checkpoint Properties' Window. In this window just  uncheck all the property values like href, html tag etc and only check last  property which is &lt;b&gt;src.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt; &lt;p&gt;Rest every thing will be default. Click OK.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click stop to stop recording the test.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In the expert view it will just add one line  Browser("file:///C:/Documents%20and%20S").Page("file:///C:/Documents%20and%20S").Image("Sunset").Check  CheckPoint("Sunset")&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;If you run it with that image open in internet explorer it will pass. This  test is not intelligent enough. It is just checking that the image in the  explorer is in the same location in which it was when the test was recorded and  its name is Sunset. If you change the name of some other picture in that folder  to Sunset and run the test with that it will also pass.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In this way you can test for some or all the properties of the image which it  showed in the 'Image Checkpoint Properties' Window.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5362689683366786016?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5362689683366786016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5362689683366786016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5362689683366786016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5362689683366786016'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-8-image-checkpoint.html' title='QTP Tutorials 7 - Image Checkpoint'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-837103655378598907</id><published>2008-06-15T01:37:00.000+05:30</published><updated>2008-06-15T11:17:11.483+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Checkpoint'/><title type='text'>QTP Tutorials 8 - Text Checkpoint</title><content type='html'>&lt;p&gt;Now we will look at the Text Checkpoint:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Open a blank test and a web page in offline mode like this below:&lt;/p&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_LFOEX-ZBxzg/SFQmEnBnRTI/AAAAAAAAAEE/g2d57ROelp0/s1600-h/PageCheckpoint.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_LFOEX-ZBxzg/SFQmEnBnRTI/AAAAAAAAAEE/g2d57ROelp0/s320/PageCheckpoint.jpg" alt="" id="BLOGGER_PHOTO_ID_5211832529411589426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Click on Record. When we click on Record, "Record and Run Settings" window  opens up. Go to "Web" tab and choose first option "Record and run test on any  open browser." and click on ok.&lt;/li&gt;&lt;li&gt;Go to &lt;b&gt;Insert (menu)-&gt;Checkpoint-&gt;Text Checkpoint.&lt;/b&gt;The mouse  pointer will become hand and QTP will be minimized.Click on the first paragraph  (which starts with-&lt;i&gt;The page you are looking&lt;/i&gt;..) of that web page.&lt;/li&gt;&lt;li&gt;"Text Checkpoint Properties" window opens up. It will show the text to be  checked in "Checkpoint Summary" area in red color and also show in blue color  the text which is displayed before and after the selected text. &lt;/li&gt;&lt;li&gt;Click on Configure -here you can change your selected text, change before  and after text and so on, but for now just click ok. At the bottom of the "Text  Checkpoint Properties" window change 'Checkpoint timeout' to 0 seconds. Again  Click ok to come out of "Text Checkpoint Properties" window. &lt;/li&gt;&lt;li&gt;Click on stop in order to stop recording.&lt;/li&gt;&lt;/ol&gt;   &lt;p&gt;Run the test and when it is passed just go to the results window and on the  left hand side just expand every option and click on last option &lt;b&gt;Checkpoint  "Cannot find server"&lt;/b&gt;. On the right hand side it will show you the details.  Try to understand those.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-837103655378598907?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/837103655378598907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=837103655378598907' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/837103655378598907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/837103655378598907'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-9-text-checkpoint.html' title='QTP Tutorials 8 - Text Checkpoint'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_LFOEX-ZBxzg/SFQmEnBnRTI/AAAAAAAAAEE/g2d57ROelp0/s72-c/PageCheckpoint.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-7942866663853602734</id><published>2008-06-15T01:30:00.000+05:30</published><updated>2008-06-15T11:17:29.075+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Checkpoint'/><title type='text'>QTP Tutorials 9 - Table Checkpoint</title><content type='html'>&lt;h3 class="post-title"&gt;&lt;br /&gt;&lt;/h3&gt; &lt;div class="post-body"&gt;   &lt;div align="justify"&gt; &lt;p&gt;In this tutorial we will look at a table Checkpoint just to get familiar with  it.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Open a blank test and also open a website http://www.editorial.co.in/software/software-testing-life-cycle.php" in offline mode&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;This website has a table at the bottom of the page.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click on Record. When we click on Record, "Record and Run Settings" window  opens up. Go to "Web" tab and choose first option "Record and run test on any  open browser." and click on ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Go to &lt;b&gt;Insert (menu)-&gt;Checkpoint-&gt;Standard Checkpoint &lt;/b&gt;(or press  F12).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;The mouse pointer will become hand and QTP will be minimized.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click somewhere inside the table.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;"Object Selection - Checkpoint properties" window opens.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Select "WebTable: Software Testing Life Cycle" which has a table icon on its  left, where "Software Testing Life Cycle" is the name of the table.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;'Table Checkpoint properties' window opens. It will show all the rows and  columns of the selected table. This time we will not do any extra setting. Just  change the Checkpoint timeout at the bottom of this window to 0 seconds and  click ok .&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click stop in order to stop recording.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Run the test and analyze the results in the result window, mainly the  checkpoint results to see how QTP verifies the result. We will manipulate test  results in later tutorials.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-7942866663853602734?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/7942866663853602734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=7942866663853602734' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7942866663853602734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/7942866663853602734'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-10-table-checkpoint.html' title='QTP Tutorials 9 - Table Checkpoint'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-1007245722924836588</id><published>2008-06-15T01:25:00.000+05:30</published><updated>2008-06-15T11:18:00.841+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><category scheme='http://www.blogger.com/atom/ns#' term='Checkpoint'/><title type='text'>QTP Tutorials 10 - Checkpoint Return Value</title><content type='html'>&lt;div class="post-body"&gt;   &lt;div align="justify"&gt; &lt;p&gt;We will use the Standard Checkpoint which we did in tutorial 4.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Open that test that contains the standard Checkpoint.&lt;br /&gt;In the expert view  of the test you will see only one line i.e.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Window("Flight Reservation").WinButton("FLIGHT").Check  CheckPoint("FLIGHT")&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Now we will make some changes in this one line so that it can return some  value.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="color: rgb(0, 0, 102);"&gt;&lt;i&gt;NOTE: Checkpoint always returns a value, it depends on us whether we  capture it or not.&lt;/i&gt;&lt;/p&gt;&lt;p style="color: rgb(0, 0, 102);"&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;Lets now capture it.&lt;br /&gt;Declare a variable and catch the return value in that  variable:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Dim return&lt;br /&gt;return = Window("Flight Reservation").WinButton("FLIGHT").Check  CheckPoint("FLIGHT")&lt;br /&gt;msgbox (return)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;One thing more we need to do here is that we have to enclose &lt;b&gt;Checkpoint  ("FLIGHT")&lt;/b&gt; in brackets. So the final version looks like this:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Dim return&lt;br /&gt;return = Window("Flight Reservation").WinButton("FLIGHT").Check  (CheckPoint("FLIGHT"))&lt;br /&gt;&lt;br /&gt;msgbox (return)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;It can return either true or false i.e. a boolean value. If it passes, it will return true else it will return false&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-1007245722924836588?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/1007245722924836588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=1007245722924836588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1007245722924836588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/1007245722924836588'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-12-checkpoint-return.html' title='QTP Tutorials 10 - Checkpoint Return Value'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-6865452553542750525</id><published>2008-06-15T01:23:00.000+05:30</published><updated>2008-06-15T11:18:41.373+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP Actions'/><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>QTP Tutorials 11 - Actions</title><content type='html'>&lt;div class="post-body"&gt;   &lt;div align="justify"&gt; &lt;p&gt;In this tutorial we will see how to use more than one action in a test and  how to call one action from another with in the same test.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Open a blank test. By default it will have Action1 in it (make sure you are  in the keyboard view).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Make sure that Action1 is selected/highlighted and click on the Expert View  tab.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In the Expert View type:&lt;br /&gt;msgbox ("my action 1")&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Again when you go to keyword View and expand Action1 it will show you  function call under it.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In that keyword View itself go to Insert (Menu) -&gt;Call to New Action.  'Insert Call to New Action' Dialog box opens with Action2 as a default name of a  new action. By default it will be added at the end of the test as this radio  button is selected in the location area.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;It will add Action2 to your test.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Make sure that Action2 is selected and click on the Expert View tab.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In the Expert View type:&lt;br /&gt;msgbox ("my action 2")&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Similarly insert a third Action.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;After third action is added, select Action1(keyword view), right click on it  and choose 'Action Properties'.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In the Action properties window that opens, check the 'Reusable action'  checkbox at the bottom.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Click ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Now again highlight Action3 right click on it and choose 'Insert Call to  Existing action'.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;'Select action' dialog box appears. In this dialog box in the 'action'  dropdown box it will have Action1 by default since we made only that action as  reusable.&lt;/p&gt;&lt;p&gt;Just click ok.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In the keyword View where you can see all the three actions, make sure  against Action3 it shows "Call to Action1 action" under Documentation.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Run the test. Three message boxes appear in succession showing 'my action 1',  'my action 2', and again 'my action 1'.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-6865452553542750525?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/6865452553542750525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=6865452553542750525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6865452553542750525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/6865452553542750525'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-12-actions.html' title='QTP Tutorials 11 - Actions'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-3660721666318148555</id><published>2008-06-15T01:08:00.000+05:30</published><updated>2008-06-15T11:19:07.379+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>QTP Tutorials 12 - Script to create file</title><content type='html'>&lt;div class="post-body"&gt;   &lt;div align="justify"&gt; &lt;p&gt;Now lets do some kind of processing with file system e.g. working with text,  excel, word etc files from within the QTP.&lt;/p&gt; &lt;p&gt;For this tutorial you need to know VBScript FSO (File System Object).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;The main purpose of the FSO is to access the file system of the computer.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align="justify"&gt;File System Object model is:&lt;/p&gt;&lt;p align="justify"&gt;&lt;br /&gt;&lt;/p&gt; &lt;div align="justify"&gt;Drive&lt;br /&gt;|&lt;br /&gt;Folder&lt;br /&gt;        |&lt;br /&gt;         File&lt;br /&gt;            |&lt;br /&gt;          Textstream&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;  &lt;div align="justify"&gt;or some people make it like this:&lt;br /&gt;&lt;br /&gt;Drive&lt;br /&gt;             |&lt;br /&gt;             Folder&lt;br /&gt;                                      |&lt;br /&gt;                                      Folders&lt;br /&gt;                                                               |&lt;br /&gt;                                                                File&lt;br /&gt;                                                                               |&lt;br /&gt;                                                                                     Files&lt;br /&gt;                                                                                                         |&lt;br /&gt;                                                                                                         Textstream&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;p align="justify"&gt;These above objects have methods and properties. With these  above objects you can obtain and work with the information about drives,  folders, files etc like creating a new file, opening a file, writing into a file  and much more.&lt;/p&gt;&lt;p align="justify"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align="justify"&gt;Here we will see a very simple example how to create a text  file from within QTP.&lt;/p&gt;&lt;p align="justify"&gt;&lt;br /&gt;&lt;/p&gt; &lt;div align="justify"&gt;Dim fso, new_file&lt;br /&gt;Set fso =  createobject("scripting.filesystemobject") &lt;span style="color: rgb(102, 102, 102);"&gt;// &lt;/span&gt;&lt;span style="color: rgb(102, 255, 153);"&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;an instance of filesystemobject is being created  here. After an instance (fso) is created then we can use the methods (like  createtextfile, CreateFolder etc) with that objects instance.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Set  new_file = fso.createtextfile("c:\testfile.txt", True) &lt;span style="color: rgb(102, 102, 102);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(102, 255, 153);"&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;createtextfile is a&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;method to create a file  and after creating a file it returns a TextStream object&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102);"&gt;that can be used to  read from or write to the file.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;new_file.writeline("hello  world!")&lt;br /&gt;new_file.close&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;   &lt;p align="justify"&gt;Just write the above text in the expert view of a new blank  test and run it. A new text file (testfile.txt) will be created with "hello  world!" written in it.&lt;/p&gt;&lt;p align="justify"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align="justify"&gt;Try to change the extention of testfile.txt to testfile.doc and  see what happens.&lt;/p&gt;&lt;p align="justify"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p align="justify"&gt;Much more to come, keep on reading guyz!!!&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-3660721666318148555?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/3660721666318148555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=3660721666318148555' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/3660721666318148555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/3660721666318148555'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-14-script-to-create-file.html' title='QTP Tutorials 12 - Script to create file'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5528709051591542403.post-5619722760699310470</id><published>2008-06-15T00:34:00.000+05:30</published><updated>2008-06-15T11:19:31.169+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='QTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Automated testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Certification'/><title type='text'>QTP Tutorials 13 - Regular Expression</title><content type='html'>&lt;div class="post-body"&gt;   &lt;div&gt; &lt;p&gt;Objects and text strings with varying (changeable) values or we can say dynamic values can be identified  by QuickTest using Regular expressions.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Regular expressions can be used:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;To define property values of an object.&lt;/li&gt;&lt;li&gt;To parameterize a step.&lt;/li&gt;&lt;li&gt;To create a checkpoint with changeable values.&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;blockquote&gt; &lt;/blockquote&gt; &lt;p style="font-weight: bold;"&gt;Important points regarding Regular expressions:&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;You can use regular expressions only for values of type string.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;When any special character in a regular expression is preceded by a backslash  (\), QuickTest searches for the literal character.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;You can define a regular expression for a constant value, a Data Table  parameter value, an Environment parameter value, or a property value in a  programmatic description.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;For more common options to create Regular Expressions, see QTP User  Guide.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Instead of writing more about QTP regular expressions, lets quickly jump to  examples.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Below you will find examples.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;h3 class="post-title"&gt;QTP Regular Expression Example 1&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="post-body"&gt;   &lt;div align="left"&gt; &lt;p&gt;[This is just an example using Yahoo mail inbox. Your inbox unread mails may  differ from the one shown in this example]&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;        &lt;p&gt;1. Launch QTP and open a new test.&lt;br /&gt;2. Open Internet Explorer.&lt;br /&gt;[Now we have QTP with a blank test and Google  open.]&lt;br /&gt;3. Click on Record in order to start recording.&lt;br /&gt;4. Copy and paste this URL &lt;a href="https://login.yahoo.com/config/login_verify2?&amp;amp;.src=ym"&gt;(http://mail.yahoo.com)&lt;/a&gt;  in the browser's address bar to open Yahoo mail login.&lt;br /&gt;5. Type your user name and password to login to Yahoo mail.&lt;br /&gt;6. When Yahoo mail is open, click on the Inbox link as shown in the  screenshot below.[ Note: The Inbox can contain any number of mails. At any given point of time, Inbox(5) means 5 unread mails]&lt;br /&gt;7. Click on Stop in order to stop recording. Then my recorded code looks like  this:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="color: rgb(0, 0, 0); font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;Browser("Browser").Page("Page").Sync&lt;br /&gt;Browser("Browser").Navigate  "https://login.yahoo.com/config/login_verify2?&amp;amp;.src=ym"&lt;br /&gt;Browser("Browser").Page("Yahoo!  Mail: The best").WebEdit("login").Set  "piyush&lt;br /&gt;Browser("Browser").Page("Yahoo! Mail: The  best").WebEdit("passwd").SetSecure  "4801a2cbf793b46aad67194b5cbc961c091f"&lt;br /&gt;Browser("Browser").Page("Yahoo! Mail:  The best").WebButton("Sign In").Click&lt;br /&gt;Browser("Browser").Page("Yahoo! Mail - piyush@yahoo.com").Link("Inbox (6)").Click&lt;/span&gt;&lt;/p&gt;&lt;p style="color: rgb(0, 0, 0); font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Now if you don't check any mail in your inbox and log out and then again run  this code it will work fine.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;But if you check any mail like if I check one  mail in my inbox then it will be Inbox(5), then if I  run this code it will fail because the link has changed from Inbox(6) to Inbox(5) and shows the below mentioned error.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;"Cannot identify the object Inbox(6) (of class Link). Verify that this object`s properties match an object currently displayed in your application."&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Now we will change the above code with the help of regular expression so that  it will work even if there is only one unread mail.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;In QTP go to Resources (menu) -&gt;Object Repository.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;   &lt;p&gt;Object Repository window will open. Select the object "Inbox(6)". Click on the label Inbox(6) inside Value column and then click on "&lt;=&gt;" button which will appear.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;When you  click on the button, it will open 'Value Configuration  Options' window. On this window click on Regular Expression check box. When you  click on checkbox it will show warning . Just click  on Yes.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Now in the Constant text box inside the displayed window( what I have entered  "Inbox \([5-6]\)" and click Ok and close Object Repository window.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;This Regular Expression setting which we have done works for inbox unread  mails between 5 and 6 e.g. if your inbox says inbox(5) or inbox(6).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Run the test. It passes for me because I had 5 unread mails in my inbox  (inbox(5)).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;You can do this setting according to your convenience e.g. [1-5] for unread  mails between 1 and 5 and so on.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;  &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5528709051591542403-5619722760699310470?l=qtpgoodtutorials.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://qtpgoodtutorials.blogspot.com/feeds/5619722760699310470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5528709051591542403&amp;postID=5619722760699310470' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5619722760699310470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5528709051591542403/posts/default/5619722760699310470'/><link rel='alternate' type='text/html' href='http://qtpgoodtutorials.blogspot.com/2008/06/qtp-tutorials-15-regular-expression.html' title='QTP Tutorials 13 - Regular Expression'/><author><name>QTP Expert</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry></feed>
