<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5169168605742060581</id><updated>2024-09-07T19:30:18.732-07:00</updated><category term="QTP - Excel"/><title type='text'>Requirements on testing, Certifications on QTP, QC, BPT &amp;amp; Automation Framewor information.</title><subtitle type='html'>Requirements on testing, QTP, QC, BPT and Automation frameworks information.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-4615251324568726611</id><published>2011-11-20T21:59:00.000-08:00</published><updated>2011-11-20T21:59:18.606-08:00</updated><title type='text'>Flex:- Function for selecting the item from the spark dropdown list.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;*******************************************************************************************************************************&lt;br /&gt;
&#39; Name: Fun_SelectDropdownListValue&lt;br /&gt;
&#39; Purpose: This function is used for selecting the item from the spark dropdown list&lt;br /&gt;
&#39; Argument(s):&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_ObjDropDown: Object under the test EX: SparkDropDownList&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strDropdownName: Name of the dropdown ex:Merchandise &lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strSelectableItemValue: Value to be selected from the dropdown. Ex: All Mdse&lt;br /&gt;
&#39; Returns:&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1: If expected value is found under the dropdown&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0: If expected value is NOT found under the dropdown&lt;br /&gt;
&#39; Example: Call Fun_SelectDropdownListValue(objDropdown, &quot;Merchandise&quot;, &quot;All Mdse&quot;)&lt;br /&gt;
&#39;------------------------------------------------------------------------------------------------------------*******************************************************************************************************************************&lt;br /&gt;
Public Function Fun_SelectDropdownListValue(ByRef ip_ObjDropDown, ip_strDropdownName, ip_strSelectableItemValue)&lt;br /&gt;
&amp;nbsp;Dim objDicListIndex, intTotalItemCnt, blnScrollBarExists, intMaxScrollValue, intCurrentScrollPoint&lt;br /&gt;
&amp;nbsp;Dim objSparkListLabelDescr, objSparkListLabelDescrChild&lt;br /&gt;
&amp;nbsp;Dim intChildIndex, strListLabel&lt;br /&gt;
&amp;nbsp;Set objDicListIndex = CreateObject(&quot;Scripting.Dictionary&quot;)&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Validate the current selection before making a new selection &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;strListLabel = ip_ObjDropDown.GetROProperty(&quot;selecteditem&quot;)&lt;br /&gt;
&amp;nbsp;If Trim(strListLabel) = Trim(ip_strSelectableItemValue) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_SelectDropdownListValue = 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;End If&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;Get the total items under the list&lt;br /&gt;
&amp;nbsp;intTotalItemCnt = ip_ObjDropDown.GetItemsCount&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Get the maximum possible scroll point based on the existence of scroll bar object &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;ip_ObjDropDown.Open&lt;br /&gt;
&amp;nbsp;Wait 2&lt;br /&gt;
&amp;nbsp;If ip_ObjDropdown.SparkScrollBar(&quot;verticalScrollBar&quot;).Exist(2) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;blnScrollBarExists = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intMaxScrollValue = ip_ObjDropDown.SparkScrollBar(&quot;verticalScrollBar&quot;).GetROProperty(&quot;maximum&quot;)&lt;br /&gt;
&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;blnScrollBarExists = False&lt;br /&gt;
&amp;nbsp;&amp;nbsp;intMaxScrollValue = 0&lt;br /&gt;
&amp;nbsp;End If&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Get all child objects of type SparkListLabel &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;Set objSparkListLabelDescr = Description.Create()&lt;br /&gt;
&amp;nbsp;objSparkListLabelDescr(&quot;automationclassname&quot;).Value = &quot;SparkListLabel&quot; &lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Extract all child objects until the maximum scroll point is reached &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;Do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Move the scroll bar based on the child objects extracted within the loop &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If blnScrollBarExists = True Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;intCurrentScrollPoint = 20 * objDicListIndex.Count&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_ObjDropDown.SparkScrollBar(&quot;verticalScrollBar&quot;).Change intCurrentScrollPoint&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Wait 2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;intCurrentScrollPoint = 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Get child objects &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set objSparkListLabelDescrChild = ip_ObjDropDown.ChildObjects(objSparkListLabelDescr)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Fill the dictionary object based on the child objects extracted &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;For intChildIndex = 0 To objSparkListLabelDescrChild.Count -1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;strListLabel = objSparkListLabelDescrChild(intChildIndex).GetROProperty(&quot;label&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(strListLabel) = Trim(ip_strSelectableItemValue) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objSparkListLabelDescrChild(intChildIndex).Click&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_SelectDropdownListValue = 1 &#39;Indicates success&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;ElseIf Not objDicListIndex.Exists(Trim(strListLabel)) And Trim(strListLabel) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objDicListIndex.Add Trim(strListLabel), objDicListIndex.Count&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Exit the Loop on scroll bar reaching the maximum end point &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If intCurrentScrollPoint &amp;gt; intMaxScrollValue Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;Loop&amp;nbsp; &lt;br /&gt;
&amp;nbsp;subJCP_EventReport &quot;Fail&quot;, &quot;Unable to find item as: &quot; &amp;amp; ip_strSelectableItemValue &amp;amp; &quot; under the given dropdown: &quot; &amp;amp; ip_strDropdownName, Browser(&quot;FlexApp&quot;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;Fun_SelectDropdownListValue = 0 &#39;Indicates failure&lt;br /&gt;
End Function&lt;br /&gt;
&#39;&amp;lt;&amp;lt;&amp;lt; ---------- Register this function to the SparkDropdownList object ----------- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
RegisterUserFunc &quot;SparkDropDownList&quot;, &quot;Fun_SelectDropdownListValue&quot;, &quot;Fun_SelectDropdownListValue&quot;&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Example:-&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
returnValue = .SparkDropDownList(&quot;timeDropDown&quot;).Fun_SelectDropdownListValue(&quot;Time&quot;, &quot;Custom...&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Cstr(returnValue) &amp;lt;&amp;gt; &quot;1&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExitComponentIteration&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/4615251324568726611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/11/flex-function-for-selecting-item-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/4615251324568726611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/4615251324568726611'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/11/flex-function-for-selecting-item-from.html' title='Flex:- Function for selecting the item from the spark dropdown list.'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-4208938776391657093</id><published>2011-11-20T21:24:00.000-08:00</published><updated>2011-11-20T21:24:16.209-08:00</updated><title type='text'>QTP -&gt; Function for providing the synch to the application object</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;*******************************************************************************************************************************&lt;br /&gt;
&#39; Name: Fun_SynchObjectToAppear&lt;br /&gt;
&#39; Purpose: This function is used for providing the synch to the application object&lt;br /&gt;
&#39; Argument(s): &lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_obj: Object under the test EX: SparkDropDownList&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_intStartTime: Start time from which the max wait time&amp;nbsp; is evaluated. Ex: Timer value at the time of calling this function&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_intWaitTimeInSec: Maximum wait time for object to appaer in the application and get visible&lt;br /&gt;
&#39; Returns: &lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NON Zero Value: Indicates that the object is appeared on the screen and is visible.&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;0 Indicates that the object is not available under the application after waiting for the given max wait time. &amp;nbsp;&lt;br /&gt;
&#39; Example: returnValue = Fun_SynchObjectToAppear(objSparkApplication, Timer, &quot;360&quot;)&lt;br /&gt;
&#39;------------------------------------------------------------------------------------------------------------&lt;br /&gt;
*******************************************************************************************************************************&lt;br /&gt;
Public Function Fun_SynchObjectToAppear(ByRef ip_Obj, ip_intStartTime, ip_intWaitTimeInSec)&lt;br /&gt;
&amp;nbsp;Dim blnObjectLoaded, intStartTime, intEndTime&lt;br /&gt;
&amp;nbsp;blnObjectLoaded = False &#39;Set the flag to false to indicate that the object is not loaded&lt;br /&gt;
&amp;nbsp;intStartTime = ip_intStartTime &#39;Start tiem is set as the passed argument value&lt;br /&gt;
&amp;nbsp;Do &lt;br /&gt;
&amp;nbsp;&amp;nbsp;If ip_Obj.Exist(1) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If CStr(ip_Obj.GetRoProperty(&quot;visible&quot;)) = &quot;True&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;blnObjectLoaded = True &#39;Reset the flag to indicate that the object is appeared on the application&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Do &#39;Exit the loop if the expected object is exists and is visible in the application&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;intEndTime = Timer &#39;Set the current time as end time&lt;br /&gt;
&amp;nbsp;Loop Until intEndTime &amp;gt; intStartTime + ip_intWaitTimeInSec &#39;Break the loop if the end time reached as more than the max wait time&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Report the report based upon the load event on the tab selection &amp;gt;&amp;gt;&amp;gt; &lt;br /&gt;
&amp;nbsp;If blnObjectLoaded = True Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_SynchObjectToAppear = (intEndTime - ip_intStartTime)/60 &#39;Return the total time taken in minutes as a return value&lt;br /&gt;
&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_SynchObjectToAppear = &quot;0&quot; &#39;Return ZERO to indicate that the object is not appeared on the screen&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
&#39;&amp;lt;&amp;lt;&amp;lt; ---------- Function registration----------- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
RegisterUserFunc &quot;SparkDropDownList&quot;, &quot;Fun_SynchObjectToAppear&quot;, &quot;Fun_SynchObjectToAppear&quot;&lt;br /&gt;
RegisterUserFunc &quot;SparkTextInput&quot;, &quot;Fun_SynchObjectToAppear&quot;, &quot;Fun_SynchObjectToAppear&quot;&lt;br /&gt;
RegisterUserFunc &quot;SparkCheckBox&quot;, &quot;Fun_SynchObjectToAppear&quot;, &quot;Fun_SynchObjectToAppear&quot;&lt;br /&gt;
RegisterUserFunc &quot;SparkButton&quot;, &quot;Fun_SynchObjectToAppear&quot;, &quot;Fun_SynchObjectToAppear&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Example : -&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Synch provided until the filter object gets displayed in the application &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;Set objSparkApplication = Browser(&quot;FlexApp&quot;).FlexApplication(&quot;app&quot;).SparkApplication(&quot;erfr-flex-gui.swf&quot;).SparkSkinnableContainer(&quot;showHidePane&quot;).SparkButton(&quot;Filters&quot;)&lt;br /&gt;
&amp;nbsp;intWaitTimeInSec = intConstWaitShort * 60&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Calling user defined function for providing application object synchronization &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;returnValue = Fun_SynchObjectToAppear(objSparkApplication, Timer, intWaitTimeInSec) &lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/4208938776391657093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/11/qtp-function-for-providing-synch-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/4208938776391657093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/4208938776391657093'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/11/qtp-function-for-providing-synch-to.html' title='QTP -&gt; Function for providing the synch to the application object'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-567048088088915315</id><published>2011-11-20T21:18:00.000-08:00</published><updated>2011-11-20T21:18:59.932-08:00</updated><title type='text'>QC-&gt; Code to get the user id and Password from QC resources tab</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;Preconditions: -&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
You need to upload a excel sheet in the QC resources tab, as below:&lt;br /&gt;
&lt;br /&gt;
Key&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;br /&gt;
UID&amp;nbsp;&amp;nbsp; naresh&lt;br /&gt;
PWD XXXX&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;**********************************************************************************************************************&lt;br /&gt;
&#39;Name:&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_GetCredentials&lt;br /&gt;
&#39;Purpose:&amp;nbsp;&amp;nbsp;This function will get the credential details from the QC resource&lt;br /&gt;
&#39;Argument(s):&amp;nbsp;ip_intResourceId: Resource ID of the item&lt;br /&gt;
&#39;Returns:&amp;nbsp;&amp;nbsp;0: Indicates failure&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Credential details as: UserID|Password&lt;br /&gt;
&#39;Example:&amp;nbsp;returnValue = Fun_GetCredentials(&quot;1055&quot;)&lt;br /&gt;
&#39;---------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&#39;Revised:&lt;br /&gt;
&#39;Revised by:&lt;br /&gt;
&#39;Changes:&lt;br /&gt;
&#39; **********************************************************************************************************************&lt;br /&gt;
Function Fun_GetCredentials(ip_intResourceId)&lt;br /&gt;
&amp;nbsp;Dim objQCResource, objDataSheet, intDSRowCnt, intDSRowIndex, strUserID, strPwd&lt;br /&gt;
&amp;nbsp;On Error Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Get the resource object from QC with resource id as ip_intResourceId&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set objQCResource = QCUtil.QCConnection.QCResourceFactory.Item(ip_intResourceId)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Download the resource file into the result directory&lt;br /&gt;
&amp;nbsp;&amp;nbsp;objQCResource.DownloadResource Environment(&quot;ResultDir&quot;), True&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Get the sheet 1 of resource file from result directory into the design time datatable at sheet 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;DataTable.ImportSheet Environment(&quot;ResultDir&quot;) &amp;amp; &quot;\&quot; &amp;amp; objQCResource.Filename, 1, 1&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Get the object Datasheet from the design time datatable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set objDataSheet = DataTable.GetSheet(1)&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;intDSRowCnt = objDataSheet.GetRowCount&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Loop for each row and validate the Key column, based on key value get value column value&lt;br /&gt;
&amp;nbsp;&amp;nbsp;For intDSRowIndex = 1 To intDSRowCnt&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;objDataSheet.SetCurrentRow(intDSRowIndex)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Select Case UCase(Trim(DataTable.Value(intConstKeyColIndex, 1)))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Case &quot;UID&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strUserID = Trim(DataTable.Value(intConstValueColIndex, 1))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Case &quot;PWD&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strPwd = Trim(DataTable.Value(intConstValueColIndex, 1))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End Select&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Set the return value&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Trim(strUserID) &amp;lt;&amp;gt; &quot;&quot; And Trim(strPwd) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_GetCredentials = strUserID &amp;amp; &quot;|&quot; &amp;amp; strPwd&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_GetCredentials = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;subJCP_EventReport &quot;Fail&quot;, &quot;Required credential details are not found. &quot; &amp;amp; VBNewLine &amp;amp; &quot;User ID = &quot; &amp;amp; strUserID &amp;amp; VBNewLine &amp;amp; &quot;Password = &quot; &amp;amp; strPwd, Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;If unexpected error is reported here &lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Trim(CStr(Err.Description)) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_GetCredentials = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;subJCP_EventReport &quot;Fail&quot;, &quot;Unable to get login credentials. Error: &quot; &amp;amp; Err.Description &amp;amp; VBNewLine &amp;amp;&amp;nbsp; Err.source, Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;On Error GoTo 0&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;Delocate the reference&lt;br /&gt;
&amp;nbsp;Set objQCResource = Nothing&lt;br /&gt;
&amp;nbsp;Set objDataSheet = Nothing&lt;br /&gt;
End Function&lt;br /&gt;
**********************************************************************&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Then use the below function like : &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example: - &lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; ---- If Credential pop up is loaded, get the JCP credentials from the Datatable () :Begins ----&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If Browser(&quot;FlexApp&quot;).Dialog(&quot;Credential Popup&quot;).Exist(intConstWaitShort) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;returnValue = Fun_GetCredentials(&quot;1035&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Trim(CStr(returnValue)) = &quot;0&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;ExitComponentIteration&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;arrCredentials = Split(returnValue, &quot;|&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Browser(&quot;FlexApp&quot;).Dialog(&quot;Credential Popup&quot;).WinEdit(&quot;User name:&quot;).Set arrCredentials(0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Browser(&quot;FlexApp&quot;).Dialog(&quot;Credential Popup&quot;).WinEdit(&quot;Password:&quot;).Set arrCredentials(1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Browser(&quot;FlexApp&quot;).Dialog(&quot;Credential Popup&quot;).WinButton(&quot;OK&quot;).Click&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; --- If Credential pop up is loaded, get the JCP credentials from the Datatable () :Ends -------&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/567048088088915315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/11/qc-code-to-get-user-id-and-password.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/567048088088915315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/567048088088915315'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/11/qc-code-to-get-user-id-and-password.html' title='QC-&gt; Code to get the user id and Password from QC resources tab'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-621116177178360690</id><published>2011-09-09T04:40:00.000-07:00</published><updated>2011-09-09T04:40:14.235-07:00</updated><title type='text'>QTP &amp; QC-&gt;Code for function validate the displayed Error pop up</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;Function Name -------- Fun_ValidateExpectedPopUp(ip_strExpectPopUpDetails)&lt;br /&gt;
&#39;Description ------------ Use this function validate the displayed Error pop up&lt;br /&gt;
&#39;Parameters ----------- ip_strExpectPopUpDetails : EX: Y|Invalid Date|OK or N|NO Message&lt;br /&gt;
&#39;Return Value --------- &lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1: Indicates expected pop up is displayed (Need to exit the component on this event)&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1: Indicates expected pop up is not displayed (Need to exit the component on this event)&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1: Unexpectedly pop up is displayed (Need to exit the component on this event)&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0: Unexpected pop up is not displayed (Need not to exit the component on this event)&lt;br /&gt;
&#39;Example -------------- Call Fun_ValidateExpectedPopUp(ip_strExpectPopUpDetails)&lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Function Fun_ValidateExpectedPopUp(ip_strExpectPopUpDetails)&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Local variable declaration &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;Dim arrErrorMessageDetails, strErrorMsg, blnFlag&lt;br /&gt;
&amp;nbsp;Fun_ValidateExpectedPopUp = &quot;1&quot; &#39;&lt;br /&gt;
&amp;nbsp;arrErrorMessageDetails = Split(ip_strExpectPopUpDetails, &quot;|&quot;)&lt;br /&gt;
&amp;nbsp;If UCase(arrErrorMessageDetails(0)) = &quot;Y&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If Browser(&quot;Browser Main&quot;).Window(&quot;-- Web Page Dialog&quot;).Exist(intConstMidWaitTime) Or _&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Browser(&quot;Browser Main&quot;).Dialog(&quot;Message from webpage&quot;).Exist(intConstMidWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Expected Pop Up expectedly displayed =&amp;gt; Success &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Validating the error message &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strErrorMsg = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Browser(&quot;Browser Main&quot;).Window(&quot;-- Web Page Dialog&quot;).Page(&quot;Page&quot;).WebElement(&quot;WebTable&quot;).Exist(intConstShortWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strErrorMsg = Browser(&quot;Browser Main&quot;).Window(&quot;-- Web Page Dialog&quot;).Page(&quot;Page&quot;).WebElement(&quot;WebTable&quot;).GetROProperty(&quot;innertext&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ElseIf Browser(&quot;Browser Main&quot;).Dialog(&quot;Message from webpage&quot;).Static(&quot;Please&quot;).Exist(intConstShortWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strErrorMsg =Browser(&quot;Browser Main&quot;).Dialog(&quot;Message from webpage&quot;).Static(&quot;Please&quot;).GetROProperty(&quot;text&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Instr(strErrorMsg, arrErrorMessageDetails(1)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Expected error message is displayed &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportSuccess &quot;Validate the pop up Message&quot;, &quot;Expected Pop up message is displayed on the pop up Message as:&quot; &amp;amp; VBNewline &amp;amp; strErrorMsg&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Expected error message is not displayed &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Validate the pop up Message&quot;, &quot;Expected Pop up message is not displayed on the pop up message as:&quot; &amp;amp; VBNewline &amp;amp; arrErrorMessageDetails(1) &amp;amp; VBNewline &amp;amp; &quot;Instead it is displayed as:&quot; &amp;amp; VBNewline &amp;amp; strErrorMsg, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Expected Pop Up unexpectedly not displayed=&amp;gt; Failure &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Expected Pop up Validation&quot;, &quot;Expected pop up not displayed.&quot;, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If Browser(&quot;Browser Main&quot;).Window(&quot;-- Web Page Dialog&quot;).Exist(intConstShortWaitTime) Or _&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Browser(&quot;Browser Main&quot;).Dialog(&quot;Message from webpage&quot;).Exist(intConstShortWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strErrorMsg = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Browser(&quot;Browser Main&quot;).Window(&quot;-- Web Page Dialog&quot;).Page(&quot;Page&quot;).WebElement(&quot;WebTable&quot;).Exist(intConstShortWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strErrorMsg = Browser(&quot;Browser Main&quot;).Window(&quot;-- Web Page Dialog&quot;).Page(&quot;Page&quot;).WebElement(&quot;WebTable&quot;).GetROProperty(&quot;innertext&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ElseIf Browser(&quot;Browser Main&quot;).Dialog(&quot;Message from webpage&quot;).Static(&quot;Please&quot;).Exist(intConstShortWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strErrorMsg =Browser(&quot;Browser Main&quot;).Dialog(&quot;Message from webpage&quot;).Static(&quot;Please&quot;).GetROProperty(&quot;text&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Unexpected Pop Up unexpectedly displayed =&amp;gt; Failure &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Unexpected Pop up Validation&quot;, &quot;Unexpected pop up is displayed with text as:&quot; &amp;amp; VBNewLine &amp;amp; strErrorMsg, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Unexpected Pop Up expectedly not displayed=&amp;gt; Success &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportSuccess &quot;Unexpected Pop up Validation&quot;, &quot;No pop ups displayed as expected.&quot;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ValidateExpectedPopUp = &quot;0&quot;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp;If Browser(&quot;Browser Main&quot;).Window(&quot;-- Web Page Dialog&quot;).Exist(intConstShortWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Browser(&quot;Browser Main&quot;).Window(&quot;-- Web Page Dialog&quot;).Close&lt;br /&gt;
&amp;nbsp;ElseIf Browser(&quot;Browser Main&quot;).Dialog(&quot;Message from webpage&quot;).Exist(intConstShortWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Browser(&quot;Browser Main&quot;).Dialog(&quot;Message from webpage&quot;).Close&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;SubRoutine Name -------- sub_popUpValidate(ip_ExpectPopUp)&lt;br /&gt;
&#39;Description ------------ Use this sub routine to call the eexpected pop up funtion and handling the pop up message&lt;br /&gt;
&#39;Author ----------------- Naresh gupta &lt;br /&gt;
&#39;Parameters ----------- ip_ExpectPopUp : EX: Parameter(&quot;p_SC_CSS_ExpectPopUp&quot;)&lt;br /&gt;
&#39;Return Value --------- NA&lt;br /&gt;
&#39;Registerd To ---------- NA&lt;br /&gt;
&#39;Base Project ---------- EFAS&lt;br /&gt;
&#39;Example -------------- Call sub_popUpValidate(Parameter(&quot;p_SC_CSS_ExpectPopUp&quot;))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Sub sub_popUpValidate(ip_strExpectPopUp)&lt;br /&gt;
&amp;nbsp;Dim returnVal&lt;br /&gt;
&amp;nbsp;returnVal = Fun_ValidateExpectedPopUp(ip_strExpectPopUp)&lt;br /&gt;
&amp;nbsp;If Cstr(returnVal) = &quot;1&quot;&amp;nbsp; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ExitComponentIteration&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Sub&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/621116177178360690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-validate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/621116177178360690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/621116177178360690'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-validate.html' title='QTP &amp; QC-&gt;Code for function validate the displayed Error pop up'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-6074616482940244416</id><published>2011-09-09T04:36:00.000-07:00</published><updated>2011-09-09T04:36:23.768-07:00</updated><title type='text'>JAVA Addin-&gt;Code for function used for java table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; funGetColumnNumberFromJavaTable&lt;br /&gt;
&#39;Purpose :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This function will return the column number from the JAVA Table based on the column name passed&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objTable: Object Table&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_strExpectedColName: Expected column Name&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_intStartColNum: Start index from this point search for the expected column will start&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_blnIsRelativeComparison: Pass this parameter as False if column name is to be matched with exact column header &lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else pass as True for relative compartison&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;&quot;: If Expected column is not found&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnValue = funGetColumnNumberFromJavaTable(objLeftGrid, &quot;Item&quot;, 0, False)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function funGetColumnNumberFromJavaTable(ByRef ip_objTable, ip_strExpectedColName, ip_intStartColNum, ip_blnIsRelativeComparison)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Default Return value is set as empty &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;funGetColumnNumberFromJavaTable = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp;Dim intColCnt, intColIndex, strColName&lt;br /&gt;
&amp;nbsp;intColCnt = ip_objTable.GetROProperty(&quot;cols&quot;)&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Extract the cell value from given row number starting from the mentioned start index for column &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;For intColIndex = ip_intStartColNum To intColCnt - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;strColName = ip_objTable.GetColumnName(intColIndex)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Using Instr function for relative comparison based upon the flag value passed &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If ip_blnIsRelativeComparison = True Then&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If Instr(UCase(Trim(strColName)),UCase(Trim(ip_strExpectedColName))) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;funGetColumnNumberFromJavaTable = intColIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If UCase(Trim(strColName)) = UCase(Trim(ip_strExpectedColName)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;funGetColumnNumberFromJavaTable = intColIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; Fun_ExpandJavaTable&lt;br /&gt;
&#39;Purpose :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This function will exapnd the grid based on the value cell details passed&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objTable: Object Table&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0: If succeeded&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1: If Fails&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnValue = Fun_ExpandJavaTable(objLeftGrid)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function Fun_ExpandJavaTable(ByRef ip_objTable)&lt;br /&gt;
&amp;nbsp;Dim intExpandableColNum, strExpandableColName&lt;br /&gt;
&amp;nbsp;Fun_ExpandJavaTable = 0 &#39;indicates success&lt;br /&gt;
&amp;nbsp;intExpandableColNum = funGetColumnNumberFromJavaTable(ip_objTable, &quot;(+)&quot;, 0, False)&lt;br /&gt;
&amp;nbsp;If Trim(CStr(intExpandableColNum)) = &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Expandworklist grid&quot;, &quot;Unable to find the expandable column with name as (+)&quot;, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ExpandJavaTable = 1 &#39;indicates failure&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;strExpandableColName = ip_objTable.GetColumnName(intExpandableColNum)&lt;br /&gt;
&amp;nbsp;ip_objTable.SelectColumnHeader strExpandableColName&lt;br /&gt;
&amp;nbsp;Wait intConstShortWaitTime&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;intExpandableColNum = funGetColumnNumberFromJavaTable(ip_objTable, &quot;(-)&quot;, 0, False)&lt;br /&gt;
&amp;nbsp;If Trim(CStr(intExpandableColNum)) = &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Expandworklist grid&quot;, &quot;Unable to expand the java table&quot;, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ExpandJavaTable = 1 &#39;indicates failure&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_GetLotRowNumberWithDetails&lt;br /&gt;
&#39;Purpose :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This function will return the expected lot under the javatable&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objGridLeftGrid: Object Left Table which contains Item Lot information&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_objGridRightGrid: Object Right Table which contains Item details information&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strItemNum: Expected Item Number EX: 5889550&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strLineNum: Expected Line Number under the given lot EX: 0108&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strColNameCollection: Column name details EX: &quot;SSC#|Whse PO #| Engine Status&quot;&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strColValueCollection: Expected value collection: &quot;258|9564|Running&quot;&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;&quot;: If Fails&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ROw number: If succeeds in finding a row&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnValue = fun_GetLotRowNumberWithDetails(objLeftGrid, objRightGrid, &quot;5889550&quot;, &quot;0108&quot;, &quot;SSC#|Whse PO #| Engine Status&quot;, &quot;258|9564|Running&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function fun_GetLotRowNumberWithDetails(ip_objGridLeftGrid,ip_objGridRightGrid, ip_strItemNum, ip_strLineNum, ip_strColNameCollection, ip_strColValueCollection)&lt;br /&gt;
&amp;nbsp;Dim arrColNameCollection, arrValueCollection, intExpectedColIndex, intRowCount, intRowIndex&lt;br /&gt;
&amp;nbsp;Dim blnDetailsMatched, intDetailsIndex, strActualValue, strLineValue, intItemColNum&lt;br /&gt;
&amp;nbsp;Dim arrColNumCollection &lt;br /&gt;
&amp;nbsp;Dim intFindItemNumIndex, strItemNum&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp;fun_GetLotRowNumberWithDetails = &quot;&quot; &#39;indicates failure&lt;br /&gt;
&amp;nbsp;intItemColNum = funGetColumnNumberFromJavaTable(ip_objGridLeftGrid, &quot;Item&quot;, 0, False)&lt;br /&gt;
&amp;nbsp;If Trim(intItemColNum) = &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Find Columns&quot;, &quot;Unable to find the column with name as Item&quot;, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;fun_GetLotRowNumberWithDetails = &quot;&quot; &#39;indicates failure&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;arrColNameCollection = Split(ip_strColNameCollection, &quot;|&quot;)&lt;br /&gt;
&amp;nbsp;arrValueCollection = Split(ip_strColValueCollection, &quot;|&quot;)&lt;br /&gt;
&amp;nbsp;ReDim arrColNumCollection(UBound(arrColNameCollection))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;For intExpectedColIndex = 0 To UBound(arrColNameCollection)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;arrColNumCollection(intExpectedColIndex) = funGetColumnNumberFromJavaTable(ip_objGridRightGrid, Trim(arrColNameCollection(intExpectedColIndex)), 0, False)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Trim(arrColNumCollection(intExpectedColIndex)) = &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Find Columns&quot;, &quot;Unable to find the column with name as:&quot; &amp;amp; arrColNameCollection(intExpectedColIndex), Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_GetLotRowNumberWithDetails = &quot;&quot; &#39;indicates failure&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;intRowCount = ip_objGridLeftGrid.GetROProperty(&quot;rows&quot;)&lt;br /&gt;
&amp;nbsp;For intRowIndex = 0 To intRowCount - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;blnDetailsMatched = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;For intDetailsIndex = 0 To UBound(arrValueCollection)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strActualValue = ip_objGridRightGrid.GetCellData(intRowIndex, arrColNumCollection(intDetailsIndex))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Select Case UCase(Trim(arrValueCollection(intDetailsIndex)))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Case &quot;BLANK&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(strActualValue) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;blnDetailsMatched = False&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Case &quot;NON BLANK&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(strActualValue) = &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;blnDetailsMatched = False&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Case Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(strActualValue) &amp;lt;&amp;gt; Trim(arrValueCollection(intDetailsIndex)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;blnDetailsMatched = False&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Select&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If blnDetailsMatched = True Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strLineValue = ip_objGridLeftGrid.GetCellData(intRowIndex, intItemColNum)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(strLineValue) = Trim(ip_strLineNum) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For intFindItemNumIndex = intRowIndex - 1 To 0 Step -1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strItemNum = Trim(ip_objGridLeftGrid.GetCellData(intFindItemNumIndex, intItemColNum))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Len(strItemNum) = 7 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(strItemNum) = Trim(ip_strItemNum) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_GetLotRowNumberWithDetails = intFindItemNumIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_GetLotRowNumberWithoutDetails&lt;br /&gt;
&#39;Purpose :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This function will return the expected lot under the javatable&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objLeftGrid: Object Left Table which contains Item Lot information&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strItemNum: Expected Item Number EX: 5889550&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strLineNum: Expected Line Number under the given lot EX: 0108&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;&quot;: If Fails&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ROw number: If succeeds in finding a row&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnValue = fun_GetLotRowNumberWithoutDetails(objLeftGrid, &quot;5889550&quot;, &quot;0108&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function fun_GetLotRowNumberWithoutDetails(ip_objLeftGrid, ip_strItemNum, ip_strLineNum)&lt;br /&gt;
&amp;nbsp;Dim intRowCount, intItemColNum, intRowIndex, strLineValue, intFindItemNumIndex, strItemNum&lt;br /&gt;
&amp;nbsp;fun_GetLotRowNumberWithoutDetails = &quot;&quot;&lt;br /&gt;
&amp;nbsp;intRowCount = ip_objLeftGrid.GetROProperty(&quot;rows&quot;)&lt;br /&gt;
&amp;nbsp;intItemColNum = funGetColumnNumberFromJavaTable(ip_objLeftGrid, &quot;Item&quot;, 0, False)&lt;br /&gt;
&amp;nbsp;If Trim(Cstr(intItemColNum)) = &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Validate Item column&quot;, &quot;Unable to find column with name Item&quot;, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;fun_GetLotRowNumberWithoutDetails = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;For intRowIndex = 0 To intRowCount - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;strLineValue = ip_objLeftGrid.GetCellData(intRowIndex, intItemColNum)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Trim(strLineValue) = Trim(ip_strLineNum) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For intFindItemNumIndex = intRowIndex - 1 To 0 Step -1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strItemNum = Trim(ip_objLeftGrid.GetCellData(intFindItemNumIndex, intItemColNum))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Len(strItemNum) = 7 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(strItemNum) = Trim(ip_strItemNum) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_GetLotRowNumberWithoutDetails = intFindItemNumIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&amp;nbsp; &lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; Fun_SelectingRows&lt;br /&gt;
&#39;Purpose :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This Function will Select Rows depending on Line Item,Lot Number,Warehouse Number, Source DI&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objLeftGrid: Object Left Table which contains Item Lot information&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_objRightGrid: Object Right Table which contains Source DI and WarehouseDetails&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strItemsToBeSelected: Expected Item Numbers to be selected EX: &quot;5230304|L|2965&quot;&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strSourceDI: Expected Source DI numbers to be Selected EX: &quot;77793247-00&quot;&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;&quot;: If Fails&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ROw number: If succeeds in finding a row&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fun_SelectingRows = fun_GetLotRowNumberWithoutDetails(objLeftGrid,ip_objRightGrid, &quot;5230304##9764|L|2965&quot;, &quot;77793247-00&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Function Fun_SelectingRows(ByRef ip_objLeftGrid, ByRef ip_objRightGrid, ip_strItemsToBeSelected, ip_strSourceDI)&lt;br /&gt;
&amp;nbsp;Dim strMatchedRowCollection,arrSourceDINumCollection,intItemIndex,arrItemCollection,arrItemDetails&lt;br /&gt;
&amp;nbsp;Dim arrItemWarehouseDetails,intTryIndex,strUpdatedSourceDIValue,intMatchedRow,arrSourceDI&lt;br /&gt;
&amp;nbsp;strMatchedRowCollection = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Select items based on the Source DI also along with item no and line no&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;arrItemCollection = Split(ip_strItemsToBeSelected, &quot;,&quot;)&lt;br /&gt;
&amp;nbsp;If Trim(ip_strSourceDI) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;arrSourceDINumCollection = Split(ip_strSourceDI, &quot;,&quot;)&lt;br /&gt;
&amp;nbsp;End If&amp;nbsp;&lt;br /&gt;
&amp;nbsp;For intItemIndex = 0 To UBound(arrItemCollection)&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;arrItemDetails = Split(arrItemCollection(intItemIndex), &quot;|&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If Instr(arrItemDetails(0), &quot;##&quot;) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arrItemWarehouseDetails = Split(arrItemDetails(0), &quot;##&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(ip_strSourceDI) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Getting Row Number with Warehouse Details and&amp;nbsp; Source DI&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Ignoring the -00, -01, -02 -03 &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arrSourceDI = Split(arrSourceDINumCollection(intItemIndex), &quot;-&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For intTryIndex = 0 To 3&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strUpdatedSourceDIValue = arrSourceDI(0) &amp;amp; &quot;-0&quot; &amp;amp; CStr(intTryIndex)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intMatchedRow = fun_GetLotRowNumberWithDetails(ip_objLeftGrid, ip_objRightGrid, arrItemWarehouseDetails(0), arrItemDetails(2), &quot;PO Whse #|Source DI #&quot;, arrItemWarehouseDetails(1) &amp;amp; &quot;|&quot; &amp;amp; strUpdatedSourceDIValue)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If CStr(intMatchedRow) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Indicates expected row with source DI is found &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Getting Row Number with Warehouse Details and&amp;nbsp; without Source DI&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intMatchedRow = fun_GetLotRowNumberWithDetails(ip_objLeftGrid, ip_objRightGrid, arrItemWarehouseDetails(0), arrItemDetails(2), &quot;PO Whse #&quot;, arrItemWarehouseDetails(1))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Getting Row Number without Warehouse Details with Source DI&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Trim(ip_strSourceDI) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Ignoring the -00, -01, -02 -03 &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arrSourceDI = Split(arrSourceDINumCollection(intItemIndex), &quot;-&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For intTryIndex = 0 To 3&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strUpdatedSourceDIValue = arrSourceDI(0) &amp;amp; &quot;-0&quot; &amp;amp; CStr(intTryIndex)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intMatchedRow = fun_GetLotRowNumberWithDetails(ip_objLeftGrid, ip_objRightGrid, arrItemDetails(0), arrItemDetails(2), &quot;Source DI #&quot;, strUpdatedSourceDIValue)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If CStr(intMatchedRow) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Indicates expected row with source DI is found &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Getting Row Number without Warehouse Details and Source DI&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intMatchedRow = fun_GetLotRowNumberWithoutDetails(ip_objLeftGrid, arrItemDetails(0), arrItemDetails(2))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If CStr(intMatchedRow) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_objLeftGrid.SelectCell intMatchedRow, 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strMatchedRowCollection = strMatchedRowCollection &amp;amp; &quot;|&quot; &amp;amp; Cstr(intMatchedRow)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Expected Row with Lot and Source DI details not found &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Validate if Row with Lot and Source DI details found&quot;, &quot;Validate if Row with Lot and Source DI details found&quot;, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExitComponentIteration&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;Fun_SelectingRows = Right(strMatchedRowCollection, Len(strMatchedRowCollection) - 1)&lt;br /&gt;
End Function&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/6074616482940244416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/java-addin-code-for-function-used-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/6074616482940244416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/6074616482940244416'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/java-addin-code-for-function-used-for.html' title='JAVA Addin-&gt;Code for function used for java table'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-9035870753801367854</id><published>2011-09-09T04:32:00.000-07:00</published><updated>2011-09-09T04:32:20.150-07:00</updated><title type='text'>QTP &amp; QC-&gt;DB-&gt;Code for funcitons to connect to Database and exexute query.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_OpenDBConnection(ip_objDBConnection, ip_strConnectionString)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to connect to the database based upon the connection string passed&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objDBConnection: Connection object which will be used for db connection&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strConnectionString : Actual connection string&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 : Indicates the successful deleteion of the file&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Non Zero Vale: Indicates the failure and contains the error description for the failure&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_OpenDBConnection(objDBConnection, &quot;Driver={Microsoft ODBC for Oracle};Server=NALXTST2;Uid=ab4p_app01;Pwd=ab4p_app01_bibtb;&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function fun_OpenDBConnection(ip_objDBConnection, ip_strConnectionString)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;On Error Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_objDBConnection.ConnectionString= ip_strConnectionString&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_objDBConnection.Open&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err.Description &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;&amp;lt;&amp;lt;&amp;lt; Return the error code along with the description if function is unable to make connection &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_OpenDBConnection = Err.Description &amp;amp; VBNewLine &amp;amp;&amp;nbsp; Err.source&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Return 1 if function is able to make connection successfully &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_OpenDBConnection = ip_objDBConnection.State&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&amp;nbsp;&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_ExecuteQuery(ip_objDBConnection,ip_strQuery)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to execute the query to retrieve the record set&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objDBConnection: Connection object which will be used for db connection&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_strQuery : Actual query to be executed&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error text with error description&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Recordset as a result of query execution&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_ExecuteQuery(objDBConnection, &quot;Select * from MyTable&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function fun_ExecuteQuery(ip_objDBConnection,ip_strQuery)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;On Error resume next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim objRes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Get the result set by executing the passed query &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objRes = ip_objDBConnection.Execute(ip_strQuery)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err.Description &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_ExecuteQuery = &quot;ERROR: &quot; &amp;amp; VBNewLine &amp;amp; Err.Description &amp;amp; VBNewLine &amp;amp;&amp;nbsp; Err.source&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; ---------- Converting the Recorset to the array ---------- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim intTotalRows , intTotalColumns&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intTotalRows = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intTotalColumns = objRes.Fields.Count - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Calculating the total rows returned by the recordset &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;While objRes.EOF = False&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objRes.moveNext&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intTotalRows = intTotalRows + 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WEnd&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Forming the Array based upon t he total Rows and Total Coulns returned by the query &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim arrCollection()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ReDim arrCollection(CInt(intTotalRows) - 1, intTotalColumns)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Get the recordset cursor to the first point &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objRes.MoveFirst&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim intRowIndex, intColumnIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intRowIndex = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;While objRes.EOF = False&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For intColumnIndex = 0 To objRes.Fields.Count -1&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If&amp;nbsp; CStr(objRes.fields(intColumnIndex).Value) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arrCollection(intRowIndex, intColumnIndex) = objRes.fields(intColumnIndex).Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objRes.moveNext&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intRowIndex = CInt(intRowIndex) + 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WEnd&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Return the newly formed array &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_ExecuteQuery = arrCollection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objRes.Close&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Code:-&lt;br /&gt;
&amp;nbsp;Set objDatabaseCon = CreateObject(&quot;ADODB.Connection&quot;)&lt;br /&gt;
&amp;nbsp;Set objRecordset = CreateObject(&quot;ADODB.RecordSet&quot;)&lt;br /&gt;
&lt;br /&gt;
strConString=&quot;Driver={Microsoft ODBC for Oracle};Server=NALXTST2;Uid=ab4p_app01;Pwd=ab4p_app01_bibtb;&quot;)&lt;br /&gt;
&lt;br /&gt;
strConnectionState =&amp;nbsp; fun_OpenDBConnection(objDatabaseCon, strConString)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Exit the component if the connection status is not returned as 1 =&amp;gt; connection was not successfll &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If CStr(strConnectionState) &amp;lt;&amp;gt; &quot;1&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Connecting to database &quot; &amp;amp; vbNewLine &amp;amp; strConString, &quot;Unable to make connection :&quot; &amp;amp; vbNewLine &amp;amp; strConnectionState, Nothing &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExitComponentIteration&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strQuery = &quot;select * from bridge.pl2pom_logical_msg where system_id in (select system_id from bridge.pl2pom_xml_msg where correlation_id =&#39;&quot; &amp;amp; Trim(arrAllocCollection(3)) &amp;amp; &quot;&#39;)&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Collecting the result of the query in to an array&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arrRecordSet =&amp;nbsp; fun_ExecuteQuery(objDatabaseCon, strQuery)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;----- Validate the return type from the function call ------ &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Not IsArray(arrRecordSet) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Instr(arrRecordSet, &quot;ERROR&quot;) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Execute Query&quot;, &quot;Unable to execute the following query due to the error :&quot; &amp;amp; arrRecordSet &amp;amp; vbNewLine &amp;amp; &quot; Query: &quot; &amp;amp; strQuery, Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Execute Query&quot;, &quot;Unable to execute the following query : &quot; &amp;amp; strQuery, Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExitComponentIteration&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If UBound(arrRecordSet) &amp;lt; 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Execute Query&quot;, &quot;Unable to retrieve any rows by executing the following query : &quot; &amp;amp; VBNewline &amp;amp; strQuery, Nothing&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExitComponentIteration&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/9035870753801367854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-db-code-for-funcitons-to-connect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/9035870753801367854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/9035870753801367854'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-db-code-for-funcitons-to-connect.html' title='QTP &amp; QC-&gt;DB-&gt;Code for funcitons to connect to Database and exexute query.'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-6852555014716363841</id><published>2011-09-09T04:24:00.000-07:00</published><updated>2011-09-09T04:24:49.200-07:00</updated><title type='text'>QTP &amp; QC -&gt;Code for to delete the existing file at specified path</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_DeleteExistingFile(ip_strFileName)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to delete the existing file at path ip_strFileName&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_strFileName: Path of the file need to be deleted&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 : Indicates the successful deletion of the file&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Non Zero Vale: Indicates the failure and contains the error description for the failure&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_DeleteExistingFile(&quot;C:\MyFile.xls&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function fun_DeleteExistingFile(ip_strFileName)&lt;br /&gt;
&amp;nbsp;On Error Resume Next&lt;br /&gt;
&amp;nbsp;Dim objFileSystem, objFile&lt;br /&gt;
&amp;nbsp;Set objFileSystem = CreateObject(&quot;Scripting.FileSystemObject&quot;)&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Attempt to Delete the file only if the file exists &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If (objFileSystem.FileExists(ip_strFileName)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set objFile = objFileSystem.GetFile(ip_strFileName)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;objFile.Delete&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Any error during the Delete operation, will be captured in Err object and will be sent back to the calling the function &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If Err.Description &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &#39;&amp;lt;&amp;lt;&amp;lt; Return the error code along with the description if function is unable to delete a file &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; fun_DeleteExistingFile = Err.Description &amp;amp; VBNewLine &amp;amp;&amp;nbsp; Err.source&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Exit Function&lt;br /&gt;
&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Return Zero if function is able to delete a file successfully &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;fun_DeleteExistingFile = 0 &lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Example Code:-&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp;&amp;nbsp; &lt;/strong&gt;Parameter(&quot;p_POFilesLocation&quot;)&amp;nbsp; = &quot;C:\EFAS_Tools\Automation\PO_Files&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;strPOFilePath = Parameter(&quot;p_POFilesLocation&quot;) &amp;amp; &quot;\POMsg.txt&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Set objFileSys = CreateObject(&quot;Scripting.FileSystemObject&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Delete the file if it exists in the specified path&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;strFileStatus= fun_DeleteExistingFile(strPOFilePath)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If&amp;nbsp; CStr(strFileStatus) &amp;lt;&amp;gt; &quot;0&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Verify the file deleted&quot;, &quot;Text file not deleted in the specified path : ERROR : &quot; &amp;amp; strFileStatus , Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExitComponentIteration&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/6852555014716363841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-to-delete-existing-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/6852555014716363841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/6852555014716363841'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-to-delete-existing-file.html' title='QTP &amp; QC -&gt;Code for to delete the existing file at specified path'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-3179682746319784979</id><published>2011-09-09T04:21:00.000-07:00</published><updated>2011-12-09T03:36:39.944-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="QTP - Excel"/><title type='text'>Excel-&gt; Functions to get the column number &amp; Row number From Excel sheet for a paricular text</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Function to get the column number From Excel sheet for a paricular text&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name: funGetColumnNumberInExcel(ip_objWorksheet, ip_strExpectedColumnName, ip_intRowNumber, ip_intStartColumnNumberIndex, ip_blnIsRelativeComparison)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to get the column number from the Excel sheet in particular row from particular column number&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objWorksheet: Create an object for the Excel sheet &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ip_strExpectedColumnName: Need to enter the particular text which to you get the column number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ip_intRowNumber: In which row you want to start the search for the partiuclar text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ip_intStartColumnNumberIndex= From which column you need to start the searching for the particular text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ip_blnIsRelativeComparison= need to compare the full exact text or partival text, need to send the parameter as True or Fasle&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp; Number: Returns the column number of the particular text&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; funGetColumnNumberInExcel(objWorksheet, &quot;Max&quot;, 4, intColumnNumber, False)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Function to get the column number from the Excel sheet for a paricular text&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
Function funGetColumnNumberInExcel(ip_objWorksheet, ip_strExpectedColumnName, ip_intRowNumber, ip_intStartColumnNumberIndex, ip_blnIsRelativeComparison)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Default Return value is set as empty &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;funGetColumnNumberInExcel = &quot;&quot;&lt;br /&gt;
&amp;nbsp;Dim strActualColumnName, intTotalColumnCount, intColumnStartIndex&lt;br /&gt;
&amp;nbsp;Wait 4 &lt;br /&gt;
&amp;nbsp;intTotalColumnCount = ip_objWorksheet.UsedRange.Columns.Count&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Extract the cell value from given row number starting from the mentioned start index for column &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;For intColumnStartIndex = ip_intStartColumnNumberIndex To intTotalColumnCount &lt;br /&gt;
&amp;nbsp;&amp;nbsp;strActualColumnName = ip_objWorksheet.Cells(ip_intRowNumber, intColumnStartIndex).Value&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Using Instr function for relative comparison based upon the flag value passed &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If ip_blnIsRelativeComparison = True Then&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If Instr(UCase(Trim(strActualColumnName)),UCase(Trim(ip_strExpectedColumnName))) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;funGetColumnNumberInExcel = intColumnStartIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If UCase(Trim(strActualColumnName)) = UCase(Trim(ip_strExpectedColumnName)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;funGetColumnNumberInExcel = intColumnStartIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&#39;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Function to get the Row number from the Excel sheet of a paricular text&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name: funGetRowNumberInExcel(ip_objWorksheet, ip_strExpectedRowValue, ip_intColumnNumber, ip_intStartRowNumberIndex, ip_blnIsRelativeComparison)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to get the Row number from the Excel sheet in particular Column from particular Row number&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_objWorksheet: Create an object for the Excel sheet&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ip_strExpectedRowValue: Need to enter the particular text which to you get the Row number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ip_intColumnNumber: In which Column you want to start the search for the partiuclar text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ip_intStartRowNumberIndex= From which Row you need to start the searching for the particular text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;ip_blnIsRelativeComparison= need to compare the full exact text or partival text, need to send the parameter as True or Fasle&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp; Number: Returns the Row number of the particular text&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; funGetRowNumberInExcel(objWorksheet, &quot;Chain Total&quot;, intStoreColumnNumber,1, True)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Function funGetRowNumberInExcel(ip_objWorksheet, ip_strExpectedRowValue, ip_intColumnNumber, ip_intStartRowNumberIndex, ip_blnIsRelativeComparison)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Default Return value is set as empty &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;funGetRowNumberInExcel = &quot;&quot;&lt;br /&gt;
&amp;nbsp;Dim strActualRowValue, intTotalRowCount, intRowStartIndex&lt;br /&gt;
&amp;nbsp;Wait 4 &lt;br /&gt;
&amp;nbsp;intTotalRowCount = ip_objWorksheet.UsedRange.Rows.Count&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Extract the cell value from given row number starting from the mentioned start index for column &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;For intRowStartIndex = ip_intStartRowNumberIndex To intTotalRowCount &lt;br /&gt;
&amp;nbsp;&amp;nbsp;strActualRowValue = ip_objWorksheet.Cells(intRowStartIndex, ip_intColumnNumber).Value&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; Using Instr function for relative comparison based upon the flag value passed &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If ip_blnIsRelativeComparison = True Then&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If Instr(UCase(Trim(strActualRowValue)),UCase(Trim(ip_strExpectedRowValue))) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;funGetRowNumberInExcel = intRowStartIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If UCase(Trim(strActualRowValue)) = UCase(Trim(ip_strExpectedRowValue)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;funGetRowNumberInExcel = intRowStartIndex&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Function&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/3179682746319784979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/excel-functions-to-get-column-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/3179682746319784979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/3179682746319784979'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/excel-functions-to-get-column-number.html' title='Excel-&gt; Functions to get the column number &amp; Row number From Excel sheet for a paricular text'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-7350626464313565372</id><published>2011-09-09T04:19:00.000-07:00</published><updated>2011-09-09T04:19:08.098-07:00</updated><title type='text'>QTP &amp; QC -&gt; Code for Select the Date from the Date Picker.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;&amp;lt;&amp;lt;&amp;lt; funtion will select the date from date picker based on the input data.&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp; Fun_DatePicker(ip_Obj, ip_InputDate)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select the Date from the Date Picker on the Screen as per the User Input Date.&lt;br /&gt;
&#39;Author:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Naresh Gupta. D&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input date, Calendar Object&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 for fail&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call Fun_DatePicker(objCalendar, Parameter(&quot;p_AR_RS_NightOfDate&quot;))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;&amp;lt;&amp;lt;&amp;lt;Decleration of Object for Calendar&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Dim objCalendar&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Set objCalendar = Browser(&quot;Browser Main&quot;).Page(&quot;Run Model&quot;).Image(&quot;Calendar&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Function Fun_DatePicker(ip_Obj, ip_InputDate)&lt;br /&gt;
&amp;nbsp;Dim arrDateDetailsCollection, intDay, intMonth, intYear, intYearFromCalendar, intDifOfYears, intMaxWaitCount&lt;br /&gt;
&amp;nbsp;Fun_DatePicker = &quot;0&quot;&lt;br /&gt;
&amp;nbsp;arrDateDetailsCollection=Split(ip_InputDate, &quot;/&quot;)&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Verifying the Month field is numeric or not&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If (Not IsNumeric(arrDateDetailsCollection(0))) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Verify the input passed for Month&quot;, &quot;Invalid input passed for Month field and that is : &quot; &amp;amp;arrDateDetailsCollection(0), Nothing &lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_DatePicker = &quot;1&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ExitFunction&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Verifying the Month field is less than Zero or Empty or Greater than 12&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;ElseIf arrDateDetailsCollection(0) &amp;lt;= 0 Or arrDateDetailsCollection(0) = &quot;&quot;&amp;nbsp; Or arrDateDetailsCollection(0) &amp;gt; 12 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Verify the input passed for Month&quot;, &quot;Invalid input passed for Month field and that is : &quot; &amp;amp;arrDateDetailsCollection(0), Nothing &lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_DatePicker = &quot;1&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ExitFunction&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Verifying the Month field is numeric or not&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If (Not IsNumeric(arrDateDetailsCollection(1))) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Verify the input passed for Date&quot;, &quot;Invalid input passed for the Date field that is : &quot; &amp;amp;arrDateDetailsCollection(1), Nothing &lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_DatePicker = &quot;1&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ExitFunction&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Verifying the Month field is less than Zero or Empty or Greater than 31&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;ElseIf arrDateDetailsCollection(1) &amp;lt;= 0 Or arrDateDetailsCollection(1) = &quot;&quot;&amp;nbsp;&amp;nbsp; Or&amp;nbsp; arrDateDetailsCollection(1) &amp;gt; 31 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Verify the input passed for Date&quot;, &quot;Invalid input passed for the Date field that is : &quot; &amp;amp;arrDateDetailsCollection(1), Nothing &lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_DatePicker = &quot;1&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ExitFunction&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Verifying the Month field is numeric or not&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If (Not IsNumeric(arrDateDetailsCollection(2))) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Verify the input passed for Year&quot;, &quot;Invalid input passed for the Year filed that is : &quot; &amp;amp;arrDateDetailsCollection(2), Nothing &lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_DatePicker = &quot;1&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ExitFunction&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Verifying the Month field is less than Zero or Empty&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;ElseIf arrDateDetailsCollection(2) &amp;lt;= 0 Or arrDateDetailsCollection(2) = &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Verify the input passed for Year&quot;, &quot;Invalid input passed for the Year filed that is : &quot; &amp;amp;arrDateDetailsCollection(2), Nothing &lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_DatePicker = &quot;1&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ExitFunction&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;intMonth=cint((arrDateDetailsCollection(0))-1)&lt;br /&gt;
&amp;nbsp;intDay=cint(arrDateDetailsCollection(1))&lt;br /&gt;
&amp;nbsp;intYear=cint(arrDateDetailsCollection(2))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;ip_Obj.Click&lt;br /&gt;
&amp;nbsp;Wait(intConstShortWaitTime)&lt;br /&gt;
&amp;nbsp;intYearFromCalendar=Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;topCalFrame&quot;).WebEdit(&quot;year&quot;).GetROProperty(&quot;Value&quot;)&lt;br /&gt;
&amp;nbsp;intDifOfYears=Trim(intYear)-Trim(intYearFromCalendar)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;If the Year in the input date is more than the present year then it will click on &quot;&amp;gt;&amp;gt;&quot; button and select that particular Year&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If (intDifOfYears&amp;gt;0) then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Do while (intDifOfYears&amp;gt;0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;topCalFrame&quot;).WebButton(&quot;&amp;gt;&amp;gt;&quot;).Click&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If intYear=&amp;nbsp; Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;topCalFrame&quot;).WebEdit(&quot;year&quot;).GetROProperty(&quot;Value&quot;) then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End if&lt;br /&gt;
&amp;nbsp;&amp;nbsp; intDifOfYears=intDifOfYears-1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Loop&lt;br /&gt;
&amp;nbsp;End if &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;If the Year in the input date is Less than the present year then it will click on &quot;&amp;lt;&amp;lt;&quot; button and select that particular Year&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If(intDifOfYears&amp;lt;0) then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Do while (intDifOfYears&amp;lt;0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;topCalFrame&quot;).WebButton(&quot;&amp;lt;&amp;lt;&quot;).Click&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If intYear=&amp;nbsp; Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;topCalFrame&quot;).WebEdit(&quot;year&quot;).GetROProperty(&quot;Value&quot;) then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End if&lt;br /&gt;
&amp;nbsp;&amp;nbsp; intDifOfYears=intDifOfYears+1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Loop &lt;br /&gt;
&amp;nbsp;End if&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Select the particualr month as per the user input month&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;If Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;topCalFrame&quot;).WebList(&quot;month&quot;).Exist(intConstShortWaitTime) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;topCalFrame&quot;).WebList(&quot;month&quot;).SelectIfNotNull intMonth&lt;br /&gt;
&amp;nbsp;End if&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Select the particualr Date as per the user input Date&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Sync&lt;br /&gt;
&amp;nbsp;Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;bottomCalFrame&quot;).Link(&quot;text:=&quot;&amp;amp;intDay).Click&lt;br /&gt;
&amp;nbsp;Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Sync&lt;br /&gt;
&amp;nbsp;Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Frame(&quot;bottomCalFrame&quot;).WebButton(&quot;Select&quot;).Click&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt;Do Loop for a time of&amp;nbsp; intConstShortWaitTime and get exists when the calendar window gets closed&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;intMaxWaitCount = intConstShortWaitTime&lt;br /&gt;
&amp;nbsp;Do While intMaxWaitCount &amp;gt; 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Browser(&quot;Calendar&quot;).Page(&quot;Calendar&quot;).Exist(1) Then&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;intMaxWaitCount = CInt(intMaxWaitCount) - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Loop&lt;br /&gt;
End Function&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/7350626464313565372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-select-date-from-date.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/7350626464313565372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/7350626464313565372'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-select-date-from-date.html' title='QTP &amp; QC -&gt; Code for Select the Date from the Date Picker.'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-6237249439715356991</id><published>2011-09-09T04:17:00.000-07:00</published><updated>2011-09-09T04:17:46.905-07:00</updated><title type='text'>QTP &amp; QC-&gt; Code for function to provide a controlled wait for synchronizing the application til the expected objects gets displayed in the screen &amp; in exists</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;Function Name : Fun_WaitForObjectExists&lt;br /&gt;
&#39;Description&amp;nbsp;&amp;nbsp; This function is used to provide a controlled wait for synchronizing the application til the expected objects gets displayed in the screen&lt;br /&gt;
&#39;Parameters&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_obj : Expected object&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_MaxWaitCount : Total max wait * 2 time in sec for the expected object to get displayed&lt;br /&gt;
&#39;Return Val ue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0: indicates success&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1:&amp;nbsp;indicates failure&lt;br /&gt;
&#39; Ex:ample&amp;nbsp;&amp;nbsp;&amp;nbsp; Fun_WaitForObjectExists(ip_obj, 20)&lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Function Fun_WaitForObjectExists(ip_obj, ip_MaxWaitCount)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_WaitForObjectExists = &quot;1&quot; &#39;Indicates Failure&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Wait intConstShortWaitTime &#39;&amp;lt;&amp;lt;&amp;lt; --- This wait is reuired to synch the application browser --- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; ------- Keep looping until the object is found to be existing in the application -------- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Do While CInt(ip_MaxWaitCount) &amp;gt; 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If ip_obj.Exist(intConstShortWaitTime) Then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_WaitForObjectExists = &quot;0&quot; &#39;&amp;lt;&amp;lt;&amp;lt; --- Set the flag as success and exit the loop ----- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; --------- Decriment the counter by 1 and loop back -------- &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Wait intConstShortWaitTime&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_MaxWaitCount&amp;nbsp; = CInt(ip_MaxWaitCount ) - 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Loop&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; ------ If the flag is found to be still under initial status it indicates the failure of the object identification ------ &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Fun_WaitForObjectExists = &quot;1&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Application sync event&quot; , &quot;Expected Object is not displayed in the screen within the given wait time&quot;, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
End Function &lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;Function Name : Fun_WaitForObjectInExists&lt;br /&gt;
&#39;Description&amp;nbsp;&amp;nbsp; This function is used to provide a controlled wait for synchronizing the application til the expected objects gets disappears from the screen&lt;br /&gt;
&#39;Parameters&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_obj : Expected object&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_MaxWaitCount : Total max wait * 2 time in sec for the expected object to get displayed&lt;br /&gt;
&#39;Return Val ue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null: If expected object gets displayed&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exists the component iteration if expected object does not disappears&amp;nbsp; &lt;br /&gt;
&#39; Ex:ample&amp;nbsp;&amp;nbsp;&amp;nbsp; Fun_WaitForObjectInExists(ip_obj, 20)&lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Function Fun_WaitForObjectInExists(ip_obj, ip_MaxWaitCount)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim blnFlag&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;blnFlag = &quot;1&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Wait intConstShortWaitTime &#39;&amp;lt;&amp;lt;&amp;lt; --- This wait is reuired to synch the application browser --- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; ------- Keep looping until the object is found to be inexisting in the application -------- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Do While CInt(ip_MaxWaitCount) &amp;gt; 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If ip_obj.Exist(intConstShortWaitTime) Then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; --------- Decriment the counter by 1 and loop back -------- &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Wait intConstShortWaitTime&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip_MaxWaitCount&amp;nbsp; = CInt(ip_MaxWaitCount ) - 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;blnFlag = &quot;0&quot;&amp;nbsp; &#39;&amp;lt;&amp;lt;&amp;lt; --- Set the flag as success and exit the loop ----- &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Do&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Loop&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;&amp;lt;&amp;lt;&amp;lt; ------ If the flag is found to be still under initial status it indicates the failure of the object identification ------ &amp;gt;&amp;gt;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If blnFlag = &quot;1&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_ReportFailure &quot;Application synch event&quot; , &quot;Expected Object does not inexist in the screen within the given max wait time&quot;, Browser(&quot;Browser Main&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_WaitForObjectInExists = blnFlag&lt;br /&gt;
End Function&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/6237249439715356991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-provide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/6237249439715356991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/6237249439715356991'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-provide.html' title='QTP &amp; QC-&gt; Code for function to provide a controlled wait for synchronizing the application til the expected objects gets displayed in the screen &amp; in exists'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-5665239150992288209</id><published>2011-09-09T03:26:00.000-07:00</published><updated>2011-09-09T03:26:10.766-07:00</updated><title type='text'>QTP &amp; QC - Code for function to wait till the browser is not busy</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_CustomSync()&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to wait till the browser is not busy&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NA&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NA&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Browser&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_CustomSync()&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function fun_CustomSync(ByRef test_object)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; wait(3)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Do &lt;br /&gt;
&amp;nbsp;&amp;nbsp;If&amp;nbsp; test_object.Object.Busy = False Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit Do&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;wait(2)&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; Loop&lt;br /&gt;
End Function&lt;br /&gt;
RegisterUserFunc &quot;Browser&quot;, &quot;fun_CustomSync&quot;, &quot;fun_CustomSync&quot;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/5665239150992288209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-wait-till.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/5665239150992288209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/5665239150992288209'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-wait-till.html' title='QTP &amp; QC - Code for function to wait till the browser is not busy'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-1229352699643486566</id><published>2011-09-09T03:25:00.000-07:00</published><updated>2011-09-09T03:25:27.091-07:00</updated><title type='text'>QTP &amp; QC-&gt; Code for function to get the column number of activex grid for a given header text, 2nd for in a row</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_GetColumnNumberWithGivenHeaderText(strText)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to get the column number of activex grid for a given header text&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strText&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Int&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcxTable&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_GetColumnNumberWithGivenHeaderText(&quot;Description&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&lt;br /&gt;
Public Function fun_GetColumnNumberWithGivenHeaderText(ByRef test_object , strText)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Dim i&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; For i = 2 to test_object.ColumnCount&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If&amp;nbsp; Trim(test_object.GetCellData(1 , i )) = strText Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_GetColumnNumberWithGivenHeaderText = i&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
RegisterUserFunc &quot;AcxTable&quot;, &quot;fun_GetColumnNumberWithGivenHeaderText&quot;, &quot;fun_GetColumnNumberWithGivenHeaderText&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_ExGetColumnNumberWithGivenHeaderText(strText , intRow)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to get the column number of activex grid for a given header text&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strText&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Int&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcxTable&lt;br /&gt;
&#39;Base Project&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EFAS&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_ExGetColumnNumberWithGivenHeaderText(&quot;Description&quot; , 2)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Public Function fun_ExGetColumnNumberWithGivenHeaderText(ByRef test_object , strText , intRow)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Dim i&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; For i = 2 to test_object.ColumnCount&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If&amp;nbsp; Trim(test_object.GetCellData(intRow , i )) = strText Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_ExGetColumnNumberWithGivenHeaderText = i&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
RegisterUserFunc &quot;AcxTable&quot;, &quot;fun_ExGetColumnNumberWithGivenHeaderText&quot;, &quot;fun_ExGetColumnNumberWithGivenHeaderText&quot;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/1229352699643486566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-get-column.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/1229352699643486566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/1229352699643486566'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-get-column.html' title='QTP &amp; QC-&gt; Code for function to get the column number of activex grid for a given header text, 2nd for in a row'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-2932293490965244830</id><published>2011-09-09T03:18:00.000-07:00</published><updated>2011-09-09T03:18:49.327-07:00</updated><title type='text'>QTP &amp; QC : Code to enter or select data in webedit, weblist, webcheckbox if not null</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; WebEdit_SetIfNotNull(strValue)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to set the Parameter value if it is not NULL&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strValue&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NA&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebEdit_SetIfNotNull Parameter(&quot;Name&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Function WebEdit_SetIfNotNull(test_object , strValue )&lt;br /&gt;
&amp;nbsp;If Trim(strValue) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If test_object.Exist(5) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If test_object.GetROProperty(&quot;disabled&quot;) = 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test_object.Set strValue&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
RegisterUserFunc &quot;WebEdit&quot;, &quot;SetIfNotNull&quot;, &quot;WebEdit_SetIfNotNull&quot;&lt;br /&gt;
&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; WebCheckBox_SetIfNotNull(strValue)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to set the Parameter value if it is not NULL&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strValue&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NA&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebCheckBox&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebCheckBox_SetIfNotNull Parameter(&quot;Name&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Function WebCheckBox_SetIfNotNull(test_object , strValue )&lt;br /&gt;
&amp;nbsp;If Trim(strValue) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If test_object.Exist(5) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If test_object.GetROProperty(&quot;disabled&quot;) = 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test_object.Set strValue&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
RegisterUserFunc &quot;WebCheckBox&quot;, &quot;SetIfNotNull&quot;, &quot;WebCheckBox_SetIfNotNull&quot;&lt;br /&gt;
&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; WebList_SelectIfNotNull(strValue)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to set the Parameter value if it is not NULL&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strValue&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NA&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebList&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebList_SelectIfNotNull Parameter(&quot;Name&quot;)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Function WebList_SelectIfNotNull(test_object , strValue )&lt;br /&gt;
&amp;nbsp;If Trim(strValue) &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If test_object.Exist(5) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If test_object.GetROProperty(&quot;disabled&quot;) = 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test_object.Select strValue&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
RegisterUserFunc &quot;WebList&quot;, &quot;SelectIfNotNull&quot;, &quot;WebList_SelectIfNotNull&quot;&lt;br /&gt;
&lt;br /&gt;
Example code:-&lt;br /&gt;
&lt;br /&gt;
Browser(&quot;Browser Main&quot;).Page(&quot;Allocation Review&quot;).WebList(&quot;levelList&quot;).SelectIfNotNull &quot;Color&quot;&lt;br /&gt;
Browser(&quot;Browser Main&quot;).Page(&quot;Allocation Review&quot;).WebEdit(&quot;levelList&quot;).SetIfNotNull &quot;Color&quot;&lt;br /&gt;
Browser(&quot;Browser Main&quot;).Page(&quot;Allocation Review&quot;).WebCheckbox(&quot;levelList&quot;).SetIfNotNull &quot;ON&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/2932293490965244830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-to-enter-or-select-data-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/2932293490965244830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/2932293490965244830'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-to-enter-or-select-data-in.html' title='QTP &amp; QC : Code to enter or select data in webedit, weblist, webcheckbox if not null'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-1241974435384913284</id><published>2011-09-09T03:09:00.000-07:00</published><updated>2011-09-09T03:09:21.153-07:00</updated><title type='text'>QTP &amp; QC : Code for function to get the required row number for the specified text matches partially as serach string in particular column</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_Ex_Acx_GetRowWithText(strRequiredText, intColumn)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to get the required row number for the specified text&amp;nbsp; matches partially as serach string&lt;br /&gt;
&#39;Author&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp;&amp;nbsp;&amp;nbsp; Naresh Gupta . D&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strRequiredText , intColumn&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcxTable&lt;br /&gt;
&#39;Base Project&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EFAS&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_Ex_Acx_GetRowWithText(&quot;Haslet&quot; , 1)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Function fun_Ex_Acx_GetRowWithText(test_Object, strRequiredText, intColumn)&lt;br /&gt;
&amp;nbsp;Dim intRowCount,i&lt;br /&gt;
&amp;nbsp;fun_Ex_Acx_GetRowWithText = &quot;&quot;&lt;br /&gt;
&amp;nbsp;intRowCount = test_object.RowCount&lt;br /&gt;
&amp;nbsp;For i = 1 to intRowCount&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Instr(Trim(test_Object.GetCellData(i, intColumn)), Trim(strRequiredText)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_Ex_Acx_GetRowWithText = i&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
RegisterUserFunc &quot;AcxTable&quot;, &quot;fun_Ex_Acx_GetRowWithText&quot;, &quot;fun_Ex_Acx_GetRowWithText&quot;&lt;br /&gt;
&lt;br /&gt;
we can use the same function to get the row number in a webtable of a particular column &lt;br /&gt;
but need to create a object for the webtable.&lt;br /&gt;
&lt;br /&gt;
Example Code: - &lt;br /&gt;
&lt;br /&gt;
Set objGrid = Browser(&quot;Browser Main&quot;).Page(&quot;Allocation Review&quot;).AcxTable(&quot;FarPoint Spread 6.0&quot;)&lt;br /&gt;
&lt;br /&gt;
intChainTotalRowNumber = Browser(&quot;Browser Main&quot;).Page(&quot;Allocation Review&quot;).AcxTable(&quot;FarPoint Spread 6.0&quot;).fun_Acx_GetRowWithText(&quot;(+) Chain Total&quot;, intStoreColumnNumber)&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/1241974435384913284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-get.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/1241974435384913284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/1241974435384913284'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-get.html' title='QTP &amp; QC : Code for function to get the required row number for the specified text matches partially as serach string in particular column'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-6907570703364081720</id><published>2011-09-09T03:06:00.000-07:00</published><updated>2011-09-09T03:06:13.629-07:00</updated><title type='text'>QTP &amp; QC -&gt;Code for to get the required row number for the specified text as serach string</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp;&amp;nbsp; fun_Acx_GetRowWithText(strRequiredText , intColumn)&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to get the required row number for the specified text as serach string&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strRequiredText , intColumn&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int Column : need to enter the column number, in which column you are searching to get the row number of particular text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strRequiredText: Need to give the text &lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcxTable&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_Acx_GetRowWithText(&quot;322&quot; , 2)&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Function fun_Acx_GetRowWithText(test_object,strRequiredText , intColumn)&lt;br /&gt;
&amp;nbsp;Dim intRowCount,i&lt;br /&gt;
&amp;nbsp;fun_Acx_GetRowWithText = &quot;&quot;&lt;br /&gt;
&amp;nbsp;intRowCount = test_object.RowCount&lt;br /&gt;
&amp;nbsp;For i = 2 to intRowCount&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Trim(test_object.GetCellData(i,intColumn)) = Trim(strRequiredText) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;fun_Acx_GetRowWithText = i&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
RegisterUserFunc &quot;AcxTable&quot;, &quot;fun_Acx_GetRowWithText&quot;, &quot;fun_Acx_GetRowWithText&quot;&lt;br /&gt;
&lt;br /&gt;
Same function can be used for webtable also. but need to create an object for the webtable &lt;br /&gt;
&lt;br /&gt;
Example Code:-&lt;br /&gt;
&lt;br /&gt;
Set objGrid = Browser(&quot;Browser Main&quot;).Page(&quot;Allocation Review&quot;).AcxTable(&quot;FarPoint Spread 6.0&quot;)&lt;br /&gt;
&lt;br /&gt;
intChainTotalRowNumber = Browser(&quot;Browser Main&quot;).Page(&quot;Allocation Review&quot;).AcxTable(&quot;FarPoint Spread 6.0&quot;).fun_Acx_GetRowWithText(&quot;(+) Chain Total&quot;, intStoreColumnNumber)&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/6907570703364081720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-to-get-required-row.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/6907570703364081720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/6907570703364081720'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-to-get-required-row.html' title='QTP &amp; QC -&gt;Code for to get the required row number for the specified text as serach string'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-996434414522886662</id><published>2011-09-09T02:58:00.000-07:00</published><updated>2011-09-09T02:58:02.469-07:00</updated><title type='text'>QTP &amp; QC -&gt;Code for to close all IE browsers except HP Quality Center</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;**********************************************************************************************************&lt;br /&gt;
&#39;Function Name:&amp;nbsp; sub_CloseOpenedBrowsers&lt;br /&gt;
&#39;Description :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Used to close all IE browsers except HP Quality Center&lt;br /&gt;
&#39;Parameters:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; None&lt;br /&gt;
&#39;Return&amp;nbsp; value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; None&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NA&lt;br /&gt;
&#39;Example:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fun_CloseOpenedBrowsers()&lt;br /&gt;
&#39;**********************************************************************************************************&lt;br /&gt;
Sub sub_CloseOpenedBrowsers()&lt;br /&gt;
&amp;nbsp;Dim objDesktopChild, objDesktopChildCollection, intCounter, intHWND&lt;br /&gt;
&amp;nbsp;&#39;Get collection of desktop objects&lt;br /&gt;
&amp;nbsp;Set objDesktopChild = Description.Create&lt;br /&gt;
&amp;nbsp;objDesktopChild(&quot;micclass&quot;).Value = &quot;Browser&quot;&lt;br /&gt;
&amp;nbsp;Set objDesktopChildCollection = Desktop.ChildObjects(objDesktopChild)&lt;br /&gt;
&amp;nbsp;&#39;Identify the browsers and close all the browsers except HP QC&lt;br /&gt;
&amp;nbsp;For intCounter = 0 to objDesktopChildCollection.Count - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If Instr( 1 , lcase(objDesktopChildCollection(intCounter).GetROProperty(&quot;title&quot;)) , &quot;hp quality center&quot; ) = 0 And Instr(1 , lcase(objDesktopChildCollection(intCounter).object.document.url) , &quot;atc.jcpenny.com&quot; ) = 0&amp;nbsp; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;intHWND = objDesktopChildCollection(intCounter).Object.HWND&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Systemutil.CloseProcessByHwnd(intHWND)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/996434414522886662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-to-close-all-ie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/996434414522886662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/996434414522886662'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-to-close-all-ie.html' title='QTP &amp; QC -&gt;Code for to close all IE browsers except HP Quality Center'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-4635943338404974667</id><published>2011-09-09T02:56:00.001-07:00</published><updated>2011-09-09T02:56:54.860-07:00</updated><title type='text'>QTP &amp; QC-&gt;Code for function to check the existence of object and report pass/fail</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;Function Name :&amp;nbsp; Fun_CheckObjectAndReport&lt;br /&gt;
&#39;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Use this function to check the existence of object and report pass/fail&lt;br /&gt;
&#39;Parameters&amp;nbsp;&amp;nbsp;&amp;nbsp;strStepName , strDescription &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39;Return Val ue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; True/False&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Web Objects&lt;br /&gt;
&#39; Ex:ample&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fun_CheckObjectAndReport &quot;Main Menu&quot; , &quot;Header displayed&quot;&lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Public Function Fun_CheckObjectAndReport(ByRef test_object , strStepName )&lt;br /&gt;
&amp;nbsp;Dim strParentMicClass&lt;br /&gt;
&amp;nbsp;Dim objParent&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&#39;Set the mic class of the parent object&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;strParentMicClass = &quot;Browser&quot;&lt;br /&gt;
&amp;nbsp;&#39;Check if object exists and do the reporting success&lt;br /&gt;
&amp;nbsp;If&amp;nbsp; test_object.Exist Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportSuccess strStepName , &quot;Exists&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_CheckObjectAndReport = True&lt;br /&gt;
&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;If object doesn&#39;t exist get the parent object and have a snapshot of the screen report failure&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set objParent = test_object.GetTOProperty(&quot;parent&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Do Until objParent.GetROProperty(&quot;micclass&quot;) = strParentMicClass&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Set objParent = objParent.GetTOProperty(&quot;parent&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Loop&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_ReportFailure strStepName , &quot;Doesn&#39;t Exists&quot; , objParent&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Fun_CheckObjectAndReport = False&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&#39;Kill the objects&lt;br /&gt;
&amp;nbsp;Set objParent = Nothing&lt;br /&gt;
End Function&lt;br /&gt;
RegisterUserFunc &quot;WebElement&quot;, &quot;Fun_CheckObjectAndReport&quot;, &quot;Fun_CheckObjectAndReport&quot;&lt;br /&gt;
RegisterUserFunc &quot;Link&quot;, &quot;Fun_CheckObjectAndReport&quot;, &quot;Fun_CheckObjectAndReport&quot;&lt;br /&gt;
RegisterUserFunc &quot;Image&quot;, &quot;Fun_CheckObjectAndReport&quot;, &quot;Fun_CheckObjectAndReport&quot;&lt;br /&gt;
RegisterUserFunc &quot;WebButton&quot;, &quot;Fun_CheckObjectAndReport&quot;, &quot;Fun_CheckObjectAndReport&quot;&lt;br /&gt;
RegisterUserFunc &quot;Browser&quot;, &quot;Fun_CheckObjectAndReport&quot;, &quot;Fun_CheckObjectAndReport&quot;&lt;br /&gt;
RegisterUserFunc &quot;Window&quot;, &quot;Fun_CheckObjectAndReport&quot;, &quot;Fun_CheckObjectAndReport&quot;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/4635943338404974667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-check.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/4635943338404974667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/4635943338404974667'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-check.html' title='QTP &amp; QC-&gt;Code for function to check the existence of object and report pass/fail'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-3497440621259333185</id><published>2011-09-09T02:55:00.001-07:00</published><updated>2011-09-09T02:55:34.514-07:00</updated><title type='text'>QTP &amp; QC -&gt; Code for function to call a reporter event with micfail</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;Function Name : Fun_ReportFailure&lt;br /&gt;
&#39;Description&amp;nbsp;&amp;nbsp; Use this function to call a reporter event with micfail and have the error snapshot in result directory/ upload to QC run if connected&lt;br /&gt;
&#39;Parameters&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strStepName , strDescription , objSnapshot&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39;Return Val ue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NA&lt;br /&gt;
&#39; Example&amp;nbsp;&amp;nbsp;&amp;nbsp; Fun_ReportFailure &quot;Main Menu&quot; , &quot;Header displayed&quot; , Browser(&quot;main&quot;)&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Function Fun_ReportFailure(strStepName , strDescription , objSnapshot)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; If&amp;nbsp; Not objSnapshot Is Nothing Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Call the micFail reporter event and associated to the report&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Extern.Declare micLong, &quot;SetForegroundWindow&quot;,&quot;user32.dll&quot;, &quot;SetForegroundWindow&quot;, micLong&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Extern.SetForegroundWindow objSnapshot.Object.HWND &lt;br /&gt;
&amp;nbsp;&amp;nbsp;wait(2)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Capture snapshot of the object provided&lt;br /&gt;
&amp;nbsp;&amp;nbsp;objSnapshot.CaptureBitmap Environment(&quot;ResultDir&quot;) &amp;amp; &quot;\&quot; &amp;amp; FunTestIterationNumber &amp;amp; &quot;_&quot; &amp;amp; strStepName &amp;amp; &quot;.png&quot; , True&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Reporter.ReportEvent&amp;nbsp; micFail&amp;nbsp; , FunTestIterationNumber &amp;amp; &quot;_QTP_&quot; &amp;amp; strStepName , strDescription , Environment(&quot;ResultDir&quot;) &amp;amp; &quot;\&quot; &amp;amp; FunTestIterationNumber &amp;amp; &quot;_&quot; &amp;amp; strStepName &amp;amp; &quot;.png&quot;&lt;br /&gt;
&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Call the micFail reporter event and associated to the report&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Reporter.ReportEvent&amp;nbsp; micFail&amp;nbsp; , FunTestIterationNumber &amp;amp; &quot;_QTP_&quot; &amp;amp; strStepName , strDescription&amp;nbsp;&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/3497440621259333185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-call.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/3497440621259333185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/3497440621259333185'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-function-to-call.html' title='QTP &amp; QC -&gt; Code for function to call a reporter event with micfail'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-4989927069517004266</id><published>2011-09-09T02:54:00.000-07:00</published><updated>2011-09-09T02:54:09.091-07:00</updated><title type='text'>QTP &amp; QC-&gt;Code for create the function to call a reporter event with micPass</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;Function Name : Fun_ReportSuccess&lt;br /&gt;
&#39;Description&amp;nbsp;&amp;nbsp; Use this function to call a reporter event with micPAss&lt;br /&gt;
&#39;Parameters&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strStepName , strDescription&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39; Example&amp;nbsp;&amp;nbsp;&amp;nbsp; Fun_ReportSuccess &quot;Main Menu&quot; , &quot;Header displayed&quot;&lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Function Fun_ReportSuccess(strStepName , strDescription)&lt;br /&gt;
&amp;nbsp;Reporter.ReportEvent micPass , FunTestIterationNumber &amp;amp; &quot;_QTP_&quot; &amp;amp; strStepName , strDescription&lt;br /&gt;
End Function&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/4989927069517004266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-create-function-to-call.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/4989927069517004266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/4989927069517004266'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-for-create-function-to-call.html' title='QTP &amp; QC-&gt;Code for create the function to call a reporter event with micPass'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-8474547329923298871</id><published>2011-09-09T02:52:00.001-07:00</published><updated>2011-09-09T02:52:43.811-07:00</updated><title type='text'>QTP &amp; QC -&gt;Code to capture error message displayed in web dialog page</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;Function Name : Fun_CheckForErrorMessage&lt;br /&gt;
&#39;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Use this function to capture error message displayed in web dialog page&lt;br /&gt;
&#39;Parameters&amp;nbsp;&amp;nbsp;&amp;nbsp;NA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39;Return Val ue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; True - If error exists :: False - If no error&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;NA&lt;br /&gt;
&#39;Base Project&amp;nbsp;&amp;nbsp;EFAS&lt;br /&gt;
&#39; Ex:ample&amp;nbsp;&amp;nbsp;&amp;nbsp; Fun_CheckForErrorMessage()&lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Function Fun_CheckForErrorMessage()&lt;br /&gt;
&amp;nbsp;wait(3)&lt;br /&gt;
&amp;nbsp;Dim desTemp,objChildWinCol,intWindowCounter,intPageCounter,objChildPageCol,objMessageDIV,objStaticCol,intStaticCount,objButtonCol&lt;br /&gt;
&amp;nbsp;strErrorMessage = &quot;&quot;&lt;br /&gt;
&amp;nbsp;Fun_CheckForErrorMessage = False&lt;br /&gt;
&amp;nbsp;&#39;Create temp description object to get the collection&lt;br /&gt;
&amp;nbsp;Set desTemp = Description.Create&lt;br /&gt;
&amp;nbsp;&#39;Desktop object child collection&lt;br /&gt;
&amp;nbsp;Set objChildWinCol = Desktop.ChildObjects(desTemp)&lt;br /&gt;
&amp;nbsp;&#39;Identify the Error window dialog &lt;br /&gt;
&amp;nbsp;For intWindowCounter = 0 to objChildWinCol.Count - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Identify error in a dialog window&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If&amp;nbsp; objChildWinCol(intWindowCounter).GetROProperty(&quot;nativeclass&quot;) = &quot;Internet Explorer_TridentDlgFrame&quot;&amp;nbsp; And&amp;nbsp;&amp;nbsp; Trim(objChildWinCol(intWindowCounter).GetROProperty(&quot;title&quot;)) = &quot;-- Webpage Dialog&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Set objChildPageCol = objChildWinCol(intWindowCounter).ChildObjects(desTemp)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;Get the error message from the error dialog page&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;For intPageCounter = 0 to objChildPageCol.Count - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If&amp;nbsp; objChildPageCol(intPageCounter).GetROProperty(&quot;micclass&quot;) = &quot;Page&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;Identify the error message area and get the innertext&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If Instr(1 , objChildPageCol(intPageCounter).Object.body.InnerHTML , &quot;error_icon&quot; ) &amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;Capture bitmap of the error&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;objChildPageCol(intPageCounter).CaptureBitmap Environment(&quot;ResultDir&quot;) &amp;amp; &quot;\&quot; &amp;amp; FunTestIterationNumber &amp;amp; &quot;_&quot; &amp;amp; &quot;Error snaphot&quot; &amp;amp; &quot;.png&quot; , True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Reporter.ReportEvent micFail , &quot;Error&quot; , &quot;Error snapshot&quot; , Environment(&quot;ResultDir&quot;) &amp;amp; &quot;\&quot; &amp;amp; FunTestIterationNumber &amp;amp; &quot;_&quot; &amp;amp; &quot;Error snaphot&quot; &amp;amp; &quot;.png&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set objMessageDIV = objChildPageCol(intPageCounter).Object.GetElementsByTagName(&quot;DIV&quot;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strErrorMessage =&amp;nbsp; objMessageDIV(objMessageDIV.Length - 1).innerText&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_CheckForErrorMessage = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_CheckForErrorMessage = False&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;Close the error window&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;objChildWinCol(intWindowCounter).Close&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Identify error in a message box&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ElseIf objChildWinCol(intWindowCounter).GetROProperty(&quot;nativeclass&quot;) = &quot;#32770&quot;&amp;nbsp; And&amp;nbsp;&amp;nbsp; Trim(objChildWinCol(intWindowCounter).GetROProperty(&quot;text&quot;)) = &quot;Microsoft Internet Explorer&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;Capture bitmap of the error&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;objChildWinCol(intWindowCounter).CaptureBitmap Environment(&quot;ResultDir&quot;) &amp;amp; &quot;\&quot; &amp;amp; FunTestIterationNumber &amp;amp; &quot;_&quot; &amp;amp; &quot;Error snaphot&quot; &amp;amp; &quot;.png&quot; , True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Reporter.ReportEvent micFail , &quot;Error&quot; , &quot;Error snapshot&quot; , Environment(&quot;ResultDir&quot;) &amp;amp; &quot;\&quot; &amp;amp; FunTestIterationNumber &amp;amp; &quot;_&quot; &amp;amp; &quot;Error snaphot&quot; &amp;amp; &quot;.png&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;Get the collection of&amp;nbsp; message box objects&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Set objStaticCol = objChildWinCol(intWindowCounter).ChildObjects(desTemp)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;For intStaticCount = 0 to objStaticCol.Count -1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;get the collection of static objects text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If objStaticCol(intStaticCount).GetRoProperty(&quot;micclass&quot;) = &quot;Static&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strErrorMessage = strErrorMessage &amp;amp; objStaticCol(intStaticCount).GetRoProperty(&quot;text&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_CheckForErrorMessage = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&#39;close the error window&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;objChildWinCol(intWindowCounter).Close&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Exit For&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;Next&lt;br /&gt;
End Function&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/8474547329923298871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-to-capture-error-message.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/8474547329923298871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/8474547329923298871'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/qtp-qc-code-to-capture-error-message.html' title='QTP &amp; QC -&gt;Code to capture error message displayed in web dialog page'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-1645385701236696192</id><published>2011-09-09T02:51:00.000-07:00</published><updated>2011-09-09T02:51:07.972-07:00</updated><title type='text'>Active X - Code to Select /Deselect checkbox in a farpoint grid activeX control cell</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&#39;****************************************************************************************************************************&lt;br /&gt;
&#39;Function Name : Fun_Acx_TableCheckBox&lt;br /&gt;
&#39;Description&amp;nbsp;&amp;nbsp;&amp;nbsp; Use this function to Select /Deselect checkbox in a farpoint grid activeX control cell&lt;br /&gt;
&#39;Parameters&amp;nbsp;&amp;nbsp;&amp;nbsp;intRow, intCol , strOption&lt;br /&gt;
&#39; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Options:&lt;br /&gt;
&#39; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strOption = on :: Sets the checkbox on&lt;br /&gt;
&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strOption = off :: Sets the checkbox off&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&#39;Return Val ue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; True - If operation is sucess :: False - If the operation is failed&lt;br /&gt;
&#39;Registerd To&amp;nbsp;&amp;nbsp;AcxTable&lt;br /&gt;
&#39; Ex:ample&amp;nbsp;&amp;nbsp;&amp;nbsp; Browser(&quot;Worklist: 322&quot;).Page(&quot;Worklist: 322&quot;).AcxTable(&quot;FarPoint Spread 6.0&quot;).Fun_Acx_TableCheckBox 3,1,&quot;ON&quot;&lt;br /&gt;
&#39;****************************************************************************************************************************&lt;br /&gt;
Public Function Fun_Acx_TableCheckBox(test_object , intRow , intCol , strOption)&lt;br /&gt;
&amp;nbsp;Dim objPageParentObj , objBrowserParentObj&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&#39;Initiate the function return value to false&lt;br /&gt;
&amp;nbsp;Fun_Acx_TableCheckBox = False&lt;br /&gt;
&amp;nbsp;If&amp;nbsp; test_object.Exist Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Make sure the window is visble - ActiveX table control needs to be visible&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Extern.Declare micLong, &quot;ShowWindow&quot;,&quot;user32.dll&quot;, &quot;ShowWindow&quot;, micLong, micLong&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set objPageParentObj = test_object.GetTOProperty(&quot;parent&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set objBrowserParentObj = objPageParentObj.GetTOProperty(&quot;parent&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Extern.ShowWindow objBrowserParentObj.Object.HWND , 3&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&#39;Perform the operation on the checkbox based on the input and return the function status&lt;br /&gt;
&amp;nbsp;&amp;nbsp;If&amp;nbsp; Ucase(strOption) = &quot;ON&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If test_object.GetCellData(intRow , intCol + 1 ) = &quot;(-)&quot; Or test_object.GetCellData(intRow , intCol + 1 ) = &quot;(+)&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Do Until test_object.GetCellData(intRow , intCol + 1 ) = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test_object.ActivateCell intRow , intCol&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test_object.Type &quot; &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intRow = intRow + 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Loop&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_Acx_TableCheckBox = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test_object.ActivateCell intRow , intCol&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test_object.Type &quot; &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_Acx_TableCheckBox = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;ElseIf Ucase(strOption) = &quot;OFF&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If test_object.GetCellData(intRow , intCol + 1 ) = &quot;(-)&quot; Or test_object.GetCellData(intRow , intCol + 1 ) = &quot;(+)&quot; Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Do Until test_object.GetCellData(intRow , intCol + 1 ) = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test_object.ActivateCell intRow , intCol&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test_object.Type &quot; &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intRow = intRow + 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Loop&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_Acx_TableCheckBox = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;test_object.ActivateCell intRow , intCol&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test_object.Type &quot; &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Fun_Acx_TableCheckBox = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
RegisterUserFunc &quot;AcxTable&quot;, &quot;Fun_Acx_TableCheckBox&quot;, &quot;Fun_Acx_TableCheckBox&quot;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/1645385701236696192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/active-x-code-to-select-deselect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/1645385701236696192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/1645385701236696192'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/active-x-code-to-select-deselect.html' title='Active X - Code to Select /Deselect checkbox in a farpoint grid activeX control cell'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-1926204287455402488</id><published>2011-09-09T02:47:00.000-07:00</published><updated>2011-09-09T02:47:50.309-07:00</updated><title type='text'>Code to Returns Test Iteration number for BPT components</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Function FunTestIterationNumber()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If err.Number = 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Dim stepFact, stepList, strIterationNumber, intStpCounter&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set stepFact = QCUtil.CurrentRun.StepFactory &lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set stepList = stepFact.NewList(&quot;&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;strIterationNumber = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;For intStpCounter = 1 to stepList.Count&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;If instr(1, stepList(intStpCounter).Name, &quot;Test Iteration&quot;, 1) &amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strIterationNumber = strIterationNumber &amp;amp; stepList(intStpCounter).Name &amp;amp; &quot;,&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;br /&gt;
&amp;nbsp;&amp;nbsp;Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;strIterationNumber = split(left(strIterationNumber,len(strIterationNumber) - 1), &quot;,&quot;,-1,1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;FunTestIterationNumber=&amp;nbsp; trim(replace(strIterationNumber(Ubound(strIterationNumber)),&quot;Test Iteration &quot;, &quot;&quot;))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set stepFact = Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;Set stepList = Nothing&lt;br /&gt;
&amp;nbsp;Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FunTestIterationNumber = 1&lt;br /&gt;
&amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&#39;Set qtResultsOpt = Nothing&lt;br /&gt;
&amp;nbsp;Err.Clear&lt;br /&gt;
End Function&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/1926204287455402488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/code-to-returns-test-iteration-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/1926204287455402488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/1926204287455402488'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2011/09/code-to-returns-test-iteration-number.html' title='Code to Returns Test Iteration number for BPT components'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-548303867455230864</id><published>2010-12-08T23:21:00.000-08:00</published><updated>2010-12-08T23:21:55.229-08:00</updated><title type='text'>Functionality:- Code for Finding and replacing the word/phase in QC test cases in Test plan.</title><content type='html'>&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;This script helps us in finding and replacing all occurrences of a word/phrase with the given word/phrase in &lt;place w:st=&quot;on&quot;&gt;&lt;placename w:st=&quot;on&quot;&gt;Quality&lt;/placename&gt; &lt;placetype w:st=&quot;on&quot;&gt;Center&lt;/placetype&gt;&lt;/place&gt; test cases in Test Plan (Description and Expected Result fields of Design Steps, to be precise)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;Script needs the following inputs:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; mso-bidi-font-family: &#39;Book Antiqua&#39;; mso-fareast-font-family: &#39;Book Antiqua&#39;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;QC Server name (URL), Domain, Project, Username and Password&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; mso-bidi-font-family: &#39;Book Antiqua&#39;; mso-fareast-font-family: &#39;Book Antiqua&#39;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;Test case name or Test case folder name&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; mso-bidi-font-family: &#39;Book Antiqua&#39;; mso-fareast-font-family: &#39;Book Antiqua&#39;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;Search Item (word/phrase)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; mso-bidi-font-family: &#39;Book Antiqua&#39;; mso-fareast-font-family: &#39;Book Antiqua&#39;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7pt &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;Replace Item (word/phrase)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;#######################################################################3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &#39;Book Antiqua&#39;,&#39;serif&#39;;&quot;&gt;&lt;pre&gt;&#39;==============================================
&#39; Utility name: Find and Replace
&#39;==============================================


&#39; Get the QC Connection parameters from the user
 Set oShell = CreateObject( &quot;WScript.Shell&quot; )
 user = oShell.ExpandEnvironmentStrings(&quot;%UserName%&quot;)


 userName = InputBox(&quot;Enter the username&quot;, &quot;Quality Center Username&quot;, user)
 userPassword = InputBox(&quot;Enter the password&quot;, &quot;Quality Center Password&quot;)
 qcDomain = InputBox(&quot;Enter the domain&quot;, &quot;Quality Center Domain&quot;, &quot;WQA&quot;)
 qcProject = InputBox(&quot;Enter the project&quot;, &quot;Quality Center Project&quot;, &quot;FSDD_SDD&quot;)

&#39; Establish the connection
 Set QCConnection = CreateObject(&quot;TDApiOle80.TDConnection&quot;)
 QCConnection.InitConnectionEx &quot;http://wcpappa018609/qcbin&quot;

 QCConnection.login userName, userPassword
 QCConnection.Connect qcDomain, qcProject


&#39; Testcase and QC Path variables
 Dim tcName
 Dim qcPath
 
 qcPath = InputBox(&quot;Enter the absolute QC folder path&quot;, &quot;QC Folder Path&quot;, &quot;Subject\WAVES\Jan 2009 Reqs\1. Add Bank Draw Number&quot;)
 tcName = InputBox(&quot;Enter the testcase name: (leave blank for all testcases)&quot;, &quot;Testcase Name&quot;, &quot;1.2 Add Bank Draw Number&quot;)

&#39; Search and replace variables
 Dim searchItem &#39; Search Sting
 Dim repItem &#39; Replace string

 searchItem = InputBox(&quot;Enter the search item&quot;, &quot;Search Item&quot;)
 repItem = InputBox(&quot;Enter the replace item&quot;, &quot;Replace Item&quot;)

&#39; Initialize the QC connection variables
 Set tFact = QCConnection.TestFactory
 Set tFilter = tFact.Filter

 tFilter.Filter(&quot;TS_SUBJECT&quot;) = &quot;&quot;&quot;&quot; &amp;amp; qcPath &amp;amp; &quot;&quot;&quot;&quot; &#39; Find the QC Path
 &#39; tFilter.Filter(&quot;TS_NAME&quot;) = &quot;&quot;

&#39; Find the testcase(s) in the given path
 If IsEmpty(tcName) = False Then
  tFilter.Filter(&quot;TS_NAME&quot;) = &quot;&quot;&quot;&quot; &amp;amp; tcName &amp;amp; &quot;&quot;&quot;&quot;
 End If

&#39; Execute the filter
 Set tList = tFact.NewList(tFilter.Text)
 
&#39; Create the log file setup
 Set oFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
 Set oLogFile = oFSO.CreateTextFile(&quot;UpdateActualResult.log&quot;, True)


&#39; Navigate through all the testcases that matched the search criteria (usually just one testcase)
 For i = 1 to tList.Count 
  
  Set myTest = tList.Item(i)
  
  oLogFile.WriteLine vbCrLf &amp;amp; &quot;Log for test case: &quot; &amp;amp; myTest.name

  &#39; Check whether Version Control is enabled for the test
  On Error Resume Next
  Set objVCS = myTest.VCS
  On Error Goto 0
 
  If IsObject(objVCS) Then
   &#39; Check out the test, if it not already checked out
   If objVCS.IsLocked = False Then
    objVCS.CheckOut &quot;&quot;, &quot;&quot;, True

   &#39; Verify if the test is checked out by other user - if Yes, exit test, if No, check out the test
   ElseIf objVCS.IsLocked AND userName &amp;lt;&amp;gt; objVCS.LockedBY Then
    oLogFile.WriteLine &quot;WARNING: &quot; &amp;amp; myTest.name &amp;amp; &quot; is locked by: &quot; &amp;amp; objVCS.LockedBy
    ExitTest
   End If
  End If

  Set dFact = myTest.DesignStepFactory
  Set dStepsList = dFact.NewList(&quot;&quot;)
 
  &#39; Navigate through all the teststeps and do the replacements
  Set oRegEx = New RegExp
  oRegEx.Pattern = searchItem
 
  For Each item in dStepsList
   &#39; Replace in the Step Description &amp;amp; Expected Result
   newStepDesc = oRegEx.Replace(item.StepDescription, repItem)
   newExpResult = oRegEx.Replace(item.StepExpectedResult, repItem)
 
   &#39; Print the log
   If newStepDesc &amp;lt;&amp;gt; item.StepDescription OR newExpResult &amp;lt;&amp;gt; item.StepExpectedResult Then
    oLogFile.WriteLine vbTab &amp;amp; &quot;Replacement in Testcase &quot; &amp;amp; myTest.Name &amp;amp; &quot; step number - &quot; &amp;amp; item.Order + 1
    item.StepDescription = newStepDesc
    item.StepExpectedResult = newExpResult
 
    item.Post
   End If
  Next

 &#39; Clear off the variables
 Set dStepsList = Nothing
 Set dFact = Nothing

 &#39; Check whether test is VCS enabled - if Yes, then check-in the script, if NO, just unlock the test
 If IsObject(objVCS) Then 
  objVCS.CheckIn &quot;&quot;, &quot;&quot;
 End If

 &#39; Unlock the test
 If myTest.IsLocked Then
  myTest.UnLockObject
 End If
Next

&#39; Clear off the variables
 Set tList = Nothing
 Set tFilter = Nothing
 Set tFact = Nothing

&#39; Disconnect from QC
 QCConnection.Disconnect
 QCConnection.Logout
 QCConnection.ReleaseConnection
 
 
&#39; End the script
 MsgBox &quot;All the replacements have been done!  Press Refresh to see the results.&quot;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;
####################################################################################&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/548303867455230864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2010/12/functionality-code-for-finding-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/548303867455230864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/548303867455230864'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2010/12/functionality-code-for-finding-and.html' title='Functionality:- Code for Finding and replacing the word/phase in QC test cases in Test plan.'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-3994206728987550999</id><published>2010-12-08T23:17:00.000-08:00</published><updated>2010-12-08T23:17:20.156-08:00</updated><title type='text'>Functionality:- Code for - To download file from QC from specified source folder to destination folder.</title><content type='html'>&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Input Parameter: &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;mso-bidi-font-family: Arial; mso-fareast-font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;File Name&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;mso-bidi-font-family: Arial; mso-fareast-font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Source Folder&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;mso-bidi-font-family: Arial; mso-fareast-font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;3.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Destination Folder&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;#################################################################################&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Example: &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;File_Name = &quot;Test Data.xls&quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Folder_Name = &quot;Subject\Automation-Regression\Test Data&quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&#39; Specify Destination folder path&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Dest_Folder = &quot;C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\&quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;PassFailFlag = DownloadFileFromQC(Folder_Name,File_Name,Dest_Folder)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;***********************************************************************************************************************************&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;***********************************************************************************************************************************&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Public Function DownloadFileFromQC(Folder_Name,File_Name,Dest_Folder)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FilePath = GetAttachmentFromFolder(Folder_Name, File_Name, Dest_Folder)&lt;span style=&quot;mso-tab-count: 1;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If FilePath &amp;lt;&amp;gt; &quot;&quot; Then&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&#39; Step 2: Delete the file if it already exists&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If objFSO.FileExists(Dest_Folder &amp;amp; File_Name) Then&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 6;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;objFSO.DeleteFile(Dest_Folder &amp;amp; File_Name)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&#39;Step 3: Rename the file&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;objFSO.MoveFile FilePath , Dest_Folder &amp;amp; File_Name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PassFailFlag = 0 &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ElseIf FilePath = &quot;&quot; Then&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;PassFailFlag = 1&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;DownloadFileFromQC = PassFailFlag&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;End Function&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&#39; Get an attachment from Folder&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Public Function GetAttachmentFromFolder(FolderName, FileName, OutPath)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Set TDConnection = QCUtil.TDConnection&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Set treeManager =&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;TDConnection.TreeManager&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Set node = treeManager.nodebypath(FolderName)&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;GetAttachmentFromFolder = GetAttachmentFromTestObject(node, FileName, OutPath)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;End Function&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&#39;Get an attachment from Test Object&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Public Function GetAttachmentFromTestObject (TestObject, FileName, OutPath)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MyPath = GetAttachmentServerPath(TestObject, FileName, LongFileName)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If StrComp(MyPath, &quot;&quot;) = 0 Then&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;GetAttachment = &quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Reporter.ReportEvent&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Fail, &quot;Specified file &#39;&quot;&amp;amp; File_Name &amp;amp;&quot;&#39; does not exsit in &#39;QC\ Test Plan\ Subject\ Automation-Regression\ Test Data&#39; folder.&quot;,&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PassFailFlag = 1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Exit Function&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Right(OutPath, 1) &amp;lt;&amp;gt; &quot;\&quot; Then&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;OutPath = OutPath &amp;amp; &quot;\&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&#39; Load the attachment using the extended storage object&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Set TDConnection = QCUtil.TDConnection&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Set ExtendedStorage = TDConnection.ExtendedStorage&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ExtendedStorage.ServerPath = MyPath&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ExtendedStorage.ClientPath = OutPath&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ExtendedStorage.Load LongFileName, True&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;GetAttachmentFromTestObject = OutPath &amp;amp; LongFileName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Reporter.ReportEvent 0, &quot;File &#39;&quot;&amp;amp; File_Name &amp;amp;&quot;&#39; downloaded into &#39;&quot;&amp;amp; Dest_Folder &amp;amp; &quot;&#39; folder.&quot;,&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PassFailFlag = 0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;End Function&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;&#39;Get an attachment Server Path&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;Public Function GetAttachmentServerPath (Object, FileName, LongFileName)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Set AttachmentFactory = Object.Attachments&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Set AttachmentList = AttachmentFactory.NewList(&quot;&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;For Each Attachment in AttachmentList&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If StrComp(Attachment.Name(1), FileName, 1) = False Then &#39; Equal&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;LongFileName = Attachment.Name&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Pos = Instr(1, Attachment.ServerFileName, Attachment.Name, 1)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;GetAttachmentServerPath = Left(Attachment.ServerFileName, Pos - 1)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Exit Function&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Next&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;GetAttachmentServerPath = &quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;End Function&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;***********************************************************************************************************************************&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;***********************************************************************************************************************************&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 1in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/3994206728987550999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2010/12/functionality-code-for-to-download-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/3994206728987550999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/3994206728987550999'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2010/12/functionality-code-for-to-download-file.html' title='Functionality:- Code for - To download file from QC from specified source folder to destination folder.'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5169168605742060581.post-9202394502496777116</id><published>2010-12-08T23:14:00.000-08:00</published><updated>2010-12-08T23:14:04.052-08:00</updated><title type='text'>Functionality: Code for changing the format of the date to a requested format.</title><content type='html'>&lt;div class=&quot;MsoHeader&quot; style=&quot;margin: 0in 0in 0pt; tab-stops: .5in; text-indent: 0.4in;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;This function Changes the format of the date to a requested format. It will change the given date into following format: &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;1). &quot;mm/dd/yy&quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;2). &quot;mm/dd/yyyy&quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;3). “weekday,Month day,year&quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: x-small;&quot;&gt;4). &quot;yy/mm/dd&quot;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5). “dd/mm/yy&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;______________________________________________________________________________________&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Arial&#39;,&#39;sans-serif&#39;; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-language: AR-SA; mso-fareast-font-family: &#39;Times New Roman&#39;; mso-fareast-language: EN-US;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;Example : Format_Date &quot;01/26/1992&quot;,1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;frmtType = 1 for &quot;mm/dd/yy&quot;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;frmtType = 2 for &quot;mm/dd/yyyy&quot;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;frmtType = 3 for &quot;weekday,Month day,year&quot;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;frmtType = 4 for &quot;yy/mm/dd&quot;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;frmtType = 5 for &quot;dd/mm/yy&quot;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;*******************************************************************************************************************&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;*******************************************************************************************************************&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;Function Format_Date(aDate,frmtType)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Dim Curr_Day,Curr_Mon,Curr_Year,To_Date&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Day = datepart(&quot;d&quot;, aDate)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Mon = datepart(&quot;m&quot;, aDate)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Year = datepart(&quot;yyyy&quot;, aDate)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If frmtType=1 then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Year = Right(Curr_year,2)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Len(Curr_Day) = 1 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Day = &quot;0&quot; &amp;amp; Curr_Day&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Len(Curr_Mon) = 1 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Mon = &quot;0&quot; &amp;amp; Curr_Mon&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;To_Date = Curr_Mon &amp;amp; &quot;/&quot; &amp;amp; Curr_Day &amp;amp; &quot;/&quot; &amp;amp; Curr_Year &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Format_Date = To_Date&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If frmtType = 2 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Len(Curr_Day) = 1 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Day = &quot;0&quot; &amp;amp; Curr_Day&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Len(Curr_Mon) = 1 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Mon = &quot;0&quot; &amp;amp; Curr_Mon&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;To_Date = Curr_Mon &amp;amp; &quot;/&quot; &amp;amp; Curr_Day &amp;amp; &quot;/&quot; &amp;amp; Curr_Year&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Format_Date = To_Date&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If frmtType= 3 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;To_Date = Formatdatetime(aDate,1)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Format_Date = To_Date&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If frmtType = 4 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Year = Right(Curr_year,2)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Len(Curr_Day) = 1 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Day = &quot;0&quot; &amp;amp; Curr_Day&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Len(Curr_Mon) = 1 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Mon = &quot;0&quot; &amp;amp; Curr_Mon&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;To_Date = Curr_Year &amp;amp; &quot;/&quot; &amp;amp; Curr_Mon &amp;amp; &quot;/&quot; &amp;amp; Curr_Day&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Format_Date = To_Date&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If frmtType = 5 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Year = Right(Curr_year,2)&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Len(Curr_Day) = 1 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Day = &quot;0&quot; &amp;amp; Curr_Day&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If Len(Curr_Mon) = 1 Then&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Curr_Mon = &quot;0&quot; &amp;amp; Curr_Mon&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;To_Date = Curr_Day &amp;amp; &quot;/&quot; &amp;amp; Curr_Mon &amp;amp; &quot;/&quot; &amp;amp; Curr_Year &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Format_Date = To_Date&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End If&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;End Function&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;*******************************************************************************************************************&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&#39;*******************************************************************************************************************&lt;/div&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://nareshtestdata.blogspot.com/feeds/9202394502496777116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://nareshtestdata.blogspot.com/2010/12/functionality-code-for-changing-format.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/9202394502496777116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5169168605742060581/posts/default/9202394502496777116'/><link rel='alternate' type='text/html' href='http://nareshtestdata.blogspot.com/2010/12/functionality-code-for-changing-format.html' title='Functionality: Code for changing the format of the date to a requested format.'/><author><name>Naresh gupta</name><uri>http://www.blogger.com/profile/07554907286324281227</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrDgPrzhsoJWTa_HMpduZPBCalNtjGO_rnWFBo0o7hoxufkFLTyAS5rEFQYgbrsb5VEiE0YW1bU7BC5Jq4DwTDZB907EAhrH_jzEBdFT6CtDB01zC4IzSW0Pe__tweCQ/s220/Naresh.jpg'/></author><thr:total>0</thr:total></entry></feed>