<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;A0MERXk_fCp7ImA9WhRUE0Q.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224</id><updated>2012-01-24T02:03:24.744-08:00</updated><category term="Pathfinder.Insert" /><category term="Sending Email in QTP" /><category term="PathFinder" /><category term="QC OTA Filter" /><category term="QTP" /><category term="Remove Pathfinder" /><category term="Resize Bitmap Using QTP DotNetFactory System.Drawing.Image" /><category term="QC TestSetFactory" /><category term="DOT Net Factory (Browser Control)" /><category term="Xpath Query" /><category term="Xpath and QTP" /><category term="QTP and Javascript" /><category term="QTP Object Identification" /><category term="QC BugFactory" /><category term="QTP Screen Capture" /><category term="DOM" /><category term="QTP Setting" /><category term="QTP and XPATH" /><category term="QTP Email" /><category term="WMI" /><category term="XPATH Identification" /><category term="Weblist" /><category term="Bitmap Capture" /><category term="QTP RegisterUserFunc GetRowWithCellText Webtable" /><category term="System.IO.Directory" /><category term="Unknown QTP Webtable Methods" /><category term="QTP 11 new feature for Xpath" /><category term="AOM Setting" /><category term="Getting Cursor Position from WebEdit" /><category term="TreeManager" /><category term="QC OTA" /><category term="XML Dom" /><category term="Snag IT and QTP Capture" /><category term="DOM Webradiogroup DOM Radio Button Radio Button Disabled" /><category term="DOT Net Factory" /><category term="Webedit" /><category term="MSDASQL" /><category term="QTP WebEdit Cursor Position" /><category term="Hyper Link Excelsheet Workbooks Worksheet QTP and Excel" /><category term="moveStart" /><category term="DOM methods for QTP" /><category term="Code Creator." /><category term="New QTP Features" /><category term="EXCEL COM" /><category term="HTML" /><category term="Webtable" /><category term="Remove All" /><category term="Using QTP DotNetFactory System.Drawing.Image" /><category term="QTP WebEdit Selection" /><category term="QTP Tricks." /><category term="ChildItem and ChildItemCount methods" /><category term="GUID" /><category term="HTML DOM" /><category term="Web Table Display." /><category term="ADODB" /><category term="QTP Bitmap Capture Bitmap Highlight Text In QTP" /><category term="QTP." /><category term="QTP Screen Changing Screen Resolution Qres MultiRes" /><category term="Array List." /><category term="QTP Script Talk QTP Tricks QTP sapi" /><category term="TestSet" /><category term="QTP Xpath examples" /><category term="WMI for QTP" /><category term="QTP and DOM" /><category term="VB Script Class QTP Code Reuse Object Function" /><category term="EXCEL Column Names" /><category term="NodeByPath" /><category term="QTP Codes Samples" /><category term="QTP 11 Runscript method" /><category term="Image Merge" /><category term="DOT Factory for Image" /><category term="Add path" /><category term="QTP Xpath Object Identification" /><category term="Xpath Samples" /><category term="DOM WEBEDIT" /><category term="QTP Tips" /><category term="GetFiles" /><category term="Hashtable" /><category term="QTP Webtable Tricks" /><category term="Pathfinder.Locate" /><category term="CSS for QTP" /><category term="Excel Application QTP GetObject CreateObject Quit Excel Application Workbooks" /><category term="Balloon Tool Tip in QTP" /><category term="Weblist Sorting" /><category term="QTP Codes." /><category term="Webtable Border" /><category term="Random Strings" /><category term="DOM INPUT" /><category term="QTP Start Up" /><category term="TextRange" /><category term="OpenSchema" /><category term="Selection.createRange" /><category term="Random Test Data" /><category term="Querying Text File." /><category term="TDApiOle80.TDConnection" /><category term="QTP password masking" /><category term="Runscript methodmeth" /><category term="QC OTA Multiple Filters" /><category term="Wild Card for FSO" /><category term="NewList" /><category term="Test Setting" /><title>QTP Codes - Quick Test Professional</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://qtpcodes.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/QtpCodes-QuickTestProfessional" /><feedburner:info uri="qtpcodes-quicktestprofessional" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0QEQHczeyp7ImA9WhRWFU8.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-7302906890128660992</id><published>2012-01-02T07:44:00.001-08:00</published><updated>2012-01-02T08:21:41.983-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-02T08:21:41.983-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XPATH Identification" /><category scheme="http://www.blogger.com/atom/ns#" term="QTP Xpath examples" /><category scheme="http://www.blogger.com/atom/ns#" term="QTP and XPATH" /><category scheme="http://www.blogger.com/atom/ns#" term="Xpath Samples" /><title>More Xpath for Web Objects</title><content type="html">&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Identifying using Id attribute&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;pre class="vb" name="code"&gt;obj.WebEdit("xpath:=//input[@id='htmlID']").Set "QTP"&lt;/pre&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Identifying using Type attribute&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;pre class="vb" name="code"&gt;obj.WebEdit("xpath:=//input[@type='text'][1]").Set "QTP"'Setting value in first textBox&lt;/pre&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Identifying using Tagname&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;pre class="vb" name="code"&gt;obj.WebList("xpath:=//select[1]").Select "London"'Highlighting first listBox&lt;/pre&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Identifying using Innertext&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;pre class="vb" name="code"&gt;obj.Link("xpath:=//a[.='Google']").Click'Clicking Google link&lt;/pre&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Identifying WebTable based on Rowcount&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;pre class="vb" name="code"&gt;obj.WebTable("xpath:=//table[count(.//tr)=2]").Highlight 'Highlighting the table which has only two rows&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;More examples will be added&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-7302906890128660992?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jypct1GoLBluBV2yno9coHurNwE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jypct1GoLBluBV2yno9coHurNwE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jypct1GoLBluBV2yno9coHurNwE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jypct1GoLBluBV2yno9coHurNwE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/p68lrVD5icg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/7302906890128660992/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2012/01/more-xpath-for-web-objects.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/7302906890128660992?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/7302906890128660992?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/p68lrVD5icg/more-xpath-for-web-objects.html" title="More Xpath for Web Objects" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2012/01/more-xpath-for-web-objects.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYDQHszeyp7ImA9WhRTEEs.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-3497985279821023109</id><published>2011-10-31T04:41:00.000-07:00</published><updated>2011-10-31T04:56:11.583-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-31T04:56:11.583-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Runscript methodmeth" /><category scheme="http://www.blogger.com/atom/ns#" term="QTP 11 Runscript method" /><category scheme="http://www.blogger.com/atom/ns#" term="QTP and Javascript" /><title>Running Javascript in QTP</title><content type="html">&lt;SPAN&gt;You can run Javascript in QTP using &lt;b&gt;Runscript&lt;/b&gt; method. This is a new feature in QTP 11. Here is an example for it.&lt;/SPAN&gt;&lt;pre class="VB" name="code"&gt;&lt;br /&gt;Set oPage=Browser("name:=Google").Page("title:=Google")&lt;br /&gt;&lt;br /&gt;Set oTxtGoogle=oPage.RunScript("document.getElementsByName('q')(0);")&lt;br /&gt;'The above line gets DOM object for Google textbox using Javascript.&lt;br /&gt;&lt;br /&gt;oTxtGoogle.Value="qtp"&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;&lt;span&gt;I hope it is helpful.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-3497985279821023109?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ct8sc4-6vn4-DvaICI5_liPF52E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ct8sc4-6vn4-DvaICI5_liPF52E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ct8sc4-6vn4-DvaICI5_liPF52E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ct8sc4-6vn4-DvaICI5_liPF52E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/Ni-RmbeA19s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/3497985279821023109/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/10/running-javascript-in-qtp.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/3497985279821023109?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/3497985279821023109?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/Ni-RmbeA19s/running-javascript-in-qtp.html" title="Running Javascript in QTP" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2011/10/running-javascript-in-qtp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQGRnozcSp7ImA9WhdaEkQ.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-8661827102194668627</id><published>2011-10-21T22:40:00.000-07:00</published><updated>2011-10-22T06:32:07.489-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-22T06:32:07.489-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TestSet" /><category scheme="http://www.blogger.com/atom/ns#" term="NewList" /><category scheme="http://www.blogger.com/atom/ns#" term="QC OTA Multiple Filters" /><category scheme="http://www.blogger.com/atom/ns#" term="QC OTA Filter" /><category scheme="http://www.blogger.com/atom/ns#" term="NodeByPath" /><category scheme="http://www.blogger.com/atom/ns#" term="TreeManager" /><category scheme="http://www.blogger.com/atom/ns#" term="QC BugFactory" /><category scheme="http://www.blogger.com/atom/ns#" term="QC TestSetFactory" /><category scheme="http://www.blogger.com/atom/ns#" term="TDApiOle80.TDConnection" /><category scheme="http://www.blogger.com/atom/ns#" term="QC OTA" /><title>Retrieve values from Quality Center Test Lab and Defects tab using OTA</title><content type="html">&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Getting the Number of Passed, Failed, No Run and Not Completed Test cases&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;We can make use of the Filter as given below to get the number of Test cases according to the status Passed, Failed, No Run, Not Completed,etc.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="vb"&gt;Dim tdc, qcServer&lt;br /&gt;Dim qcUsername,qcPassword,qcDomain,qcProject&lt;br /&gt;&lt;br /&gt;Set tdc = CreateObject("TDApiOle80.TDConnection")&lt;br /&gt;qcServer = "QC URL"&lt;br /&gt;tdc.InitConnectionEx qcServer&lt;br /&gt;&lt;br /&gt;If tdc.Connected Then&lt;br /&gt;  Msgbox "Connected to QC"&lt;br /&gt;  Else&lt;br /&gt;  MsgBox "Not connected to QC"&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;qcUsername = "Your QC Username" 'Username&lt;br /&gt;qcPassword = "Your Password"   'Password&lt;br /&gt;tdc.Login qcUsername, qcPassword&lt;br /&gt;&lt;br /&gt;If tdc.LoggedIn Then&lt;br /&gt;  MsgBox "Logged in to QC"&lt;br /&gt;  Else&lt;br /&gt;  MsgBox "Logged out from QC"&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;qcDomain = "Domain" 'QC Domain Name&lt;br /&gt;qcProject = "Project" 'QC Project Name&lt;br /&gt;&lt;br /&gt;tdc.Connect qcDomain, qcProject&lt;br /&gt;&lt;br /&gt;Dim vPath: vPath="Root\Account1\Proj1" 'Path to the folder containing test set&lt;br /&gt;Dim vPass,vFail,vNR,vNC&lt;br /&gt;&lt;br /&gt;Dim oTestSet: Set oTestSet = tdc.TestSetTreeManager.NodeByPath(vpath).TestSetFactory.NewList("").Item(1).TsTestFactory 'Item(1) Refers to the 1st test set in the path&lt;br /&gt;Dim testFilter1: Set testFilter1 = oTestSet.Filter&lt;br /&gt;&lt;br /&gt;'To Filter by Passed status&lt;br /&gt;testFilter1.Filter("TC_STATUS") = "Passed"&lt;br /&gt;vPass = vPass + oTestSet.NewList(testFilter1.Text).Count&lt;br /&gt;&lt;br /&gt;'To Filter by Failed Status&lt;br /&gt;testFilter1.Filter("TC_STATUS") = "Failed"&lt;br /&gt;vFail = vFail + oTestSet.NewList(testFilter1.Text).Count&lt;br /&gt;&lt;br /&gt;'To Filter by No Run status&lt;br /&gt;vNR = vNR + oTestSet.NewList("[Filter]{TableName:TESTCYCL,ColumnName:TC_STATUS,LogicalFilter:" &amp;amp; Chr(39) &amp;amp; "No" &amp;amp; Chr(32) &amp;amp; "Run" &amp;amp; Chr(39) &amp;amp; ",VisualFilter:" &amp;amp; Chr(39) &amp;amp; "No" &amp;amp; Chr(32) &amp;amp; "Run" &amp;amp;Chr(39) &amp;amp; ",NO_CASE:}").Count&lt;br /&gt;&lt;br /&gt;'To Filter by Not Completed status&lt;br /&gt;vNC = vNC + oTestSet.NewList("[Filter]{TableName:TESTCYCL,ColumnName:TC_STATUS,LogicalFilter:" &amp;amp; Chr(39) &amp;amp; "Not" &amp;amp; Chr(32) &amp;amp; "Completed" &amp;amp; Chr(39) &amp;amp; ",VisualFilter:" &amp;amp; Chr(39) &amp;amp; "Not" &amp;amp; Chr(32) &amp;amp;"Completed" &amp;amp; Chr(39) &amp;amp; ",NO_CASE:}").Count&lt;br /&gt;&lt;br /&gt;Msgbox "Passed: "&amp;amp;vPass&amp;amp;" Failed: "&amp;amp;vFail&amp;amp;" No Run: "&amp;amp;vNR&amp;amp;" Not Completed: "&amp;amp;vNC&lt;br /&gt;&lt;br /&gt;Set testFilter1=Nothing&lt;br /&gt;&lt;br /&gt;Set oTestSet=Nothing&lt;br /&gt;&lt;br /&gt;Set tdc=Nothing&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Getting the Number of Test cases executed by a tester in a specific test set&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;We can use the below code to get the count of test cases executed by a tester in a particular test set.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="vb"&gt;Dim vPath: vPath="Root\Account1\Proj1" 'Path to the folder containing test set&lt;br /&gt;&lt;br /&gt;Dim oTestSet: Set oTestSet = tdc.TestSetTreeManager.NodeByPath(vpath).TestSetFactory.NewList("").Item(1).TsTestFactory 'Item(1) Refers to the 1st test set in the path ; tdc refers to the test&lt;br /&gt;connection object in the previous snippet&lt;br /&gt;&lt;br /&gt;Dim testFilter1: Set testFilter1 = oTestSet.Filter&lt;br /&gt;Dim vtestcount: vtestcount=0&lt;br /&gt;Dim tester_name:tester_name="divya" 'QC username of the tester for whom the count has to be calculated&lt;br /&gt;testFilter1.Filter("TC_ACTUAL_TESTER") =chr(34)&amp;amp;Cstr(tester_name)&amp;amp;chr(34)&lt;br /&gt;&lt;br /&gt;vtestcount = vtestcount + oTestSet.NewList(testFilter1.Text).Count&lt;br /&gt;Msgbox "Number of Test Cases executed by "&amp;amp;tester_name&amp;amp;" : "&amp;amp;vtestcount&lt;br /&gt;Set testFilter1=Nothing&lt;br /&gt;Set oTestSet=Nothing&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Getting the number of defects raised by a tester in a specific release according to severity&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;We need to apply multiple filters as we are using Tester name, Release Name and Defect Severity as the criteria.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="vb"&gt;Dim Bug_Ct:Bug_Ct=0&lt;br /&gt;Dim tester_name:tester_name="divya"&lt;br /&gt;Dim test_severity:test_severity="2-High"&lt;br /&gt;&lt;br /&gt;Dim oBugFactory: Set oBugFactory=tdc.BugFactory&lt;br /&gt;Dim TotBugcnt: TotBugcnt=oBugFactory.NewList("").Count 'To get the total number of defects in Defects tab.&lt;br /&gt;Dim oBugFilter1:Set oBugFilter1=oBugFactory.Filter&lt;br /&gt;&lt;br /&gt;oBugFilter1.Filter("BG_DETECTED_BY")=tester_name 'QC username of the tester for whom the defect count has to be calculated&lt;br /&gt;oBugFilter1.Filter("BG_DETECTED_IN_REL") = "^Releases\proj1\1.1.01.201^" 'Name of the Release&lt;br /&gt;oBugFilter1.Filter("BG_SEVERITY")=test_severity 'Defect Severity. Eg.: Can be 2-High, 1-Critical, 4-Low. Possible Values can be obtained from QC defects tab&lt;br /&gt;&lt;br /&gt;Bug_Ct = Bug_Ct + oBugFactory.NewList(oBugFilter1.Text).Count&lt;br /&gt;Msgbox Bug_Ct&lt;br /&gt;&lt;br /&gt;Set oBugFilter1=Nothing&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Getting the number of defects in a specific release according to defect status&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Here we need to apply the following criteria: Release Name, Defect status.&lt;/span&gt;&lt;span&gt; If we want to be more specific , say, we need to find the same for a particular tester, then we  can include tester name as a filter criteria.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;The following code will give the output for number of defects raised in a specific release having the status "Closed" which were raised by tester1 and tester2.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="vb"&gt;&lt;br /&gt;Dim Bug_Ct:Bug_Ct=0&lt;br /&gt;Set oBugFactory=tdc.BugFactory&lt;br /&gt;Set oBugFilter1=oBugFactory.Filter&lt;br /&gt;oBugFilter1.Filter("BG_DETECTED_IN_REL") = "^Releases\proj1\1.1.01.201^" 'Name of the Release&lt;br /&gt;oBugFilter1.Filter("BG_STATUS")="Closed" 'Defect status for which count is calculated&lt;br /&gt;oBugFilter1.Filter("BG_DETECTED_BY")="tester1 or tester2" 'QC Username of the testers for whom the count is calculated&lt;br /&gt;Bug_Ct = Bug_Ct + oBugFactory.NewList(oBugFilter1.Text).Count&lt;br /&gt;Msgbox Bug_Ct&lt;br /&gt;Set oBugFilter1=Nothing&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-8661827102194668627?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/E6xY80O_z5c9lJsPbS3ZFbUQFss/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/E6xY80O_z5c9lJsPbS3ZFbUQFss/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/E6xY80O_z5c9lJsPbS3ZFbUQFss/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/E6xY80O_z5c9lJsPbS3ZFbUQFss/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/_r8jRLs8ltg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/8661827102194668627/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/10/retrieve-values-from-quality-center.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/8661827102194668627?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/8661827102194668627?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/_r8jRLs8ltg/retrieve-values-from-quality-center.html" title="Retrieve values from Quality Center Test Lab and Defects tab using OTA" /><author><name>Divya Rajaraman</name><uri>http://www.blogger.com/profile/09874404405604121952</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><feedburner:origLink>http://qtpcodes.blogspot.com/2011/10/retrieve-values-from-quality-center.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMERno6eCp7ImA9WhdbE0g.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-7496947428565971985</id><published>2011-10-11T10:26:00.000-07:00</published><updated>2011-10-11T10:33:27.410-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-11T10:33:27.410-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="QTP WebEdit Cursor Position" /><category scheme="http://www.blogger.com/atom/ns#" term="moveStart" /><category scheme="http://www.blogger.com/atom/ns#" term="Selection.createRange" /><category scheme="http://www.blogger.com/atom/ns#" term="Getting Cursor Position from WebEdit" /><category scheme="http://www.blogger.com/atom/ns#" term="TextRange" /><category scheme="http://www.blogger.com/atom/ns#" term="QTP WebEdit Selection" /><title>How To Get Cursor Position From WebEdit</title><content type="html">&lt;span&gt;The below snippet can be used to get the cursor position from WebEdit&lt;/span&gt;&lt;pre class="vb" name="code"&gt;Dim oPage:Set oPage=Browser("name:=Google").Page("title:=Google")&lt;br /&gt;Dim oSel:Set oSel=oPage.Object.Selection.createRange&lt;br /&gt;Dim oWebEdit:Set oWebEdit=oPage.WebEdit("name:=q").Object&lt;br /&gt;&lt;br /&gt;oSel.moveStart "character",-Len(oWebEdit.value)&lt;br /&gt;&lt;br /&gt;Msgbox  Len(oSel.text)'Here you will get the cursor position.&lt;br /&gt;&lt;br /&gt;Set oPage=Nothing&lt;br /&gt;Set oSel=Nothing&lt;br /&gt;Set oWebEdit=Nothing&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-7496947428565971985?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5BaA9e1-yV1X3XfbgXr__x0jxeQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5BaA9e1-yV1X3XfbgXr__x0jxeQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5BaA9e1-yV1X3XfbgXr__x0jxeQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5BaA9e1-yV1X3XfbgXr__x0jxeQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/kNI3Q3zSEsc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/7496947428565971985/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/10/how-to-get-cursor-position-from-webedit.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/7496947428565971985?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/7496947428565971985?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/kNI3Q3zSEsc/how-to-get-cursor-position-from-webedit.html" title="How To Get Cursor Position From WebEdit" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2011/10/how-to-get-cursor-position-from-webedit.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIFQ3c4eSp7ImA9WhdbE0g.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-320904571480681561</id><published>2011-10-10T00:25:00.000-07:00</published><updated>2011-10-11T10:35:12.931-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-11T10:35:12.931-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="QTP Xpath Object Identification" /><category scheme="http://www.blogger.com/atom/ns#" term="QTP Object Identification" /><category scheme="http://www.blogger.com/atom/ns#" term="New QTP Features" /><category scheme="http://www.blogger.com/atom/ns#" term="Xpath and QTP" /><category scheme="http://www.blogger.com/atom/ns#" term="QTP 11 new feature for Xpath" /><title>Xpath Based QTP Object Identification</title><content type="html">&lt;span&gt;Xpath object identification is a new feature in QTP 11. I would like to share an example for it using Google web page&lt;/span&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Dim oPage&lt;br /&gt;&lt;br /&gt;Set oPage=Browser("name:=Google").Page("title:=Google")&lt;br /&gt;&lt;br /&gt;oPage.WebEdit("xpath:=//INPUT[@name='q']").Set "advancedqtp"'Entering value in Google textbox.&lt;br /&gt;&lt;br /&gt;oPage.WebButton("xpath:=//INPUT[@value='Google Search']").Click'Clicking Google Search button.&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;&lt;span&gt;Try it and enjoy&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-320904571480681561?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JwPHD_z4E17_1Z21WgM2krUCfZ0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JwPHD_z4E17_1Z21WgM2krUCfZ0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JwPHD_z4E17_1Z21WgM2krUCfZ0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JwPHD_z4E17_1Z21WgM2krUCfZ0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/iXLL_s40-94" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/320904571480681561/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/10/qtp-object-identification-using-xpath.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/320904571480681561?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/320904571480681561?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/iXLL_s40-94/qtp-object-identification-using-xpath.html" title="Xpath Based QTP Object Identification" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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>3</thr:total><feedburner:origLink>http://qtpcodes.blogspot.com/2011/10/qtp-object-identification-using-xpath.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUICRXwzfCp7ImA9WhdUGUw.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-1792460058842740732</id><published>2011-10-06T07:07:00.000-07:00</published><updated>2011-10-06T09:12:44.284-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-06T09:12:44.284-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="GetFiles" /><category scheme="http://www.blogger.com/atom/ns#" term="DOT Net Factory" /><category scheme="http://www.blogger.com/atom/ns#" term="Wild Card for FSO" /><category scheme="http://www.blogger.com/atom/ns#" term="System.IO.Directory" /><title>Getting File Path List Using Wild Card Characters</title><content type="html">&lt;Span&gt;In this article, I would like to share how to get the file path for the files which are residing in a folder using wild card.&lt;/Span&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;Consider the case where we have a folder containing text files temp.txt, tem.txt, temp1.txt, temp2.txt.&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;In the above text file list if we want to get path for the files using “temp*.txt” wild card, GetFiles (System.IO.Directory) method can be used.&lt;/span&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Dim inFile,oColFilesList,oArrayList,oDI&lt;br /&gt;&lt;br /&gt;Set oArrayList=DotNetFactory.CreateInstance("System.Collections.ArrayList","")&lt;br /&gt;Set oDI=DotNetFactory.CreateInstance("System.IO.Directory","mscorlib")&lt;br /&gt;&lt;br /&gt;Set oColFilesList=oArrayList.Adapter(oDI.GetFiles("C:\Files List","temp*.txt"))&lt;br /&gt;&lt;br /&gt;For inFile=0 to Cint(oColFilesList.Count)-1&lt;br /&gt;Msgbox oColFilesList(inFile)&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;Set oArrayList=Nothing&lt;br /&gt;Set oDI=Nothing&lt;br /&gt;Set oColFilesList=Nothing&lt;br /&gt;&lt;/pre&gt;&lt;span&gt;The above code will retrieve paths of temp.txt, temp1.txt, and temp2.txt files but not for tem.txt file.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-1792460058842740732?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TLzBsFQJggp3ypXKc0bxdlJn0-U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TLzBsFQJggp3ypXKc0bxdlJn0-U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TLzBsFQJggp3ypXKc0bxdlJn0-U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TLzBsFQJggp3ypXKc0bxdlJn0-U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/CNfdlU8eOtA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/1792460058842740732/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/10/getting-file-path-list-using-wild-card.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/1792460058842740732?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/1792460058842740732?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/CNfdlU8eOtA/getting-file-path-list-using-wild-card.html" title="Getting File Path List Using Wild Card Characters" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2011/10/getting-file-path-list-using-wild-card.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEAMQ3s7fCp7ImA9WhdUF0g.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-6502527156963939788</id><published>2011-10-04T11:18:00.000-07:00</published><updated>2011-10-04T11:26:22.504-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-04T11:26:22.504-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Image Merge" /><category scheme="http://www.blogger.com/atom/ns#" term="DOT Factory for Image" /><category scheme="http://www.blogger.com/atom/ns#" term="Using QTP DotNetFactory System.Drawing.Image" /><title>Merging Images Using DOT NET Factory</title><content type="html">&lt;pre class="vb" name="code"&gt;&lt;br /&gt;&lt;br /&gt;strImage1Path="C:\Sunset.jpg"&lt;br /&gt;strImage2Path="C:\Winter.jpg"&lt;br /&gt;strMergedImagePath="C:\MergeImage.jpg"'Path where the merged image is to be stored.&lt;br /&gt;&lt;br /&gt;Set oImage=DotNetFactory.CreateInstance("System.Drawing.Image","System.Drawing")&lt;br /&gt;Set oGraph=DotNetFactory.CreateInstance("System.Drawing.Graphics","System.Drawing")&lt;br /&gt;Set oPens=DotNetFactory.CreateInstance("System.Drawing.Pens","System.Drawing")&lt;br /&gt;Set oImage1=oImage.FromFile(strImage1Path)&lt;br /&gt;Set oImage2=oImage.FromFile(strImage2Path)&lt;br /&gt;&lt;br /&gt;inWidth=Cint(oImage1.Width)+Cint(oImage2.Width)&lt;br /&gt;&lt;br /&gt;If oImage1.Height &gt;=oImage2.Height Then&lt;br /&gt; inHeight=Cint(oImage1.Height )&lt;br /&gt; Else&lt;br /&gt;  inHeight=Cint(oImage2.Height )&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Set oBmp=DotNetFactory.CreateInstance("System.Drawing.Bitmap","System.Drawing",inWidth,inHeight)&lt;br /&gt;&lt;br /&gt;Set gr=oGraph.FromImage(oBmp)&lt;br /&gt;&lt;br /&gt;gr.DrawRectangle oPens.Black,0,0,Cint(inWidth)-1,Cint(inHeight)-1&lt;br /&gt;&lt;br /&gt;gr.DrawImage oImage1,0,0&lt;br /&gt;gr.DrawImage oImage2,oImage1.Width,0&lt;br /&gt;&lt;br /&gt;oBmp.Save(strMergedImagePath)&lt;br /&gt;&lt;br /&gt;Set oImage=Nothing&lt;br /&gt;Set oGraph=Nothing&lt;br /&gt;Set oPens=Nothing&lt;br /&gt;Set oImage1=Nothing&lt;br /&gt;Set oImage2=Nothing&lt;br /&gt;Set oBmp=Nothing&lt;br /&gt;Set gr=Nothing&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-6502527156963939788?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kbLI_wnSL78YMFh08JiyWIUQmN4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kbLI_wnSL78YMFh08JiyWIUQmN4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kbLI_wnSL78YMFh08JiyWIUQmN4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kbLI_wnSL78YMFh08JiyWIUQmN4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/JcexJqQ0fQ0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/6502527156963939788/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/10/merging-images-using-dot-net-factory.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/6502527156963939788?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/6502527156963939788?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/JcexJqQ0fQ0/merging-images-using-dot-net-factory.html" title="Merging Images Using DOT NET Factory" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2011/10/merging-images-using-dot-net-factory.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IFSH08fSp7ImA9WhdUFks.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-2642421686241326137</id><published>2011-10-03T11:02:00.000-07:00</published><updated>2011-10-03T11:11:59.375-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-03T11:11:59.375-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="OpenSchema" /><category scheme="http://www.blogger.com/atom/ns#" term="MSDASQL" /><category scheme="http://www.blogger.com/atom/ns#" term="EXCEL COM" /><category scheme="http://www.blogger.com/atom/ns#" term="ADODB" /><category scheme="http://www.blogger.com/atom/ns#" term="EXCEL Column Names" /><title>Retrieving Excel Column Names Using ADODB</title><content type="html">&lt;pre class="vb" name="code"&gt;&lt;br /&gt;strExcelPath="C:\Book1.xls"&lt;br /&gt;strTableName="Sheet1$"'Note: $ symbol should be included with Table Name.&lt;br /&gt;Set oCon=CreateObject("ADODB.Connection")&lt;br /&gt;&lt;br /&gt;With oCon&lt;br /&gt;.Provider = "MSDASQL"&lt;br /&gt;.ConnectionString = "Driver={Microsoft Excel Driver (*.xls)};" &amp; _&lt;br /&gt;"DBQ="&amp;strExcelPath&amp;"; ReadOnly=False;"&lt;br /&gt;.Open&lt;br /&gt;End With&lt;br /&gt;&lt;br /&gt;Set oRs1=oCon.OpenSchema(4,Array(Empty, Empty,strTableName,Empty))&lt;br /&gt;&lt;br /&gt;Do Until oRS1.EOF&lt;br /&gt;Msgbox oRs1.Fields.Item("COLUMN_NAME").Value&lt;br /&gt;oRS1.MoveNext&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;oRs1.Close&lt;br /&gt;oCon.Close&lt;br /&gt;&lt;br /&gt;Set oRs1=Nothing&lt;br /&gt;Set oCon=Nothing&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-2642421686241326137?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KVQAeovOf850V08SjhKvlDen5T4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KVQAeovOf850V08SjhKvlDen5T4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KVQAeovOf850V08SjhKvlDen5T4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KVQAeovOf850V08SjhKvlDen5T4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/nZ9ji9QEKqQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/2642421686241326137/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/10/retrieving-excel-column-names-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/2642421686241326137?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/2642421686241326137?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/nZ9ji9QEKqQ/retrieving-excel-column-names-using.html" title="Retrieving Excel Column Names Using ADODB" /><author><name>Divya Rajaraman</name><uri>http://www.blogger.com/profile/09874404405604121952</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><feedburner:origLink>http://qtpcodes.blogspot.com/2011/10/retrieving-excel-column-names-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYCRnw8cSp7ImA9WhdUFE0.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-5845324498301806001</id><published>2011-09-29T11:14:00.000-07:00</published><updated>2011-09-30T11:09:27.279-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T11:09:27.279-07:00</app:edited><title>QTP Codes blog is being updated</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;QTP Codes blog is being updated. You will see post design changes shortly.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-5845324498301806001?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dZ7S8qfRI6IU-4pssWoU6udKiaQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dZ7S8qfRI6IU-4pssWoU6udKiaQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dZ7S8qfRI6IU-4pssWoU6udKiaQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dZ7S8qfRI6IU-4pssWoU6udKiaQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/WzfzWAB0O90" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/5845324498301806001/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/09/qtp-codes-blog-is-being-updated.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/5845324498301806001?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/5845324498301806001?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/WzfzWAB0O90/qtp-codes-blog-is-being-updated.html" title="QTP Codes blog is being updated" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2011/09/qtp-codes-blog-is-being-updated.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAMQnY9fip7ImA9WhdUFEQ.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-3299923955858505413</id><published>2011-09-29T11:07:00.000-07:00</published><updated>2011-10-01T12:19:43.866-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T12:19:43.866-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Add path" /><category scheme="http://www.blogger.com/atom/ns#" term="PathFinder" /><category scheme="http://www.blogger.com/atom/ns#" term="Pathfinder.Insert" /><category scheme="http://www.blogger.com/atom/ns#" term="Remove Pathfinder" /><category scheme="http://www.blogger.com/atom/ns#" term="Remove All" /><category scheme="http://www.blogger.com/atom/ns#" term="Pathfinder.Locate" /><title>More Methods For PathFinder Object</title><content type="html">&lt;span&gt;Most of us are aware of the Locate method available for PathFinder object. But there are more useful and unfamiliar methods associated with PathFinder Object. I would like to share how these methods can be used in QTP.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;# INSERT&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;This method is used to add a new folder path to the Folders list (Tools-&amp;gt; Options-&amp;gt; Folders).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Syntax:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;PathFinder.Insert [Path],[Index]&lt;/pre&gt;&lt;span&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;PathFinder.Insert "C:\Test",0&lt;/pre&gt;&lt;span&gt;The above example will add new folder path to the Folders list.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;# FIND&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;This method returns the Index of the specified path.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Syntax:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Msgbox PathFinder.Find [Path]&lt;/pre&gt;&lt;span&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Msgbox PathFinder.Find("C:\Test")&lt;/pre&gt;&lt;span&gt;The above example returns the Index of the specified path. If the path is not found, it will return -1.&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;# MOVEITEM&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;This method can be used to swap the Index of two folder paths.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Syntax:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Pathfinder.MoveItem [Source_Index],[Destination_Index]&lt;/pre&gt;&lt;span&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Pathfinder.MoveItem 1,0&lt;/pre&gt;&lt;br&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;# REMOVE&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;This method removes the specified folder path from the folders list.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Syntax:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Pathfinder.Remove [Path]&lt;/pre&gt;&lt;span&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Pathfinder.Remove("C:\Test")&lt;/pre&gt;&lt;br&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;# REMOVEALL&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;This method removes all the items from the folders list.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Syntax/Example:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Pathfinder.RemoveAll&lt;/pre&gt;&lt;span&gt;Note: It removes default folder item as well.&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;# REMOVEBYINDEX&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;This method removes the folder path item using Index.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Syntax:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;PathFinder.RemoveByIndex([Path_Index])&lt;/pre&gt;&lt;span&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;PathFinder.RemoveByIndex(0)&lt;/pre&gt;&lt;br&gt;&lt;span STYLE="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;# SAVE&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;This method can be used to commit all the changes which are done using PathFinder object. If Save method is not used, your changes in Folder List will not be retained.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;b&gt;Syntax/Example:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;PathFinder.Save&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-3299923955858505413?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DD5ikfHzhOVJCFAIidI8oWAqyKk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DD5ikfHzhOVJCFAIidI8oWAqyKk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DD5ikfHzhOVJCFAIidI8oWAqyKk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DD5ikfHzhOVJCFAIidI8oWAqyKk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/Ie8cAuIAGZk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/3299923955858505413/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2011/09/more-methods-for-pathfinder-object.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/3299923955858505413?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/3299923955858505413?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/Ie8cAuIAGZk/more-methods-for-pathfinder-object.html" title="More Methods For PathFinder Object" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2011/09/more-methods-for-pathfinder-object.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcASHgyfSp7ImA9WhdUFE0.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-7008188831781835917</id><published>2010-11-28T01:19:00.000-08:00</published><updated>2011-09-30T11:07:29.695-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T11:07:29.695-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="QTP Webtable Tricks" /><category scheme="http://www.blogger.com/atom/ns#" term="Unknown QTP Webtable Methods" /><title>Unknown QTP Webtable Methods</title><content type="html">The below listed unknown QTP webtable methods were present in Astra LoadTest. But we are still able to use these methods in QTP. I would like to share this to you.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;#1 CellText&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;This method works as same as GetCellData method.&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Eg.: Msgbox Browser("name:=qtp").WebTable("index:=0").CellText(1,1)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;#2 CellTextByContext &lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;This method returns the text within a cell delimited by a character. We can retrieve the text before (or) after the delimiter using this method.&lt;br /&gt;Eg.: Consider a cell having the text “Asiq;Ahamed”. Here “;’ is the delimiter&lt;br /&gt;&lt;br /&gt;Code to retrieve the text before the delimiter&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Msgbox Browser("name:=qtp").WebTable("index:=0").CellTextByContext(1,1,"",";")&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Code to retrieve the text after the delimiter&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Msgbox Browser("name:=qtp").WebTable("index:=0").CellTextByContext(1,1,";")&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;strong&gt;#3 TextCellExist&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This method checks whether a text exists in a cell or not. It returns true, if the input text exists in the cell, else it returns false. Rather than using GetCellData method and then comparing the result with the input text, we can achieve it using this simple method.&lt;br /&gt;&lt;pre class="vb" name="code"&gt;Msgbox Browser("name:=qtp").WebTable("index:=0").TextCellExist(1,1,"asiq")&lt;br /&gt;&lt;/pre&gt;I hope this is useful to all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-7008188831781835917?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rbnEnnLxD1BV5tW7aYMxVaUY61I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rbnEnnLxD1BV5tW7aYMxVaUY61I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rbnEnnLxD1BV5tW7aYMxVaUY61I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rbnEnnLxD1BV5tW7aYMxVaUY61I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/r-UQ-bojJ5I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/7008188831781835917/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/11/more-qtp-webtable-methods.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/7008188831781835917?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/7008188831781835917?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/r-UQ-bojJ5I/more-qtp-webtable-methods.html" title="Unknown QTP Webtable Methods" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/11/more-qtp-webtable-methods.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMARHY9fCp7ImA9WhdUFE0.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-2486912929981571231</id><published>2010-11-21T06:47:00.000-08:00</published><updated>2011-09-30T11:14:05.864-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T11:14:05.864-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DOM WEBEDIT" /><category scheme="http://www.blogger.com/atom/ns#" term="DOM methods for QTP" /><category scheme="http://www.blogger.com/atom/ns#" term="DOM INPUT" /><title>Beware of setting value in webedit using DOM</title><content type="html">&lt;div dir="ltr" style="TEXT-ALIGN: left" trbidi="on"&gt;If you set value in a disabled webedit, QTP will throw the below error.&lt;br&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/__S-LuIngFS4/TOkykGHzaQI/AAAAAAAAAEI/6Y63cZe1Vxs/s1600/Error.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5542016412156127490" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 385px; CURSOR: hand; HEIGHT: 145px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/__S-LuIngFS4/TOkykGHzaQI/AAAAAAAAAEI/6Y63cZe1Vxs/s400/Error.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;But do not enter value in webedit using DOM. The problem is: You can set value in web text box even it is disabled.&lt;br /&gt;We have a work around for this.&lt;br /&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Set obj=Browser("name:=Google").Page("title:=Google").WebEdit("index:=1").Object&lt;br /&gt;If Not obj.disabled Then&lt;br /&gt;obj.Value ="qtp"&lt;br /&gt;End If&lt;/pre&gt;I always use DOM to retrieve text or count no. of objects. I hope this is helpful.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-2486912929981571231?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5ufLgTI7Hen0azigD4-F6LFa2M0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5ufLgTI7Hen0azigD4-F6LFa2M0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5ufLgTI7Hen0azigD4-F6LFa2M0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5ufLgTI7Hen0azigD4-F6LFa2M0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/PSRX4lnNqtk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/2486912929981571231/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/11/dont-use-dom-to-set-value.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/2486912929981571231?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/2486912929981571231?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/PSRX4lnNqtk/dont-use-dom-to-set-value.html" title="Beware of setting value in webedit using DOM" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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://3.bp.blogspot.com/__S-LuIngFS4/TOkykGHzaQI/AAAAAAAAAEI/6Y63cZe1Vxs/s72-c/Error.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://qtpcodes.blogspot.com/2010/11/dont-use-dom-to-set-value.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIBQHoyfCp7ImA9WhdUFE0.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-95473252781089474</id><published>2010-08-06T10:18:00.000-07:00</published><updated>2011-09-30T11:15:51.494-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T11:15:51.494-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hyper Link Excelsheet Workbooks Worksheet QTP and Excel" /><title>Adding Hyperlink In An Excel Sheet</title><content type="html">&lt;strong&gt;&lt;em&gt;Method #1&lt;/em&gt;&lt;/strong&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Set obj=CreateObject("Excel.Application")&lt;br /&gt;obj.Visible=True&lt;br /&gt;&lt;br /&gt;Set oWorkBooks=obj.WorkBooks.Open("C:\Desktop\Book1.xls")&lt;br /&gt;Set oWorksheet=oWorkBooks.Worksheets(1)&lt;br /&gt;&lt;br /&gt;With oWorksheet&lt;br /&gt;.Hyperlinks.Add .Range("A1"),"http://qtpcodes.blogspot.com"&lt;br /&gt;End With&lt;br /&gt;&lt;/pre&gt;&lt;strong&gt;&lt;em&gt;Method #2&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Set obj=CreateObject("Excel.Application")&lt;br /&gt;obj.Visible=True&lt;br /&gt;&lt;br /&gt;Set oWorkBooks=obj.WorkBooks.Open("C:\Desktop\Book1.xls")&lt;br /&gt;Set oWorksheet=oWorkBooks.Worksheets(1)&lt;br /&gt;sLink="http://www.qtpcodes.blogspot.com"&lt;br /&gt;&lt;br /&gt;oWorksheet.Cells(1, 1).Value= "=HYPERLINK("&amp;amp;Chr(34)&amp;amp;sLink&amp;amp;Chr(34)&amp;amp;",""CLICK HERE"")"&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-95473252781089474?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZY8q3UyzOf-Tf0LWvJ38hvKM9C8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZY8q3UyzOf-Tf0LWvJ38hvKM9C8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZY8q3UyzOf-Tf0LWvJ38hvKM9C8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZY8q3UyzOf-Tf0LWvJ38hvKM9C8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/NyxW0qWeEho" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/95473252781089474/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/08/adding-hyperlink-in-excel-sheet.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/95473252781089474?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/95473252781089474?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/NyxW0qWeEho/adding-hyperlink-in-excel-sheet.html" title="Adding Hyperlink In An Excel Sheet" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/08/adding-hyperlink-in-excel-sheet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MFQnk7eip7ImA9WhdUE0Q.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-8020780371783287638</id><published>2010-06-26T21:23:00.000-07:00</published><updated>2011-09-30T08:10:13.702-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T08:10:13.702-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Resize Bitmap Using QTP DotNetFactory System.Drawing.Image" /><title>Resizing Bitmap using Dotnet Factory</title><content type="html">&lt;pre name="code" class="vb"&gt;&lt;br /&gt;Set oImage=DotNetFactory.CreateInstance("System.Drawing.Image","System.Drawing") &lt;br /&gt;vstPath="C:\Sample Pictures\Water lilies.jpg" 'path of the bitmap to be resized. &lt;br /&gt;Set oBitmap=DotNetFactory.CreateInstance("System.Drawing.Bitmap","System.Drawing",oImage.FromFile(vstPath),30,40) &lt;br /&gt;vStResizedPath="C:\Sample Pictures\Water lilies1.jpg" &lt;br /&gt;oBitmap.Save(vStResizedPath)'Save the resized bitmap. &lt;br /&gt;Set oBitmap=Nothing &lt;br /&gt;Set oImage=Nothing&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-8020780371783287638?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aaqVwyHGpJNsNGJyMN8ZeYzcu5o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aaqVwyHGpJNsNGJyMN8ZeYzcu5o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aaqVwyHGpJNsNGJyMN8ZeYzcu5o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aaqVwyHGpJNsNGJyMN8ZeYzcu5o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/DOun9x2jPqg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/8020780371783287638/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/06/resizing-bitmap-using-dotnet-factory.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/8020780371783287638?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/8020780371783287638?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/DOun9x2jPqg/resizing-bitmap-using-dotnet-factory.html" title="Resizing Bitmap using Dotnet Factory" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/06/resizing-bitmap-using-dotnet-factory.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIMRHY7eSp7ImA9WhdUFEk.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-8441481251765194144</id><published>2010-06-03T10:36:00.000-07:00</published><updated>2011-09-30T20:43:05.801-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T20:43:05.801-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VB Script Class QTP Code Reuse Object Function" /><title>Reuse Your QTP Code</title><content type="html">In this article, I am going to explain you how can we reuse the code which is written for web application.&lt;br&gt;In the below class, I have written function fnc_set to set value in a WebEdit.&lt;br&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Class FirstClass&lt;br /&gt;Private VarBrowserObj&lt;br /&gt;Private VarWebEditObj&lt;br /&gt;Private VarSetValue&lt;br /&gt;'**********Let Property*****************************************&lt;br /&gt;Public Property Let fnc_VarSetValue(val)&lt;br /&gt;VarSetValue=val&lt;br /&gt;End Property&lt;br /&gt;'**********Set Property****************************************&lt;br /&gt;Public Property Set fnc_VarBrowserObj(val)&lt;br /&gt;Set VarBrowserObj=val&lt;br /&gt;End Property&lt;br /&gt;&lt;br /&gt;Public Property Set fnc_VarWebEditObj(val)&lt;br /&gt;Set VarWebEditObj=val&lt;br /&gt;End Property&lt;br /&gt;'**************Funtions and Procedures**********************&lt;br /&gt;Public Function fnc_set&lt;br /&gt;Browser(VarBrowserObj).WebEdit(VarWebEditObj).Set VarSetValue&lt;br /&gt;End Function&lt;br /&gt;End Class&lt;/pre&gt;&lt;br&gt;Here, I am creating an object for the above class and setting up values and objects for class properties.&lt;br&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Public objClass&lt;br /&gt;'Creating object for class&lt;br /&gt;Set objClass=new FirstClass &lt;br /&gt;&lt;br /&gt;'Calling Let to assign value for VarSetValue property&lt;br /&gt;objClass.fnc_VarSetValue="QTP"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Calling Set property method for Browser object&lt;br /&gt;Dim objBrowser:Set objBrowser=Description.Create()&lt;br /&gt;objBrowser("name").Value="Google"&lt;br /&gt;Set objClass.fnc_VarBrowserObj=objBrowser&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Calling Set property method for WebEdit object&lt;br /&gt;Dim objWebEdit:Set objWebEdit=Description.Create()&lt;br /&gt;objWebEdit("name").Value="q"&lt;br /&gt;Set objClass.fnc_VarWebEditObj=objWebEdit&lt;br /&gt;&lt;br /&gt;'Calling fnc_set function for Web operation&lt;br /&gt;objClass.fnc_set&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;You may think that the above class can be used only for web application. But we are able to use for other application also.&lt;br&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;'Calling Let to assign value for VarSetValue property&lt;br /&gt;objClass.fnc_VarSetValue="mercury"&lt;br /&gt;&lt;br /&gt;'Calling Set property method for Dialog object&lt;br /&gt;Dim objDialog:Set objDialog=Description.Create()&lt;br /&gt;objDialog("text").Value="Login"&lt;br /&gt;objDialog("micclass").Value="Dialog"'Here is the trick, you need to inlcude micclass property along with main property.&lt;br /&gt;Set objClass.fnc_VarBrowserObj=objDialog&lt;br /&gt;&lt;br /&gt;'Calling Set property method for WinEdit object&lt;br /&gt;Dim objWinEdit:Set objWinEdit=Description.Create()&lt;br /&gt;objWinEdit("attached text").Value="Agent Name:"&lt;br /&gt;objWinEdit("micclass").Value="WinEdit"&lt;br /&gt;Set objClass.fnc_VarWebEditObj=objWinEdit&lt;br /&gt;&lt;br /&gt;objClass.fnc_set 'Setting value in winedit with same function.&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-8441481251765194144?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DXiN3In65tsylpipxwlFHKtHNP8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DXiN3In65tsylpipxwlFHKtHNP8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DXiN3In65tsylpipxwlFHKtHNP8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DXiN3In65tsylpipxwlFHKtHNP8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/EAGbWo6cIRM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/8441481251765194144/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/06/reuse-your-qtp-code.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/8441481251765194144?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/8441481251765194144?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/EAGbWo6cIRM/reuse-your-qtp-code.html" title="Reuse Your QTP Code" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/06/reuse-your-qtp-code.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cBRnYzcSp7ImA9WhdUFEo.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-3783514571754827795</id><published>2010-05-31T09:39:00.000-07:00</published><updated>2011-10-01T07:24:17.889-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T07:24:17.889-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="QTP RegisterUserFunc GetRowWithCellText Webtable" /><title>Overriding GetRowWithCellText Method</title><content type="html">&lt;span class="Apple-style-span" &gt;&lt;span&gt;&lt;strong&gt;GetRowWithCellText&lt;/strong&gt; method finds the specified text in a webtable and returns the number of the first row found. &lt;/span&gt;&lt;br&gt;&lt;span&gt;If you want to find all matches in a webtable, then we have to override the &lt;strong&gt;GetRowWithCellText&lt;/strong&gt; method using RegisterUserFunc as below,&lt;/span&gt;&lt;/span&gt;&lt;pre name="code" class="vb"&gt;RegisterUserFunc "WebTable","GetRowWithCellText","NewGetRowWithCellText"&lt;br /&gt;&lt;/pre&gt;&lt;pre name="code" class="vb"&gt;&lt;br /&gt;Function NewGetRowWithCellText(obj,val1,val2,val3)&lt;br /&gt;Dim v_st_returnText&lt;br /&gt;Set objRow=obj.Object.getElementsByTagName("TR")&lt;br /&gt;If val2&amp;lt;&amp;gt;0 Then val2=val2-1&lt;br /&gt;If val3&amp;lt;&amp;gt;0 Then val3=val3-1&lt;br /&gt;For i=val3 to objRow.Length-1&lt;br /&gt;If val1=Trim(objRow(i).getElementsByTagName("TD")(val2).InnerText) Then&lt;br /&gt;If v_st_returnText="" Then&lt;br /&gt;v_st_returnText=Cstr( i+1)&lt;br /&gt;Else&lt;br /&gt;v_st_returnText=Cstr( i+1)+","+v_st_returnText&lt;br /&gt;End If&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;NewGetRowWithCellText=v_st_returnText&lt;br /&gt;End Function&lt;/pre&gt;&lt;pre name="code" class="vb"&gt;&lt;br /&gt;Msgbox Browser("name:=QTP Codes").Page("title:=QTP Codes").WebTable("index:=0").GetRowWithCellText("Cell3",1,1)&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-3783514571754827795?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_Ol4IQpHvuqRip3xZaew8u7ScjA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_Ol4IQpHvuqRip3xZaew8u7ScjA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_Ol4IQpHvuqRip3xZaew8u7ScjA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_Ol4IQpHvuqRip3xZaew8u7ScjA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/8WfvGGEUJzE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/3783514571754827795/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/05/overriding-getrowwithcelltext-method.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/3783514571754827795?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/3783514571754827795?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/8WfvGGEUJzE/overriding-getrowwithcelltext-method.html" title="Overriding GetRowWithCellText Method" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/05/overriding-getrowwithcelltext-method.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EFR3s-cCp7ImA9WhdUFEo.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-1861823567138416564</id><published>2010-05-15T09:00:00.000-07:00</published><updated>2011-10-01T07:33:36.558-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T07:33:36.558-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Excel Application QTP GetObject CreateObject Quit Excel Application Workbooks" /><title>Quitting Excel Workbooks Using Getobject</title><content type="html">&lt;span&gt;Let’s consider that we have opened two excel workbooks using CreateObject. If you want to quit those two workbooks, try the below snippet.&lt;/span&gt;&lt;pre name="code" class="vb"&gt;Function fnc_CreateExcel&lt;br /&gt;Set objNewExcel=CreateObject("Excel.Application")&lt;br /&gt;objNewExcel.Visible=True&lt;br /&gt;objNewExcel.Workbooks.Add&lt;br /&gt;Set objNewExcel=Nothing&lt;br /&gt;End Function&lt;br /&gt;&lt;/pre&gt;&lt;pre name="code" class="vb"&gt;&lt;br /&gt;Call fnc_CreateExcel'Creating Book1&lt;br /&gt;Call fnc_CreateExcel'Creating Book2&lt;br /&gt;&lt;/pre&gt;&lt;pre name="code" class="vb"&gt;&lt;br /&gt;Call fnc_Quit_Excel("Book1")'Quitting Book 1&lt;br /&gt;Call fnc_Quit_Excel("Book2")'Quitting Book 2&lt;br /&gt;&lt;/pre&gt;&lt;pre name="code" class="vb"&gt;&lt;br /&gt;Function fnc_Quit_Excel(v_St_ExcelName)&lt;br /&gt;Set objExcel=GetObject(v_St_ExcelName).Application'Getting Excel Object using Book name&lt;br /&gt;objExcel.Quit&lt;br /&gt;Set objExcel=Nothing&lt;br /&gt;End Function&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-1861823567138416564?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OpGh3Xob3Pt1nS9uEWqLJAS_hew/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OpGh3Xob3Pt1nS9uEWqLJAS_hew/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OpGh3Xob3Pt1nS9uEWqLJAS_hew/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OpGh3Xob3Pt1nS9uEWqLJAS_hew/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/5w0i6FsztVo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/1861823567138416564/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/05/quitting-excel-workbooks-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/1861823567138416564?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/1861823567138416564?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/5w0i6FsztVo/quitting-excel-workbooks-using.html" title="Quitting Excel Workbooks Using Getobject" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/05/quitting-excel-workbooks-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EASXs-cSp7ImA9WhdbEkw.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-5670154772423739222</id><published>2010-04-30T09:35:00.000-07:00</published><updated>2011-10-09T18:54:08.559-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-09T18:54:08.559-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="QTP Bitmap Capture Bitmap Highlight Text In QTP" /><title>Capturing Bitmap When Text Is Mismatched</title><content type="html">Whenever a text in a webpage is mismatched, you may use QTP report event to report the failure.&lt;br /&gt;You can try the below snippet along with report event, the code captures and highlights the mismatched text in the webpage.&lt;pre name="code" class="vb"&gt;Set obj=Browser("name:=Google").Page("title:=Google").Object.getElementsByTagName("LABEL")(0)&lt;br /&gt;vStrActualText= obj.innerText&lt;br /&gt;vStrExpectedText="The Web"&lt;br /&gt;If vStrActualText&amp;lt;&amp;gt;vStrExpectedText Then&lt;br /&gt;obj.innerHTML="&lt;span style=""&gt;"&amp;amp;vStrActualText&amp;amp;"&lt;/span&gt;"&lt;br /&gt;Browser("name:=Google").Page("title:=Google").highlight&lt;br /&gt;Browser("name:=Google").Page("title:=Google").CaptureBitmap "C:\TEST.PNG",True&lt;br /&gt;obj.innerHTML=vStrActualText&lt;br /&gt;End If&lt;/pre&gt;&lt;span &gt;If your text is mismatched in the webpage, the script captures  bitmap of the page.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/__S-LuIngFS4/S9sHTW7dtJI/AAAAAAAAADo/nqDzEb7s5ZU/s1600/TEST.PNG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5465970601898128530" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 189px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/__S-LuIngFS4/S9sHTW7dtJI/AAAAAAAAADo/nqDzEb7s5ZU/s400/TEST.PNG" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-5670154772423739222?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r4SrfhnN18Wz_7d1YKM2aPQWezc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r4SrfhnN18Wz_7d1YKM2aPQWezc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r4SrfhnN18Wz_7d1YKM2aPQWezc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r4SrfhnN18Wz_7d1YKM2aPQWezc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/r2DY1_2Psg4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/5670154772423739222/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/04/capturing-bitmap-when-text-is.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/5670154772423739222?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/5670154772423739222?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/r2DY1_2Psg4/capturing-bitmap-when-text-is.html" title="Capturing Bitmap When Text Is Mismatched" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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://4.bp.blogspot.com/__S-LuIngFS4/S9sHTW7dtJI/AAAAAAAAADo/nqDzEb7s5ZU/s72-c/TEST.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://qtpcodes.blogspot.com/2010/04/capturing-bitmap-when-text-is.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYASXo9fip7ImA9WhdUFEU.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-2456114210813439911</id><published>2010-04-17T20:02:00.000-07:00</published><updated>2011-10-01T08:15:48.466-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T08:15:48.466-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DOM Webradiogroup DOM Radio Button Radio Button Disabled" /><title>Finding Disabled Radio Buttons</title><content type="html">&lt;span  &gt;The below snippet finds disabled radio button from a webradiogroup using DOM.&lt;/span&gt;&lt;pre name="code" class="vb"&gt;Set obj= Browser("name:=Google").Page("title:=Google").Object.getElementsByName("meta")&lt;br /&gt;For i=0 to obj.Length-1&lt;br /&gt;If obj(i).Type="radio" and obj(i).Disabled="True" Then&lt;br /&gt;Msgbox "Radio " &amp;amp;i+1&amp;amp; " is disabled" 'This msgbox indicates the disabled radio button.&lt;br /&gt;End if&lt;br /&gt;Next&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-2456114210813439911?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/e7X_mHzsdWmaOsYSjF131T6vh4o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e7X_mHzsdWmaOsYSjF131T6vh4o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/e7X_mHzsdWmaOsYSjF131T6vh4o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e7X_mHzsdWmaOsYSjF131T6vh4o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/mAe1nOkffi8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/2456114210813439911/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/04/finding-disabled-radio-buttons.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/2456114210813439911?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/2456114210813439911?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/mAe1nOkffi8/finding-disabled-radio-buttons.html" title="Finding Disabled Radio Buttons" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/04/finding-disabled-radio-buttons.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4FSHc9fSp7ImA9WhdUFEk.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-6395414940883868098</id><published>2010-04-17T19:03:00.000-07:00</published><updated>2011-09-30T21:55:19.965-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T21:55:19.965-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="QTP Screen Changing Screen Resolution Qres MultiRes" /><title>Changing Screen Resolution at Runtime</title><content type="html">&lt;span class="Apple-style-span"  &gt;&lt;span&gt;So far I have not found a code for changing screen resolution at runtime using vb script. If anyone finds that, please post it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;An alternative solution, we can go for third party tool like Qres and MultiRes. These tools can be operated using QTP at runtime.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;Download Links:&lt;/strong&gt;&lt;br /&gt;Qres: &lt;/span&gt;&lt;a href="http://home.no/aksoftware/"&gt;&lt;span&gt;http://home.no/aksoftware/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span&gt;MultiRes: &lt;/span&gt;&lt;a href="http://www.entechtaiwan.com/util/multires.shtm"&gt;&lt;span&gt;http://www.entechtaiwan.com/util/multires.shtm&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;If you know any other tool(s), please don’t hesitate to include in the comment section.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-6395414940883868098?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gScn9MhiuXTtI5ye6oGGUugsisQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gScn9MhiuXTtI5ye6oGGUugsisQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gScn9MhiuXTtI5ye6oGGUugsisQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gScn9MhiuXTtI5ye6oGGUugsisQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/Pp9N3puEpxg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/6395414940883868098/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/04/changing-screen-resolution-at-runtime.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/6395414940883868098?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/6395414940883868098?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/Pp9N3puEpxg/changing-screen-resolution-at-runtime.html" title="Changing Screen Resolution at Runtime" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/04/changing-screen-resolution-at-runtime.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUNSHczcCp7ImA9WhdUFEU.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-2904060253584261882</id><published>2010-03-30T18:03:00.000-07:00</published><updated>2011-10-01T08:18:19.988-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T08:18:19.988-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Web Table Display." /><category scheme="http://www.blogger.com/atom/ns#" term="Webtable Border" /><category scheme="http://www.blogger.com/atom/ns#" term="Webtable" /><category scheme="http://www.blogger.com/atom/ns#" term="CSS for QTP" /><title>Do You Want To View Your Web Table's Structure?</title><content type="html">&lt;span&gt;Do you want to view your web table's structure? If the answer is Yes, then try the below snippet.&lt;/span&gt;&lt;pre name="code" class="vb"&gt;Set objTable=Browser("name:=Google").Page("title:=Google").WebTable("name:=q").Object&lt;br /&gt;strTRCount=objTable.getElementsByTagName("TD").Length-1&lt;br /&gt;For i=0 to strTRCount&lt;br /&gt;objTable.getElementsByTagName("TD")(i).style.borderstyle="solid"&lt;br /&gt;objTable.getElementsByTagName("TD")(i).style.borderwidth="2px"&lt;br /&gt;objTable.getElementsByTagName("TD")(i).style.bordercolor="#98bf21"&lt;br /&gt;Next&lt;br /&gt;&lt;/pre&gt;&lt;span&gt;Try the above code with Google page, you will get the output as below.&lt;/span&gt;&lt;p&gt;&lt;a href="http://1.bp.blogspot.com/__S-LuIngFS4/S7KhIY5DQAI/AAAAAAAAADg/xT8jVcX4tE4/s1600/Img11.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5454599264191856642" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 146px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/__S-LuIngFS4/S7KhIY5DQAI/AAAAAAAAADg/xT8jVcX4tE4/s400/Img11.bmp" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Now, you are able to view all the cells of the webtable. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-2904060253584261882?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/P68W6x_yQ5jkrOUB1lxdB63sS5o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/P68W6x_yQ5jkrOUB1lxdB63sS5o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/P68W6x_yQ5jkrOUB1lxdB63sS5o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/P68W6x_yQ5jkrOUB1lxdB63sS5o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/o6YIHmy2YZw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/2904060253584261882/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/03/do-you-want-to-view-your-web-tables.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/2904060253584261882?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/2904060253584261882?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/o6YIHmy2YZw/do-you-want-to-view-your-web-tables.html" title="Do You Want To View Your Web Table's Structure?" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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/__S-LuIngFS4/S7KhIY5DQAI/AAAAAAAAADg/xT8jVcX4tE4/s72-c/Img11.bmp" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://qtpcodes.blogspot.com/2010/03/do-you-want-to-view-your-web-tables.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8DSHw5eCp7ImA9WhdUFEU.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-4507890588830187555</id><published>2010-03-27T05:29:00.000-07:00</published><updated>2011-10-01T08:27:59.220-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T08:27:59.220-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Weblist Sorting" /><category scheme="http://www.blogger.com/atom/ns#" term="Weblist" /><category scheme="http://www.blogger.com/atom/ns#" term="Array List." /><title>How To Check Elements In A Weblist Are In Alphabetical Order</title><content type="html">&lt;pre class="vb" name="code"&gt;&lt;br /&gt;arrCtry=Split(Browser("name:=QTP").Page("title:=QTP").WebList("name:=select1").GetROProperty("all items"),";")&lt;br /&gt;&lt;br /&gt;Set objArray=DotNetFactory.CreateInstance("System.Collections.ArrayList","")&lt;br /&gt;&lt;br /&gt;For i=0 to Ubound(arrCtry)&lt;br /&gt;If arrCtry(i)&lt;&gt;"--Choose One--" Then&lt;br /&gt;objArray.Add(arrCtry(i))&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;objArray.Sort()&lt;br /&gt;objArray.Insert 0,"--Choose One--"&lt;br /&gt;&lt;br /&gt;For j=0 to Ubound(arrCtry)&lt;br /&gt;strOuput=strOuput+objArray(j)&lt;br /&gt;strOuput=strOuput+";"&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;If strOuput=Browser("name:=QTP").Page("title:=QTP").WebList("name:=select1").GetROProperty("all items")+";" Then&lt;br /&gt;Msgbox "The Weblist's values are sorted in alphabetical order"&lt;br /&gt;Else&lt;br /&gt;Msgbox "The Weblist's values are not sorted in alphabetical order"&lt;br /&gt;End If&lt;br /&gt;&lt;/pre&gt;I hope the above snippet is useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-4507890588830187555?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/snlvkEm_Bv_zyE9Ca4dF_Td6ASs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/snlvkEm_Bv_zyE9Ca4dF_Td6ASs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/snlvkEm_Bv_zyE9Ca4dF_Td6ASs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/snlvkEm_Bv_zyE9Ca4dF_Td6ASs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/BH7mnJkiH08" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/4507890588830187555/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/03/how-to-check-elements-in-weblist-are-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/4507890588830187555?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/4507890588830187555?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/BH7mnJkiH08/how-to-check-elements-in-weblist-are-in.html" title="How To Check Elements In A Weblist Are In Alphabetical Order" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/03/how-to-check-elements-in-weblist-are-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYGQXg5eCp7ImA9WhdUFEU.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-4651477944659929231</id><published>2010-03-14T08:06:00.000-07:00</published><updated>2011-10-01T08:32:00.620-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T08:32:00.620-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WMI for QTP" /><category scheme="http://www.blogger.com/atom/ns#" term="Code Creator." /><category scheme="http://www.blogger.com/atom/ns#" term="WMI" /><title>Use WMI Code Creator Tool for Quick WMI Scripting</title><content type="html">&lt;span&gt;Are you searching for WMI codes? Or do you want to know about WMI classes and properties?&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;Microsoft has created an application to reduce our WMI scripting time. That is &lt;strong&gt;WMI Code Creator&lt;/strong&gt;. This is a free tool from Microsoft. You can download it from the below link,&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2cc30a64-ea15-4661-8da4-55bbc145c30e&amp;amp;displaylang=en"&gt;&lt;span style="font-size:85%;"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=2cc30a64-ea15-4661-8da4-55bbc145c30e&amp;amp;displaylang=en&lt;/span&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;This tool reduces our WMI scripting time. &lt;/span&gt;&lt;br&gt;&lt;span&gt;If anyone uses this tool, please include your comments. It may encourage QTP developers to opt this tool for quick WMI scripting.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-4651477944659929231?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/O4RxPB_aN-zcWsBcuv2gf_m-vt4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O4RxPB_aN-zcWsBcuv2gf_m-vt4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/O4RxPB_aN-zcWsBcuv2gf_m-vt4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O4RxPB_aN-zcWsBcuv2gf_m-vt4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/z3HBQqFOx0s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/4651477944659929231/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/03/use-wmi-code-creator-tool-for-quick-wmi.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/4651477944659929231?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/4651477944659929231?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/z3HBQqFOx0s/use-wmi-code-creator-tool-for-quick-wmi.html" title="Use WMI Code Creator Tool for Quick WMI Scripting" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/03/use-wmi-code-creator-tool-for-quick-wmi.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8AQH4zfCp7ImA9WhdUFEU.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-742691033314168805</id><published>2010-03-12T02:39:00.000-08:00</published><updated>2011-10-01T08:44:01.084-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T08:44:01.084-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Webedit" /><category scheme="http://www.blogger.com/atom/ns#" term="Webtable" /><category scheme="http://www.blogger.com/atom/ns#" term="ChildItem and ChildItemCount methods" /><title>Working with ChildItem and ChildItemCount methods</title><content type="html">&lt;span&gt;Consider a webtable has one row and two columns and the second column contains a webedit.&lt;/span&gt;&lt;br&gt;&lt;span&gt;If you run the below code, Exist method will be passed and the value will be set into webedit.&lt;/span&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;If obj.ChildItem(1,2,"WebEdit",0).Exist(0) Then &lt;br /&gt;obj.ChildItem(1,2,"WebEdit",0).Set "QTP"&lt;br /&gt;End If&lt;br /&gt;&lt;/pre&gt;&lt;span&gt;Suppose, if you run the code for negative condition (I.e. You are going to look for webedit in the first column where it does not exist), you will get an error as same as below.&lt;/span&gt;&lt;a href="http://1.bp.blogspot.com/__S-LuIngFS4/S5oaIfUzxAI/AAAAAAAAADA/YIyAWcIRoCg/s1600-h/3-12-2010+3-58-03+PM.png"&gt;&lt;img id="BLOGGER_PHOTO_ID_5447695432408089602" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 375px; CURSOR: hand; HEIGHT: 118px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/__S-LuIngFS4/S5oaIfUzxAI/AAAAAAAAADA/YIyAWcIRoCg/s400/3-12-2010+3-58-03+PM.png" border="0" /&gt;&lt;/a&gt;&lt;br&gt;&lt;span&gt;To avoid this problem, use ChildItemCount method instead of ChildItem for the above criteria.&lt;/span&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;If obj.ChildItemCount(1,1,"WebEdit")&gt;0 Then&lt;br /&gt;obj.ChildItem(1,1,"WebEdit",0).Set "QTP"&lt;br /&gt;End If&lt;br /&gt;&lt;/pre&gt;&lt;span&gt;Now, you do not get the error for negative case.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-742691033314168805?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1VA90H_7yIvK0rBihlQdaGgMlSk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1VA90H_7yIvK0rBihlQdaGgMlSk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1VA90H_7yIvK0rBihlQdaGgMlSk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1VA90H_7yIvK0rBihlQdaGgMlSk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/ifMRVk47ago" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/742691033314168805/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/03/working-with-childitem-and.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/742691033314168805?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/742691033314168805?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/ifMRVk47ago/working-with-childitem-and.html" title="Working with ChildItem and ChildItemCount methods" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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/__S-LuIngFS4/S5oaIfUzxAI/AAAAAAAAADA/YIyAWcIRoCg/s72-c/3-12-2010+3-58-03+PM.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://qtpcodes.blogspot.com/2010/03/working-with-childitem-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMBQHY7fip7ImA9WhdUFEU.&quot;"><id>tag:blogger.com,1999:blog-4461730588425548224.post-713895487948311709</id><published>2010-02-23T23:23:00.000-08:00</published><updated>2011-10-01T08:54:11.806-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-01T08:54:11.806-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Random Test Data" /><category scheme="http://www.blogger.com/atom/ns#" term="Random Strings" /><category scheme="http://www.blogger.com/atom/ns#" term="GUID" /><title>Generating Random Data</title><content type="html">&lt;span&gt;Do you want to generate random data for your test? Try the below methods.&lt;/span&gt;&lt;br&gt;&lt;span&gt;&lt;b&gt;&lt;i&gt;Method #1:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Set objRandm = CreateObject("Scriptlet.TypeLib")&lt;br /&gt;strGUID = objRandm.Guid&lt;br /&gt;Msgbox strGUID&lt;/pre&gt;&lt;br&gt;&lt;span&gt;&lt;b&gt;&lt;i&gt;Method #2:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Set oGuid=DotNetFactory.CreateInstance("System.Guid","mscorlib")&lt;br /&gt;Set oConvert=DotNetFactory.CreateInstance("System.Convert","mscorlib")&lt;br /&gt;&lt;br /&gt;temp= oConvert.ToBase64String(oGuid.NewGuid().ToByteArray())&lt;br /&gt;temp=Left(temp,22)&lt;br /&gt;temp=Replace(temp,"/", "_")&lt;br /&gt;strRandm=Replace(temp,"+", "-")&lt;br /&gt;Msgbox strRandm&lt;br /&gt;&lt;/pre&gt;&lt;span&gt;This method is as same as previous one, but length of the string is shorter.&lt;/span&gt;&lt;br&gt;&lt;span&gt;&lt;b&gt;&lt;i&gt;Method #3:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;pre class="vb" name="code"&gt;&lt;br /&gt;Msgbox hex(( ( (timer+rnd(1)) *100) + int(rnd(1)*16)*&amp;hf0000 ) mod &amp;h100000 )&lt;br /&gt;&lt;/pre&gt;&lt;span&gt;The above code generates semi-unique random strings.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4461730588425548224-713895487948311709?l=qtpcodes.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/EnkzCgAmB1hXC6rJU-dLfOhC6jQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EnkzCgAmB1hXC6rJU-dLfOhC6jQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/EnkzCgAmB1hXC6rJU-dLfOhC6jQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EnkzCgAmB1hXC6rJU-dLfOhC6jQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/QtpCodes-QuickTestProfessional/~4/1W1zr86jA0I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://qtpcodes.blogspot.com/feeds/713895487948311709/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://qtpcodes.blogspot.com/2010/02/generating-random-data.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/713895487948311709?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4461730588425548224/posts/default/713895487948311709?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/QtpCodes-QuickTestProfessional/~3/1W1zr86jA0I/generating-random-data.html" title="Generating Random Data" /><author><name>Asiq Ahamed</name><uri>http://www.blogger.com/profile/10131060151146448324</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><feedburner:origLink>http://qtpcodes.blogspot.com/2010/02/generating-random-data.html</feedburner:origLink></entry></feed>

