<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Automation Beyond &#187; Routines</title>
	<atom:link href="http://automation-beyond.com/category/automation/routines/feed/" rel="self" type="application/rss+xml" />
	<link>http://automation-beyond.com</link>
	<description>An engineering approach to Software Testing and Test Automation</description>
	<lastBuildDate>Thu, 02 Feb 2012 14:56:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/</creativeCommons:license>		<item>
		<title>How to find last modified file (TestComplete, QTP, VBScript)</title>
		<link>http://automation-beyond.com/2011/07/26/how-to-find-last-modified-file/</link>
		<comments>http://automation-beyond.com/2011/07/26/how-to-find-last-modified-file/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 10:20:02 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[File System Operations]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[3. Automation]]></category>
		<category><![CDATA[answer]]></category>
		<category><![CDATA[Attribute]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[DateCreated]]></category>
		<category><![CDATA[DateLastAccessed]]></category>
		<category><![CDATA[DateLastModified]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[filename unknown]]></category>
		<category><![CDATA[FileSystemObject]]></category>
		<category><![CDATA[FSO]]></category>
		<category><![CDATA[last]]></category>
		<category><![CDATA[modified]]></category>
		<category><![CDATA[most]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[property]]></category>
		<category><![CDATA[QTP]]></category>
		<category><![CDATA[question]]></category>
		<category><![CDATA[recent]]></category>
		<category><![CDATA[testcomplete]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=3759</guid>
		<description><![CDATA[Reference page: Service Functions – System (QTP, VBScript) Description  Check folder exists &#8211; check folder has files. Iterate through collection of files and keep reference of the most recently modified file (its DateLastModified property is always the highest number). The remaining reference is the one that you need. In case of errors the function returns [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2011%252F07%252F26%252Fhow-to-find-last-modified-file%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FnDgvOC%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22How%20to%20find%20last%20modified%20file%20%28TestComplete%2C%20QTP%2C%20VBScript%29%22%20%7D);"></div>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<p>Reference page: <a title="Service Functions – System (QTP, VBScript)" href="http://automation-beyond.com/2009/12/05/service-functions-system/" target="_blank">Service Functions – System (QTP, VBScript)</a></p>
<h4>Description </h4>
<p>Check folder exists &#8211; check folder has files. Iterate through collection of files and keep reference of the most recently modified file (its <em>DateLastModified</em> property is always the highest number). The remaining reference is the one that you need. In case of errors the function returns <em>Nothing</em>. </p>
<p>Note. In some cases, you may want to use <em>DateCreated</em> or <em>DateLastAccessed</em> properties.</p>
<h4>Implementation</h4>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; title: ;">

Public Function GetLastModifiedFile(ByVal sFolderPath)
  Dim FSO, objFolder, objFile
  Dim objFileResult, longDateTime
  Dim boolRC
 
  Set FSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
  boolRC = FSO.FolderExists(sFolderPath)
  If Not boolRC Then
    Set FSO = Nothing
    Set GetLastModifiedFile = Nothing
    Exit Function
  End If

  Set objFolder = FSO.GetFolder(sFolderPath)
  If objFolder.Files.Count = 0 Then
    Set FSO = Nothing
    Set objFolder = Nothing
    Set GetLastModifiedFile = Nothing
    Exit Function
  End If
 
  Set objFileResult = Nothing
  longDateTime = CDate(0)
 
  For Each objFile in objFolder.Files
 
    If objFile.DateLastModified &gt; longDateTime Then
      Set objFileResult = objFile
      longDateTime = objFile.DateLastModified
    End If
   
  Next
 
  Set FSO = Nothing
  Set objFolder = Nothing
  Set GetLastModifiedFile = objFileResult

End Function
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2008/06/13/createxmldomfromfile/" rel="bookmark" class="crp_title">CreateXMLDOMFromFile (QTP, TestComplete, VBScript)</a></li><li><a href="http://automation-beyond.com/2010/01/12/service-functions-excel/" rel="bookmark" class="crp_title">Service Functions – Excel (QTP, TestComplete, VBScript)</a></li><li><a href="http://automation-beyond.com/2008/11/10/minor-major-defect/" rel="bookmark" class="crp_title">Minor defect as a symptom of a major defect</a></li><li><a href="http://automation-beyond.com/2008/06/30/service-functions-msxmldom/" rel="bookmark" class="crp_title">Service Functions &#8211; MSXMLDOM (QTP, TestComplete, VBScript)</a></li><li><a href="http://automation-beyond.com/2010/11/10/testcomplete-find-child/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child or Find Yourself?</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2011/07/26/how-to-find-last-modified-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DotNetFactory interface functions – SysProcessKill</title>
		<link>http://automation-beyond.com/2011/01/06/sysprocesskill/</link>
		<comments>http://automation-beyond.com/2011/01/06/sysprocesskill/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 12:24:55 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[DotNetClasses]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[.Exists]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[CreateObject]]></category>
		<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[DotNetFactory]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[Kill]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[QTP]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[System.Diagnostics.Process]]></category>
		<category><![CDATA[Terminate]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=4043</guid>
		<description><![CDATA[Close/Terminate Specified Process Parent page: Service Functions – DotNetFactory (QTP, VBScript) Description Create an instance of Process object through DotNetFactory &#8211; search for local processes by name &#8211; iterate through the returned array and close one by one. First attempt &#8211; &#8220;gentle&#8221; close (via CloseMainWindow()). WaitForExit() gives a process some time to finalize, you may customize [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2011%252F01%252F06%252Fsysprocesskill%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22DotNetFactory%20interface%20functions%20%E2%80%93%20SysProcessKill%22%20%7D);"></div>
<h3>Close/Terminate Specified Process</h3>
<p>Parent page: <a title="Permanent Link to Service Functions – DotNetFactory (QTP, VBScript)" rel="bookmark" href="http://automation-beyond.com/2009/08/05/service-functions-dotnetfactory/" target="_blank">Service Functions – DotNetFactory (QTP, VBScript)</a></p>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<h4>Description</h4>
<p>Create an instance of <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx" target="_blank">Process</a> object through DotNetFactory &#8211; search for local processes by name &#8211; iterate through the returned array and close one by one.</p>
<p>First attempt &#8211; &#8220;gentle&#8221; close (via CloseMainWindow()). WaitForExit() gives a process some time to finalize, you may customize the timeout. If didn&#8217;t work &#8211; force close and unload (via Kill()).</p>
<p>Note. Name is case-insensitive but no wildcards supported.</p>
<p>The function returns &#8220;True&#8221; if no specified processes found remaining.</p>
<p>Errors/exceptions might be thrown if your account&#8217;s privileges do not allow closing the process (you can first  try doing this via TaskManager to see if you are allowed). You can also wrap external calls in <em>On Error</em> statement.</p>
<h4>Implementation</h4>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; title: ;">
Public Function SysProcessKill(ByVal sName)
 Dim objSDPMain, objSDP
 Dim objSDPArr
 Dim boolRC
 Dim Iter
 
 Set objSDPMain = DotNetFactory.CreateInstance(&quot;System.Diagnostics.Process&quot;, &quot;System&quot;)
 Set objSDPArr = objSDPMain.GetProcessesByName(sName)

 ' Trying to close first
 For Iter=0 To objSDPArr.length-1
  Set objSDP = objSDPArr.GetValue(CInt(Iter))
  objSDP.CloseMainWindow()
  objSDP.WaitForExit(CInt(5000))
 Next

 Set objSDPArr = objSDPMain.GetProcessesByName(sName)

 'If anything is still left, trying to terminate
 For Iter=0 To objSDPArr.length-1
  Set objSDP = objSDPArr.GetValue(CInt(Iter))
  objSDP.Kill()
  objSDP.WaitForExit(CInt(5000))
 Next

 'Checking if something is still in memory
 Set objSDPArr = objSDPMain.GetProcessesByName(sName)
 boolRC = CInt(objSDPArr.length) = 0

 Set objSDP = Nothing
 Set objSDPArr = Nothing
 Set objSDPMain = Nothing

 SysProcessKill = boolRC

End Function
</pre>
<h4>Examples</h4>
<pre class="brush: vb; title: ;">
boolBanished = True
 boolRC = SysProcessExists(&quot;iexplore&quot;)
 If boolRC Then
  boolGhostProcess = True
  boolBanished = boolBanished AND SysProcessKill(&quot;iexplore&quot;)
 End If
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2009/08/05/service-functions-dotnetfactory/" rel="bookmark" class="crp_title">Service Functions &#8211; DotNetFactory (QTP, VBScript)</a></li><li><a href="http://automation-beyond.com/2011/01/04/sysprocexists/" rel="bookmark" class="crp_title">DotNetFactory interface functions – SysProcessExists</a></li><li><a href="http://automation-beyond.com/2009/06/13/dotnetfactory-2/" rel="bookmark" class="crp_title">DotNetFactory interface functions (2) &#8211; Create Label</a></li><li><a href="http://automation-beyond.com/2009/06/12/dotnetfactory/" rel="bookmark" class="crp_title">DotNetFactory interface functions (1) &#8211; Create Button</a></li><li><a href="http://automation-beyond.com/2009/06/15/dotnetfactory-4/" rel="bookmark" class="crp_title">DotNetFactory interface functions (4) &#8211; Create CheckBox</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2011/01/06/sysprocesskill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DotNetFactory interface functions – SysProcessExists</title>
		<link>http://automation-beyond.com/2011/01/04/sysprocexists/</link>
		<comments>http://automation-beyond.com/2011/01/04/sysprocexists/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 12:35:33 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[DotNetClasses]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[.Exists]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[CreateObject]]></category>
		<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[DotNetFactory]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[QTP]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[System.Diagnostics.Process]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=4041</guid>
		<description><![CDATA[Check If a Process Exists in Memory Parent page: Service Functions – DotNetFactory (QTP, VBScript) Description Create an instance of Process object through DotNetFactory &#8211; search for local processes by name &#8211; return result as boolean. Note. Name is case-insensitive but no wildcards supported. Implementation Public Function SysProcessExists(ByVal sName)  Dim objSDP  Dim objSDPArr  Dim boolRC   [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2011%252F01%252F04%252Fsysprocexists%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22DotNetFactory%20interface%20functions%20%E2%80%93%20SysProcessExists%22%20%7D);"></div>
<h3>Check If a Process Exists in Memory</h3>
<p>Parent page: <a title="Permanent Link to Service Functions – DotNetFactory (QTP, VBScript)" rel="bookmark" href="http://automation-beyond.com/2009/08/05/service-functions-dotnetfactory/" target="_blank">Service Functions – DotNetFactory (QTP, VBScript)</a></p>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<h4>Description</h4>
<p>Create an instance of <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx" target="_blank">Process</a> object through DotNetFactory &#8211; search for local processes by name &#8211; return result as boolean.</p>
<p>Note. Name is case-insensitive but no wildcards supported.</p>
<h4>Implementation</h4>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; title: ;">
Public Function SysProcessExists(ByVal sName)
 Dim objSDP
 Dim objSDPArr
 Dim boolRC
 
 Set objSDP = DotNetFactory.CreateInstance(&quot;System.Diagnostics.Process&quot;, &quot;System&quot;)
 Set objSDPArr = objSDP.GetProcessesByName(sName)

 boolRC = CInt(objSDPArr.length) &gt; 0

 Set objSDP = Nothing
 Set objSDPArr = Nothing

 SysProcessExists = boolRC

End Function
</pre>
<h4>Examples</h4>
<pre class="brush: vb; title: ;">
Dim boolRCboolRC = SysProcessExists(&quot;winword&quot;)
if boolRC Then
  MsgBox(&quot;WinWord is running&quot;)
End If
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2009/08/05/service-functions-dotnetfactory/" rel="bookmark" class="crp_title">Service Functions &#8211; DotNetFactory (QTP, VBScript)</a></li><li><a href="http://automation-beyond.com/2011/01/06/sysprocesskill/" rel="bookmark" class="crp_title">DotNetFactory interface functions – SysProcessKill</a></li><li><a href="http://automation-beyond.com/2009/06/13/dotnetfactory-2/" rel="bookmark" class="crp_title">DotNetFactory interface functions (2) &#8211; Create Label</a></li><li><a href="http://automation-beyond.com/2009/06/12/dotnetfactory/" rel="bookmark" class="crp_title">DotNetFactory interface functions (1) &#8211; Create Button</a></li><li><a href="http://automation-beyond.com/2009/06/15/dotnetfactory-4/" rel="bookmark" class="crp_title">DotNetFactory interface functions (4) &#8211; Create CheckBox</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2011/01/04/sysprocexists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestComplete &#8211; FindChildSync</title>
		<link>http://automation-beyond.com/2010/12/13/testcomplete-findchildsync/</link>
		<comments>http://automation-beyond.com/2010/12/13/testcomplete-findchildsync/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 12:40:53 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[GUI Recognition]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[3. Automation]]></category>
		<category><![CDATA[4. Programming]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Descriptive]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[FindChild]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[testcomplete]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=3918</guid>
		<description><![CDATA[Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. In addition to methods that immediately return a child object, if it’s available, there are others, that help finding objects that only about [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2010%252F12%252F13%252Ftestcomplete-findchildsync%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22TestComplete%20-%20FindChildSync%22%20%7D);"></div>
<p>Parent page: <a title="GUI Recognition with TestComplete" href="http://automation-beyond.com/chapters/tutorials/testcomplete/" target="_blank">GUI Recognition with TestComplete</a></p>
<p>TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. In addition to methods that immediately return a child object, if it’s available, there are others, that help finding objects that only about to appear – and this way you can create parameterized and flexible synchronization points.</p>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<h4>Today&#8217;s post is an example of using custom recognition / synchronization function</h4>
<p>Let&#8217;s start with the example. If you want to execute the code, make sure you also copied custom function FindChildSync provided in the second section.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; highlight: [50]; title: ;"> 
  Dim boolRC
  Dim IEProcess, IExplore
  Dim PropNames, PropValues
  Dim Page1, Page2
  Dim objLink

  'Close browser
  PropNames = Array(&quot;processname&quot;, &quot;index&quot;)
  PropValues = Array(&quot;iexplore&quot;, 1)
  Set IEProcess = Sys.FindChild(PropNames, PropValues, 1, True)
  If IEProcess.Exists then
    IEProcess.Close(10000)
  End if 

  'Open browser and navigate to the web-site 
  Set IExplore = TestedApps.iexplore
  IExplore.Params.SimpleParams.CommandLineParameters = &quot;http://www.google.ca/&quot;
  Call IExplore.Run(1, False, 5000) 

  'Find First Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &lt;a href=&quot;http://www.google.ca/&quot;&gt;http://www.google.ca/&lt;/a&gt;)
  Set Page1 = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  If Not Page1.Exists then
    Exit Sub
  End if

  'Find Second Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/advanced_search?hl=en&quot;)
  Set Page2 = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  boolRC = Page2.Exists 'Returns False
  'Find Web Link Object
  PropNames = Array(&quot;tagName&quot;, &quot;namePropStr&quot;)
  PropValues = Array(&quot;A&quot;, &quot;advanced_search*&quot;)
  Set objLink = Page1.FindChild(PropNames, PropValues, 10, True)

  If Not objLink.Exists then
    Exit Sub
  End if

  objLink.Click
 
  boolRC = Page2.Exists 'Returns False

  'Find Web Page by specific object name
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/advanced_search?hl=en&quot;)
  Set Page2 = FindChildSync(Sys.Process(&quot;iexplore&quot;), PropNames, PropValues, 1, 10)
  boolRC = Page2.Exists 'Returns true
</pre>
<p>At the very end, line #50 (I highlighted it for you), you can see call to a custom function. Unlike <em>WaitChild</em> built-in method in TestComplete, it uses description properties to identify an object.</p>
<p>Below you can find description and source code of the function.</p>
<h4>FindChildSync</h4>
<p><strong>Description</strong></p>
<p>Validate and initialize passed in parameters. &#8211; Start timer. &#8211; Begin identification loop.<br />
Use <em>FindChild</em> standard method to attempt locating child GUI element. Repeat attempts until object is found or timeout is reached.</p>
<p>Returns GUI object&#8217;s reference or <em>Nothing</em> &#8211; if search wasn&#8217;t successful.</p>
<p><strong>Implementation</strong></p>
<pre class="brush: vb; title: ;">Public Function FindChildSync(ByRef objGUIParent, ByRef PropNames, ByRef PropValues, ByVal intDepth, ByVal intSyncMax)
  Dim intStopWatch
  Dim objGUIElement
 
  'Init
  If objGUIParent is Nothing Then
    Set FindChildSync = Nothing
    Exit Function
  End If

  If Not objGUIParent.Exists Then
    Set FindChildSync = Nothing
    Exit Function
  End If
 
  If (Not isArray(PropNames)) OR (Not isArray(PropValues)) Then
    Set FindChildSync = Nothing
    Exit Function
  End If

  If Not isNumeric(intDepth) Then intDepth = 0
  If intDepth &lt; 0 Then intDepth = 0
 
  'Set timer
  If intSyncMax &lt; 0 Then intSyncMax = 0
  intStopWatch = Time()

  'Loop until child object appeared or timeout reached
  Do While True

    On Error Resume Next
      Set objGUIElement = objGUIParent.FindChild(PropNames, PropValues, intDepth, True)
    On Error GoTo 0
 
    If objGUIElement.Exists Then
      'Object's found
      Exit Do
    Else
      'Keep trying
    End If

    'Exit by timeout
   If DateDiff(&quot;s&quot;, intStopWatch, Time()) &gt; intSyncMax Then
      Set FindChildSync = Nothing
      Exit Function
   End If
   
  Loop
 
  Set FindChildSync = objGUIElement
 
End Function
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2010/12/16/automation-tutorials-page-update/" rel="bookmark" class="crp_title">Automation Tutorials &#8211; Page Update</a></li><li><a href="http://automation-beyond.com/2008/06/30/service-functions-msxmldom/" rel="bookmark" class="crp_title">Service Functions &#8211; MSXMLDOM (QTP, TestComplete, VBScript)</a></li><li><a href="http://automation-beyond.com/2008/08/05/p_getxmlelementattrtext/" rel="bookmark" class="crp_title">p_GetXMLElementAttrText (QTP, TestComplete, VBScript)</a></li><li><a href="http://automation-beyond.com/2010/10/14/testcomplete-web-browser-2/" rel="bookmark" class="crp_title">TestComplete &#8211; Handling Web Browser (2)</a></li><li><a href="http://automation-beyond.com/2008/08/06/p_setxmlelementattrtext/" rel="bookmark" class="crp_title">p_SetXMLElementAttrText (QTP, TestComplete, VBScript)</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2010/12/13/testcomplete-findchildsync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestComplete &#8211; Wait then Find</title>
		<link>http://automation-beyond.com/2010/12/07/testcomplete-wait-then-find/</link>
		<comments>http://automation-beyond.com/2010/12/07/testcomplete-wait-then-find/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 12:06:40 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[GUI Recognition]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[3. Automation]]></category>
		<category><![CDATA[4. Programming]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Descriptive]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[FindChild]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[testcomplete]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=3907</guid>
		<description><![CDATA[Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. In addition to methods that immediately return a child object, if it&#8217;s available, there are others, that help finding objects that only about [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2010%252F12%252F07%252Ftestcomplete-wait-then-find%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22TestComplete%20-%20Wait%20then%20Find%22%20%7D);"></div>
<p>Parent page: <a title="GUI Recognition with TestComplete" href="http://automation-beyond.com/chapters/tutorials/testcomplete/" target="_blank">GUI Recognition with TestComplete</a></p>
<p>TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. In addition to methods that immediately return a child object, if it&#8217;s available, there are others, that help finding objects that only about to appear &#8211; and this way you can create parameterized and flexible synchronization points.</p>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<h4>Today’s post is about <em>WaitChild</em> method</h4>
<p>Let&#8217;s start with the example.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; highlight: [47,51]; title: ;">

  Dim boolRC
  Dim IEProcess, IExplore
  Dim PropNames, PropValues, arrComboBox
  Dim Page1, Page2
  Dim objForm, objLink, objComboBox

  'Close browser
  PropNames = Array(&quot;processname&quot;, &quot;index&quot;)
  PropValues = Array(&quot;iexplore&quot;, 1)
  Set IEProcess = Sys.FindChild(PropNames, PropValues, 1, True)
  If IEProcess.Exists then
    IEProcess.Close(10000)
  End if 

  'Open browser and navigate to the web-site 
  Set IExplore = TestedApps.iexplore
  IExplore.Params.SimpleParams.CommandLineParameters = &quot;http://www.google.ca/&quot;
  Call IExplore.Run(1, False, 5000) 

  'Find First Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/&quot;)
  Set Page1 = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  If Not Page1.Exists then
    Exit Sub
  End if

  'Find Second Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/advanced_search?hl=en&quot;)
  Set Page2 = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  boolRC = Page2.Exists 'Returns False
  'Find Web Link Object
  PropNames = Array(&quot;tagName&quot;, &quot;namePropStr&quot;)
  PropValues = Array(&quot;A&quot;, &quot;advanced_search*&quot;)
  Set objLink = Page1.FindChild(PropNames, PropValues, 10, True)

  If Not objLink.Exists then
    Exit Sub
  End if

  objLink.Click
 
  boolRC = Page2.Exists 'Returns False

  'Find Web Page by specific object name
  Set Page2 = Sys.Process(&quot;iexplore&quot;).WaitChild(&quot;Page(&quot;&quot;http://www.google.ca/advanced_search?hl=en&quot;&quot;)&quot;, 1000)
  boolRC = Page2.Exists 'Returns true

  'Find Web Page by generic object name
  Set Page2 = Sys.Process(&quot;iexplore&quot;).WaitChild(&quot;Page*&quot;, 1000)
  boolRC = Page2.Exists 'Returns true
</pre>
<p>We agreed that idly waiting for hard-coded amount of time is inflexible and unreliable synchronization approach. Luckily, we can let TestComplete to wait while checking if the object has appeared.</p>
<p>Note the line 47.  We do not supply property name / property value recognition properties but Page2 will be successfully found. That&#8217;s because <em>WaitChild</em> method simply accepts object&#8217;s name. You can find it out through the Object Properties Viewer.</p>
<p>That means, however, that we have to know it ahead of time; to inspect each GUI object at least once while creating test scripts. And what if another, unexpected page will appear instead?</p>
<p>To address such issues, implement flexible, 2-step synchronization process. First, <em>wait for <strong>a</strong> page to appear</em> (see line 51). Then try to identify it, using description properties, to find out if that is <em><strong>the</strong></em> page you expected.</p>
<p>You can also build your own, custom recognition / synchronization function, and we will talk about that in the next post in this series.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2010/11/10/testcomplete-find-child/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child or Find Yourself?</a></li><li><a href="http://automation-beyond.com/2010/11/23/testcomplete-couldnt-find-gui/" rel="bookmark" class="crp_title">TestComplete &#8211; Couldn&#8217;t Find and Fine About It</a></li><li><a href="http://automation-beyond.com/2010/08/24/testcomplete-gui-extensibility/" rel="bookmark" class="crp_title">TestComplete GUI extensibility with Object Mapping</a></li><li><a href="http://automation-beyond.com/2008/06/30/service-functions-msxmldom/" rel="bookmark" class="crp_title">Service Functions &#8211; MSXMLDOM (QTP, TestComplete, VBScript)</a></li><li><a href="http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child Objects</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2010/12/07/testcomplete-wait-then-find/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestComplete &#8211; Couldn&#8217;t Find and Fine About It</title>
		<link>http://automation-beyond.com/2010/11/23/testcomplete-couldnt-find-gui/</link>
		<comments>http://automation-beyond.com/2010/11/23/testcomplete-couldnt-find-gui/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 12:45:46 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[GUI Recognition]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[3. Automation]]></category>
		<category><![CDATA[4. Programming]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Descriptive]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[FindChild]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[testcomplete]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=3902</guid>
		<description><![CDATA[Parent page: GUI Recognition with TestComplete First of all, a short note to those readers who like to rush into conclusions. This post is about a feature, not bug. Here I continue exploring TestComplete GUI recognition capabilities with code example. The previous two posts (here and here) were about Find, FindChild, and FindAllChildren methods. Today I [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2010%252F11%252F23%252Ftestcomplete-couldnt-find-gui%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22TestComplete%20-%20Couldn%27t%20Find%20and%20Fine%20About%20It%22%20%7D);"></div>
<p>Parent page: <a title="GUI Recognition with TestComplete" href="http://automation-beyond.com/chapters/tutorials/testcomplete/" target="_blank">GUI Recognition with TestComplete</a></p>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<p>First of all, a short note to those readers who like to rush into conclusions.<br />
<strong>This post is about a feature, not bug.</strong></p>
<p>Here I continue exploring TestComplete GUI recognition capabilities with code example. The previous two posts (<a href="http://automation-beyond.com/2010/11/10/testcomplete-find-child/" target="_blank">here</a> and <a href="http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/" target="_blank">here</a>) were about <em>Find</em>, <em>FindChild</em>, and <em>FindAllChildren </em>methods. Today I want to show the case when these methods <em>appear</em> not working, find out why it&#8217;s valid, and how to properly work it out.</p>
<p>Let&#8217;s start with the code example.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; highlight: [49]; title: ;">

  Dim boolRC
  Dim IEProcess, IExplore
  Dim PropNames, PropValues, arrComboBox
  Dim Page1, Page2
  Dim objForm, objLink, objComboBox
  '

  'Close browser
  PropNames = Array(&quot;processname&quot;, &quot;index&quot;)
  PropValues = Array(&quot;iexplore&quot;, 1)
  Set IEProcess = Sys.FindChild(PropNames, PropValues, 1, True)
  If IEProcess.Exists then
    IEProcess.Close(10000)
  End if 
  '

  'Open browser and navigate to the web-site 
  Set IExplore = TestedApps.iexplore
  IExplore.Params.SimpleParams.CommandLineParameters = &quot;http://www.google.ca/&quot;
  Call IExplore.Run(1, False, 5000) 
  '

  'Find First Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/&quot;)
  Set Page1 = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  If Not Page1.Exists then
    Exit Sub
  End if
  '

  'Find Second Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/advanced_search?hl=en&quot;)
  Set Page2 = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  boolRC = Page2.Exists 'Returns False
  '
  'Find Web Link Object
  PropNames = Array(&quot;tagName&quot;, &quot;namePropStr&quot;)
  PropValues = Array(&quot;A&quot;, &quot;advanced_search*&quot;)
  Set objLink = Page1.FindChild(PropNames, PropValues, 10, True)

  If Not objLink.Exists then
    Exit Sub
  End if

  objLink.Click
 
  aqUtils.Delay 2000
 
  boolRC = Page2.Exists 'Still returns False
  '

  'Find Second Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/advanced_search?hl=en&quot;)
  Set Page2 = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  boolRC = Page2.Exists 'Finally, Returns True
  'See explanation why below
</pre>
<p>First of all, note the line 49 (it&#8217;s highlighted). <em>aqUtils.Delay 2000</em> statement there is a primitive synchronization point: we give the web browser 2 seconds to reload the page by making the script idle for that amount of time. Not the best way for a properly created automation, but we will talk about synchronization in the subsequent posts.</p>
<p>Second, note line 51. While the Web Page (&#8220;Advanced Search&#8221;) surely exists on the screen at that point of time during execution, .<em>Exists</em> returns False. That is critically important!</p>
<p style="text-align: center;"><em><strong>With Find/FindChild methods you can not map GUI objects if they are not available.</strong></em></p>
<p>The explanation is simple though. If a parent object does not have a child with description properties matching the specified set, it has nothing to return. The object, that is still returned is just a &#8220;stub&#8221; object which has only .<em>Exists</em> property which is always False. For identification of objects which about to appear TestComplete has another family of methods &#8211; WaitChild, WaitNamedChild, and other. We will try them in the next post.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2010/11/10/testcomplete-find-child/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child or Find Yourself?</a></li><li><a href="http://automation-beyond.com/2010/12/07/testcomplete-wait-then-find/" rel="bookmark" class="crp_title">TestComplete &#8211; Wait then Find</a></li><li><a href="http://automation-beyond.com/2008/06/30/service-functions-msxmldom/" rel="bookmark" class="crp_title">Service Functions &#8211; MSXMLDOM (QTP, TestComplete, VBScript)</a></li><li><a href="http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child Objects</a></li><li><a href="http://automation-beyond.com/2010/12/16/automation-tutorials-page-update/" rel="bookmark" class="crp_title">Automation Tutorials &#8211; Page Update</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2010/11/23/testcomplete-couldnt-find-gui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestComplete &#8211; Find Child Objects</title>
		<link>http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/</link>
		<comments>http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 12:32:31 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[GUI Recognition]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[3. Automation]]></category>
		<category><![CDATA[4. Programming]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[ChildObjects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Descriptive]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[FindChild]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[testcomplete]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=3846</guid>
		<description><![CDATA[Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today&#8217;s post is about FindAllChildren method If proper selection of GUI recognition properties is challenge number zero for a beginner automation [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2010%252F11%252F11%252Ftestcomplete-find-child-objects%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22TestComplete%20-%20Find%20Child%20Objects%22%20%7D);"></div>
<p>Parent page: <a title="GUI Recognition with TestComplete" href="http://automation-beyond.com/chapters/tutorials/testcomplete/" target="_blank">GUI Recognition with TestComplete</a></p>
<p>TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy.</p>
<h4>Today&#8217;s post is about <em>FindAllChildren</em> method</h4>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<p>If proper selection of GUI recognition properties is challenge number zero for a beginner automation engineer, the real first one would be recognition of objects without unique set of recognition properties.  As I <a href="http://automation-beyond.com/2010/10/18/testcomplete-gui-recognition/" target="_blank">mentioned</a>, one possible way is to go up (from the object&#8217;s stand point) the hierarchy and identify parent or grand parent object that has a unique description. Although it sometimes helps, we may still have a family of objects corresponding to the same recognition properties. In some cases, that is enough, and we can simply retrieve them all in array by using <em>FindAllChildren</em> method (see line 57 in the code example below).</p>
<p>Note, that if no single object were found the returned array is empty (UBound gives -1).</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; highlight: [57]; title: ;">

  Dim IEProcess, IExplore
  Dim PropNames, PropValues, arrComboBox
  Dim Page
  Dim objForm, objLink, objComboBox

  'Close browser
  PropNames = Array(&quot;processname&quot;, &quot;index&quot;)
  PropValues = Array(&quot;iexplore&quot;, 1)
  Set IEProcess = Sys.FindChild(PropNames, PropValues, 1, True)
  If IEProcess.Exists then
    IEProcess.Close(10000)
  End if 

  'Open browser and navigate to the web-site 
  Set IExplore = TestedApps.iexplore
  IExplore.Params.SimpleParams.CommandLineParameters = &quot;http://www.google.ca/&quot;
  Call IExplore.Run(1, False, 5000) 

  'Find Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/&quot;)
  Set Page = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  If Not Page.Exists then
    Exit Sub
  End if

  'Find Web Link Object
  PropNames = Array(&quot;tagName&quot;, &quot;namePropStr&quot;)
  PropValues = Array(&quot;A&quot;, &quot;advanced_search*&quot;)
  Set objLink = Page.FindChild(PropNames, PropValues, 10, True)

  If Not objLink.Exists then
    Exit Sub
  End if

  objLink.Click
 
  'Re-identify Web Page
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/advanced_search?hl=en&quot;)
  Set Page = Page.Find(PropNames, PropValues, 1, True)
  If Not Page.Exists then
    Exit Sub
  End if

  'Get Web Form Object
  PropNames = Array(&quot;objecttype&quot;, &quot;outerText&quot;)
  PropValues = Array(&quot;Form&quot;, &quot;Find web pages*&quot;)
  Set objForm = Page.FindChild(PropNames, PropValues, 5, True)
  If Not objForm.Exists then
    Exit Sub
  End if
 
  'Get Child Objects of specified type
  PropNames = Array(&quot;tagName&quot;)
  PropValues = Array(&quot;SELECT&quot;)
  arrComboBox = objForm.FindAllChildren(PropNames, PropValues, 10, True)
 
  'Retrieve object by index
  Set objComboBox = arrComboBox(6) 

  objComboBox.ClickItem(&quot;20 results&quot;)
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2010/11/23/testcomplete-couldnt-find-gui/" rel="bookmark" class="crp_title">TestComplete &#8211; Couldn&#8217;t Find and Fine About It</a></li><li><a href="http://automation-beyond.com/2010/11/10/testcomplete-find-child/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child or Find Yourself?</a></li><li><a href="http://automation-beyond.com/2010/09/30/aq-family-of-objects/" rel="bookmark" class="crp_title">&#8220;aq&#8221; family of objects in TestComplete</a></li><li><a href="http://automation-beyond.com/2010/12/07/testcomplete-wait-then-find/" rel="bookmark" class="crp_title">TestComplete &#8211; Wait then Find</a></li><li><a href="http://automation-beyond.com/2010/12/13/testcomplete-findchildsync/" rel="bookmark" class="crp_title">TestComplete &#8211; FindChildSync</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestComplete &#8211; Find Child or Find Yourself?</title>
		<link>http://automation-beyond.com/2010/11/10/testcomplete-find-child/</link>
		<comments>http://automation-beyond.com/2010/11/10/testcomplete-find-child/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 12:55:58 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[GUI Recognition]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[3. Automation]]></category>
		<category><![CDATA[4. Programming]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Descriptive]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[FindChild]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[testcomplete]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=3841</guid>
		<description><![CDATA[Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today&#8217;s post is about Find method We continue with example from the previous post. What happened when the script clicked on [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2010%252F11%252F10%252Ftestcomplete-find-child%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22TestComplete%20-%20Find%20Child%20or%20Find%20Yourself%3F%22%20%7D);"></div>
<p>Parent page: <a title="GUI Recognition with TestComplete" href="http://automation-beyond.com/chapters/tutorials/testcomplete/" target="_blank">GUI Recognition with TestComplete</a></p>
<p>TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy.</p>
<h4>Today&#8217;s post is about <em>Find</em> method</h4>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<p>We continue with example from the <a href="http://automation-beyond.com/2010/11/09/testcomplete-run-time-gui-recognition/" target="_blank">previous</a> post.</p>
<p>What happened when the script clicked on the link? &#8211; Web page is reloaded; it&#8217;s a new object now.<br />
Before we can operate it, we need to identify it first.</p>
<p>We can go down the hierarchy again starting from <em>Sys</em> or <em>Process</em> objects, but we may re-identify the page using <em>Find</em> method, as in the example below.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; highlight: [40]; title: ;">

  Dim IEProcess, IExplore
  Dim PropNames, PropValues
  Dim Page
  Dim objLink

  'Close browser
  PropNames = Array(&quot;processname&quot;, &quot;index&quot;)
  PropValues = Array(&quot;iexplore&quot;, 1)
  Set IEProcess = Sys.FindChild(PropNames, PropValues, 1, True)
  If IEProcess.Exists then
    IEProcess.Close(10000)
  End if 

  'Open browser and navigate to the web-site 
  Set IExplore = TestedApps.iexplore
  IExplore.Params.SimpleParams.CommandLineParameters = &quot;http://www.google.ca/&quot;
  Call IExplore.Run(1, False, 5000) 

  'Find Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/&quot;)
  Set Page = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  If Not Page.Exists then
    Exit Sub
  End if

  'Find Web Link Object
  PropNames = Array(&quot;tagName&quot;, &quot;namePropStr&quot;)
  PropValues = Array(&quot;A&quot;, &quot;advanced_search*&quot;)
  Set objLink = Page.FindChild(PropNames, PropValues, 10, True)

  If Not objLink.Exists then
    Exit Sub
  End if

  objLink.Click
  
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/advanced_search?hl=en&quot;)
  Set Page = Page.Find(PropNames, PropValues, 1, True)
  If Not Page.Exists then
    Exit Sub
  End if
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2010/11/23/testcomplete-couldnt-find-gui/" rel="bookmark" class="crp_title">TestComplete &#8211; Couldn&#8217;t Find and Fine About It</a></li><li><a href="http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child Objects</a></li><li><a href="http://automation-beyond.com/2010/12/07/testcomplete-wait-then-find/" rel="bookmark" class="crp_title">TestComplete &#8211; Wait then Find</a></li><li><a href="http://automation-beyond.com/2010/12/13/testcomplete-findchildsync/" rel="bookmark" class="crp_title">TestComplete &#8211; FindChildSync</a></li><li><a href="http://automation-beyond.com/2008/06/30/service-functions-msxmldom/" rel="bookmark" class="crp_title">Service Functions &#8211; MSXMLDOM (QTP, TestComplete, VBScript)</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2010/11/10/testcomplete-find-child/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestComplete &#8211; Run-time GUI recognition</title>
		<link>http://automation-beyond.com/2010/11/09/testcomplete-run-time-gui-recognition/</link>
		<comments>http://automation-beyond.com/2010/11/09/testcomplete-run-time-gui-recognition/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 12:23:16 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[GUI Recognition]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[3. Automation]]></category>
		<category><![CDATA[4. Programming]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Descriptive]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[FindChild]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[testcomplete]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=3830</guid>
		<description><![CDATA[Parent page: GUI Recognition with TestComplete TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy. Today&#8217;s post is about FindChild method Let&#8217;s start with the example.   Dim IEProcess, IExplore   Dim PropNames, PropValues   Dim [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2010%252F11%252F09%252Ftestcomplete-run-time-gui-recognition%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22TestComplete%20-%20Run-time%20GUI%20recognition%22%20%7D);"></div>
<p>Parent page: <a title="GUI Recognition with TestComplete" href="http://automation-beyond.com/chapters/tutorials/testcomplete/" target="_blank">GUI Recognition with TestComplete</a></p>
<p>TestComplete provides a whole set of run-time GUI recognition functionalities, based, however, on the same approach: recognition by property values and/or location of the object in internal hierarchy.</p>
<h4>Today&#8217;s post is about <em>FindChild</em> method</h4>
<p>Let&#8217;s start with the example.</p>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<pre class="brush: vb; highlight: [7,8,20,21,28,29]; title: ;">

  Dim IEProcess, IExplore
  Dim PropNames, PropValues
  Dim Page
  Dim objLink
  'Close browser window

  PropNames = Array(&quot;processname&quot;, &quot;index&quot;)
  PropValues = Array(&quot;iexplore&quot;, 1)
  Set IEProcess = Sys.FindChild(PropNames, PropValues, 1, True)
  If IEProcess.Exists then
    IEProcess.Close(10000)
  End if 
 
  'Open browser and navigate to the web-site
  Set IExplore = TestedApps.iexplore
  IExplore.Params.SimpleParams.CommandLineParameters = &quot;http://www.google.ca/&quot;
  Call IExplore.Run(1, False, 5000) 

  'Find Web Page Object
  PropNames = Array(&quot;objecttype&quot;, &quot;url&quot;)
  PropValues = Array(&quot;page&quot;, &quot;http://www.google.ca/&quot;)
  Set Page = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 1, True)
  If Not Page.Exists then
    Exit Sub
  End if

  'Find Web Link Object
  PropNames = Array(&quot;tagName&quot;, &quot;namePropStr&quot;)
  PropValues = Array(&quot;A&quot;, &quot;advanced_search*&quot;)
  Set objLink = Page.FindChild(PropNames, PropValues, 4, True)

  If Not objLink.Exists then
    Exit Sub
  End if

  'Click on the link
  objLink.Click
</pre>
<p>Note highlighted lines: this is where object recognition properties are defined. As you see from lines ## 7,8, TestComplete supports not only GUI objects recognition, but recognition of any object in hierarchy, including processes.</p>
<p>The third parameter of FindChild method is depth, which is defined by position of the object in hierarchy.  In our example, the full path string to the link from the root is:</p>
<p>Sys.Process(&#8220;iexplore&#8221;).Page(&#8220;http://www.google.ca/&#8221;).Form(&#8220;f&#8221;).Table(0).Cell(0, 2).Link(0)</p>
<p>Which means, counting from the <em>Sys</em> object, <em>depth</em> of the link is 6. Counting from the <em>Page</em> object, the <em>depth</em> is 4.</p>
<p>Note, that we specify max depth to search within. An object could be found &#8220;higher&#8221; in the hierarchy; but if it&#8217;s &#8220;lower&#8221; than the depth specified, then search won&#8217;t be successful.</p>
<p>If an object has unique identification properties in wide context, middle step may be omitted, as in the example below.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: vb; highlight: [6,7,22,23]; title: ;">

  Dim IEProcess, IExplore
  Dim PropNames, PropValues
  Dim objLink
  'Close browser window

  PropNames = Array(&quot;processname&quot;, &quot;index&quot;)
  PropValues = Array(&quot;iexplore&quot;, 1)
  Set IEProcess = Sys.FindChild(PropNames, PropValues, 1, True)
  If IEProcess.Exists then
    IEProcess.Close(10000)
  End if 
 

  'Open browser and navigate to the web-site

  Set IExplore = TestedApps.iexplore
  IExplore.Params.SimpleParams.CommandLineParameters = &quot;http://www.google.ca/&quot;
  Call IExplore.Run(1, False, 5000) 

  'Find Web Link Object

  PropNames = Array(&quot;tagName&quot;, &quot;namePropStr&quot;)
  PropValues = Array(&quot;A&quot;, &quot;advanced_search*&quot;)
  Set objLink = Sys.Process(&quot;iexplore&quot;).FindChild(PropNames, PropValues, 10, True)

  If Not objLink.Exists then
    Exit Sub
  End if

  objLink.Click
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2010/12/16/automation-tutorials-page-update/" rel="bookmark" class="crp_title">Automation Tutorials &#8211; Page Update</a></li><li><a href="http://automation-beyond.com/2010/11/10/testcomplete-find-child/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child or Find Yourself?</a></li><li><a href="http://automation-beyond.com/2010/10/18/testcomplete-gui-recognition/" rel="bookmark" class="crp_title">TestComplete &#8211; Object Recognition Properties</a></li><li><a href="http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child Objects</a></li><li><a href="http://automation-beyond.com/2010/12/07/testcomplete-wait-then-find/" rel="bookmark" class="crp_title">TestComplete &#8211; Wait then Find</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2010/11/09/testcomplete-run-time-gui-recognition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestComplete &#8211; Object Recognition Properties</title>
		<link>http://automation-beyond.com/2010/10/18/testcomplete-gui-recognition/</link>
		<comments>http://automation-beyond.com/2010/10/18/testcomplete-gui-recognition/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 12:44:12 +0000</pubDate>
		<dc:creator>Albert Gareev</dc:creator>
				<category><![CDATA[GUI Recognition]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[4. Programming]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[Descriptive]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[testcomplete]]></category>

		<guid isPermaLink="false">http://automation-beyond.com/?p=3811</guid>
		<description><![CDATA[ “I don&#8217;t even see the code anymore; all I see now is blonde, brunette, redhead”, Cypher (Matrix the Movie) Parent page: GUI Recognition with TestComplete Unlike operators from the popular movie, automation engineer sees picture first, but has a need to get inside down to the code. In TestComplete we can do that with Object [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fautomation-beyond.com%252F2010%252F10%252F18%252Ftestcomplete-gui-recognition%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22TestComplete%20-%20Object%20Recognition%20Properties%22%20%7D);"></div>
<blockquote>
<p style="text-align: right;"><em> “I don&#8217;t even see the code anymore;<br />
all I see now is blonde, brunette, redhead”,</em><br />
<strong><em><a href="http://en.wikipedia.org/wiki/List_of_minor_characters_in_the_Matrix_series#Cypher" target="_blank">Cypher</a> (Matrix the Movie)</em></strong></p>
</blockquote>
<p><div style="position: relative; z-index:1;"><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* Banner 468x60 */
google_ad_slot = "8933038987";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<p>Parent page: <a title="GUI Recognition with TestComplete" href="http://automation-beyond.com/chapters/tutorials/testcomplete/" target="_blank">GUI Recognition with TestComplete</a></p>
<p>Unlike operators from the popular movie, automation engineer sees picture first, but has a need to get inside down to the code.<br />
In TestComplete we can do that with Object Properties Wizard which retrieves both static data (like DOM details) and run-time GUI object properties.</p>
<p><a href="http://automation-beyond.com/wp/wp-content/uploads/2010/10/ObjectProperties.jpg" target="_blank"><img class="alignnone size-medium wp-image-3814" style="border: black 1px solid;" title="ObjectProperties" src="http://automation-beyond.com/wp/wp-content/uploads/2010/10/ObjectProperties-300x188.jpg" alt="" width="300" height="188" /></a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4470793787913935";
/* 4 links text line */
google_ad_slot = "5367351963";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>In the picture above, Object Properties dialog displayed properties of Google logo panel, which contains image and text. The table goes over a hundred entries which can be overwhelming at first. However, some properties can not be used in GUI recognition, some other won&#8217;t help to identify object in a unique fashion. </p>
<p>For Web GUI, the most important recognition properties are the following.</p>
<ul>
<li>HTML ID (named &#8220;idStr&#8221; in TestComplete). A unique-per-page value, but not a mandatory HTML attribute.</li>
<li>HTML Tag (tagName). Non-unique but mandatory.</li>
<li>A text within HTML Tag (innerText). Non-unique and not mandatory.</li>
<li>Floating hint text (Title). Non-unique and not mandatory.</li>
</ul>
<p> </p>
<p>Generally, if you don&#8217;t have a single property that allows uniquely identifying GUI object, you should compile a combination of properties which allows that.</p>
<p>Examples.</p>
<ul>
<li>If <em>idStr</em> is not empty use only this property.</li>
<li>Use combination of <em>tagName</em> and <em>innerText</em>, or combination of <em>tagName</em> and <em>Title</em>.</li>
</ul>
<p> </p>
<p>But what if such combination simply doesn&#8217;t exist?</p>
<p>Well, that makes it a little harder. We need to go up the hierarchy and identify parent or grand parent object that has a unique description. Once parent is retrieved, we may reconsider our description properties for the child. For instance, there could be multiple links across the web page, but only one within the particular table.</p>
<p>There are other, more complex GUI recognition challenges, that automation engineers must master &#8211; as testing begins from observation.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://automation-beyond.com/2010/12/16/automation-tutorials-page-update/" rel="bookmark" class="crp_title">Automation Tutorials &#8211; Page Update</a></li><li><a href="http://automation-beyond.com/2010/11/11/testcomplete-find-child-objects/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child Objects</a></li><li><a href="http://automation-beyond.com/2010/11/09/testcomplete-run-time-gui-recognition/" rel="bookmark" class="crp_title">TestComplete &#8211; Run-time GUI recognition</a></li><li><a href="http://automation-beyond.com/2010/12/07/testcomplete-wait-then-find/" rel="bookmark" class="crp_title">TestComplete &#8211; Wait then Find</a></li><li><a href="http://automation-beyond.com/2010/11/10/testcomplete-find-child/" rel="bookmark" class="crp_title">TestComplete &#8211; Find Child or Find Yourself?</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://automation-beyond.com/2010/10/18/testcomplete-gui-recognition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

