<?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/"
	>

<channel>
	<title>Test Automation Blog</title>
	<atom:link href="http://testautomationblog.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://testautomationblog.com</link>
	<description>On software test automation and quality assurance</description>
	<lastBuildDate>Sun, 16 May 2010 09:33:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Keyword-driven Automated Testing</title>
		<link>http://testautomationblog.com/2010/05/16/keyword-driven-automated-testing/</link>
		<comments>http://testautomationblog.com/2010/05/16/keyword-driven-automated-testing/#comments</comments>
		<pubDate>Sun, 16 May 2010 09:26:07 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[jsystem]]></category>
		<category><![CDATA[keyword-driven]]></category>
		<category><![CDATA[QuickTest Professional]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[test management]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=225</guid>
		<description><![CDATA[Is it really possible for non-programmers to create automated tests?]]></description>
			<content:encoded><![CDATA[<p><em>Is it really possible for non-programmers to create automated tests?</em></p>
<p><img class="aligncenter size-full wp-image-228" title="Photo (c) Photo (c) Windell  Oskay" src="http://testautomationblog.com/wp-content/uploads/2010/05/keyword-driven1.jpg" alt="" width="395" height="342" /></p>
<p>Keyword-driven test design is a popular approach in testing teams in big corporations, where the skill levels of QA people are vastly different and most of them are not programmers. The problem of QA managers in such organizations who want to invest in test automation is how to best utilize their available resources. I think that now almost everyone realizes that <a href="http://testautomationblog.com/2009/03/16/record-playback-does-not-work/" target="_self">capture and replay tools fail</a> to create useful and reliable tests, so another approach is needed.</p>
<p>Keyword-driven frameworks rely on a library of small standalone reusable and parametrized building blocks, that represent simple and atomic actions of the application under test. Those are usually developed in a scripting language by the test automation developers. Then those building blocks (or keywords) can be used in some graphical or table-driven interface as reusable actions by testers to create automation without coding. In a way this is very similar to the action-word scripting approach that most automation tools provide (like QTP or the table view in the Selenium IDE).  The difference is that the keywords that the testing tools provide out of the box (usually things like '<em>click_button</em>' and '<em>type</em>' are both very generic (in the sense that they can be used in any application) and very narrow (in the sense that they do very small things like clicking a web button or typing text in a textbox). The successful keyword-driven approach requires keywords that are defined in the semantic level of the tested application (like for example '<em>login</em>' or '<em>register_user</em>').</p>
<p>Here is a quote from my favorite testing book<br />
<a href="http://www.amazon.com/gp/product/B000S1LVBS?ie=UTF8&amp;tag=testautoblog-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000S1LVBS">Lessons Learned in Software Testing: A Context-Driven Approach</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=testautoblog-20&amp;l=as2&amp;o=1&amp;a=B000S1LVBS" border="0" alt="" width="1" height="1" /></p>
<blockquote><p><em>“In contexts that require many nonprogrammers to create automated tests, we believe this is one of the better solutions One drawback of this approach is that you can't write a test unless supported keywords already exist for the tasks you require. Defining and implementing the task functions can become a major undertaking.”</em></p></blockquote>
<p>You can build such a framework in-house, using for example excel tables  to contain the test scripts with  the keywords and their parameters, or  try to use the keyword capabilities of some of the commercial tools on  the market (like the reusable actions in QTP). <a href="http://www.jsystemtest.org/" target="_blank">JSystem</a> is an  open source test automation framework oriented towards API testing that  can also interface with Selenium for creating  keyword-driven UI tests.</p>
<p>While keyword-driven sounds wonderful, it is not a magical methodology that will solve all automation problems and cure world hunger.  I worked on a keyword-driven project while I was an employee of a big corporation. We had an elaborate in-house tool, that could compose the keywords into larger blocks of actions, which were also reusable in tests. The project was a failure. The library of keywords became so huge that no one could figure out which keyword should be used in which context. The tool did not have control flow mechanisms. You could not do loops or if-then-else constructs, which  meant only very simple straightforward test scenarios were possible. The tests were breaking too often and the maintenance effort was higher in my opinion, compared with traditional scripting automation (if done well).</p>
<p>I would like to hear from you about your experiences with keyword-driven automation.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2010/05/16/keyword-driven-automated-testing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Hidden Firefox Profile in Selenium RC Server</title>
		<link>http://testautomationblog.com/2010/05/05/the-hidden-firefox-profile-in-selenium-rc-server/</link>
		<comments>http://testautomationblog.com/2010/05/05/the-hidden-firefox-profile-in-selenium-rc-server/#comments</comments>
		<pubDate>Wed, 05 May 2010 19:24:21 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[capture network traffic]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox profile template]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=210</guid>
		<description><![CDATA[You might not know that Selenium provides a feature which allows you to capture the network traffic during a test. Another useful Selenium feature I use is the ability to start the RC server by providing a specific Firefox profile for running the tests. The problem is that those two features do not work together.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-222" title="Image (c) Arthur Caranta (Arthur40A)" src="http://testautomationblog.com/wp-content/uploads/2010/05/selenium_capture_network_traffic.jpg" alt="Image (c) Arthur Caranta (Arthur40A)" width="300" height="388" /></p>
<p>You might not know that Selenium provides a feature which allows you to capture the network traffic during a test. This might be handy in some cases - for example if you want to check the HTTP response headers returned by the server for some reason or to verify that a specific HTTP request is triggered during a test. I use it for example to verify that a web analytics request is properly triggered on a particular web page.<br />
To use this feature you must start your tests by providing a special option to the start method, i.e.  <strong>selenium.start("captureNetworkTraffic=true");</strong></p>
<p>Another useful Selenium feature I use is the ability to start the RC server by providing a specific Firefox profile for running the tests. Your normal Firefox settings are not used when running tests in <em>*chrome</em> mode. If you want to have a specific Firefox plugin active, or if for example you must use a proxy to access the tested pages, you have to use the <strong>-firefoxProfileTemplate</strong> setting when starting the Selenium server and provide the path to a custom Firefox profile folder that contains all the settings and plugins you want to use.</p>
<p>The problem is that those two features do not work together - when I use the captureNetworkTraffic=true option, I always get some generic Firefox profile and not the one I provide in the firefoxProfileTemplate parameter.</p>
<p>Here is my workaround for this problem. It turns out that inside the Selenium RC server jar there is a folder called <em>customProfileDirCUSTFFCHROME</em>, which contains the small generic firefox profile, used in this case and probably also in the case when you don't provide a custom Firefox profile.</p>
<p>If you want to capture the network traffic and still use a custom Firefox profile,  here  is how you can hack your selenium-server.jar to include a  custom profile.</p>
<ul>
<li>Extract the<em> customProfileDirCUSTFFCHROME</em> folder from selenium-server.jar</li>
<li>Close all Firefox processes. Start Firefox with the <em>-profilemanager</em> option.</li>
<li>Choose 'Create Profile' from the dialog that appears, click 'Choose Folder' and select the folder extracted  from the jar file.This way you will use the profile provided by selenium as a starting point. You can then make configuration changes, add plugins etc.</li>
<li>When you exit firefox, pack all the changed files from the extracted profile folder back into the jar file. Now selenium will always use your custom profile</li>
</ul>
<p>I tested this with Selenium 1.0.3. Works like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2010/05/05/the-hidden-firefox-profile-in-selenium-rc-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Selenium RC 1.0.3 &#8211; To Upgrade Or Not</title>
		<link>http://testautomationblog.com/2010/03/16/selenium-rc-1-0-3-to-upgrade-or-no/</link>
		<comments>http://testautomationblog.com/2010/03/16/selenium-rc-1-0-3-to-upgrade-or-no/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 18:27:09 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Test Tool Reviews]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=192</guid>
		<description><![CDATA[... my advise would be – If you have your tests running smoothly on 1.0.1 and you don't need Snow Leopard and/or FF 3.6 support yet, don't bother upgrading for now ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-197" title="selenium-automation" src="http://testautomationblog.com/wp-content/uploads/2010/03/selenium-automation.jpg" alt="Image (c) George Rex" width="308" height="410" /></p>
<p style="text-align: left;"><a href="http://testautomationblog.com/wp-content/uploads/2010/03/selenium-automation.jpg"><br />
</a>Having used the 1.0.3 version of Selenium RC for several weeks  I now have an overall impression of the new release. The thing that bugged me most was that the upgrade was not as smooth as I hoped  - several tests that previously worked fine with 1.0.1  started to fail with 1.0.3.  We were able to relatively quickly  find workarounds for what seem to be bugs introduced in the new release. Here are two links to the Selenium issue database  in case you run into the same or similar problems - <a href="http://code.google.com/p/selenium/issues/detail?id=400" target="_blank">400 </a>and <a href="http://code.google.com/p/selenium/issues/detail?id=408" target="_blank">408</a>; look for 'XHR ERROR' exceptions in your logs when opening URLs.</p>
<p style="text-align: left;">With the workarounds our tests became as stable as before – not better and not worse. The new version did not really bring any noticeable improvements for me – I have not yet moved to Firefox 3.6 and I am not a Mac user. So my advise would be – If you have your tests running smoothly on 1.0.1 and you don't need Snow Leopard and/or FF 3.6 support yet, don't bother upgrading for now.  There might be a new release on the horizon.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2010/03/16/selenium-rc-1-0-3-to-upgrade-or-no/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Selenium RC Release</title>
		<link>http://testautomationblog.com/2010/02/24/new-selenium-rc-release-1-0-3/</link>
		<comments>http://testautomationblog.com/2010/02/24/new-selenium-rc-release-1-0-3/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 22:08:33 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=188</guid>
		<description><![CDATA[Actually for the last two days there were two new releases of Selenium - 1.0.2 and 1.0.3 (released on the next day following 1.0.2 to fix some issues). The most important feature in the new release for me is Firefox 3.6 support. If you are a Mac fan you will be glad to know that OS [...]]]></description>
			<content:encoded><![CDATA[<p>Actually for the last two days there were two new releases of Selenium - <a href="http://seleniumhq.wordpress.com/2010/02/22/selenium-1-0-2-release-firefox-3-6-and-snow-leopard-support/" target="_blank">1.0.2</a> and <a href="http://seleniumhq.wordpress.com/2010/02/23/selenium-1-0-3-released/" target="_blank">1.0.3</a> (released on the next day following 1.0.2 to fix some issues). The most important feature in the new release for me is Firefox 3.6 support. If you are a Mac fan you will be glad to know that OS X Snow Leopard is now supported too.</p>
<p>When it comes to  tools I use for work I usually prefer to wait a little before upgrading, so that any potential problems that might be there are discovered by other people and not by me (the quick release of 1.0.3 seems to confirm that this is actually a good idea). On the other hand my previous experience with upgrading test automation tools shows that I sometimes run into problems no one else has found.</p>
<p>So this time I decided to upgrade to 1.0.3 early and I will blog about my experience.</p>
<p>By the way, there is also a new <a href="http://seleniumhq.wordpress.com/">official Selenium blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2010/02/24/new-selenium-rc-release-1-0-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test Selenium XPath Expressions Directly in Firefox</title>
		<link>http://testautomationblog.com/2010/01/17/test-selenium-xpath-expressions-directly-in-firefox/</link>
		<comments>http://testautomationblog.com/2010/01/17/test-selenium-xpath-expressions-directly-in-firefox/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 20:40:13 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Test Tool Reviews]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[automation tools]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[test tools]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=178</guid>
		<description><![CDATA[

XPather is a small Firefox extension, which I find indispensable (together with Firebug) when writing Selenium tests.
It adds a 'Show in Xpather...' item to the context menu for all the UI elements on the web page. When selected this option opens a small 'XPather Browser' window showing a  very,  very long XPath expression [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-180" title="xPather" src="http://testautomationblog.com/wp-content/uploads/2010/01/xPather.png" alt="" width="505" height="400" /></p>
<p><a href="http://xpath.alephzarro.com/" target="_blank">XPather</a> is a small Firefox extension, which I find indispensable (together with Firebug) when writing Selenium tests.</p>
<p>It adds a<em> 'Show in Xpather...'</em> item to the context menu for all the UI elements on the web page. When selected this option opens a small<em> 'XPather Browser'</em> window showing a  very,  very long XPath expression which selects the element you chose.</p>
<p>Like <strong>/html/body/table[2]/tbody/tr[2]/td[2]/div[@id='login']/form[@id='gaia_loginform']/div[@id='gaia_loginbox']/table/tbody/tr/td/div/table[@id='gaia_table']/tbody/tr[8]/td[2]/input</strong>, which is the expression you get when you select the 'Sign in' button on the login page of Gmail. Of course you can write your own expressions and test to see what is selected on  the page.  So you can opt to use for example <strong>//input[@name='signIn']</strong>, which is much shorter and better way to locate the same button. I use XPather mostly to interactively test complex expressions whenever I am trying to locate some hard-to-find object on the web page.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2010/01/17/test-selenium-xpath-expressions-directly-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five Reasons Why I Like Selenium</title>
		<link>http://testautomationblog.com/2009/12/25/five-reasons-i-like-selenium/</link>
		<comments>http://testautomationblog.com/2009/12/25/five-reasons-i-like-selenium/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 16:29:02 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Test Tool Reviews]]></category>
		<category><![CDATA[Rational Functional Tester]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[test tools]]></category>
		<category><![CDATA[UI test automation]]></category>
		<category><![CDATA[web automation]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=167</guid>
		<description><![CDATA[

Several months ago I started working on a new test automation project for a web site and one of the first things to do was to evaluate and choose a tool for the task. The two main contenders were Selenium and IBM Rational Functional Tester. I chose Selenium and since then never got to regret [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in; text-align: center;"><img class="aligncenter size-full wp-image-168" title="Image (c) George Rex" src="http://testautomationblog.com/wp-content/uploads/2009/12/selenium-cam.jpg" alt="" width="320" height="213" /></p>
<p style="margin-bottom: 0in;">Several months ago I started working on a new test automation project for a web site and one of the first things to do was to evaluate and choose a tool for the task. The two main contenders were <a href="http://seleniumhq.org/" target="_blank">Selenium</a> and <a href="http://www-01.ibm.com/software/awdtools/tester/functional/" target="_blank">IBM Rational Functional Tester</a>. I chose Selenium and since then never got to regret this choice. Here are some of the main reasons I lke this opensource tool much better than the expensive commerial alternatives for web automation:</p>
<h5 style="margin-bottom: 0in;">Selenium acknowledges the fact that to create useful tests you will have to code them</h5>
<p style="margin-bottom: 0in;">Yes, it gives you a tool that can record sequences of user interactions, but as a whole Selenium is not built with the assumption that this will be the main approach you will use to create your tests. The <a href="http://seleniumhq.org/projects/ide/" target="_blank">recording tool</a> (which is a very easy to install Firefox plugin) is useful as a learning aid and maybe for very simple tests. But what I like most about it is that it can covert your recorded sequence to code in any of the supported scripting languages.   And this brings me to the second point:</p>
<h5 style="margin-bottom: 0in;">You get to choose the scripting language</h5>
<p style="margin-bottom: 0in;">Most commercial automation tools force you to use some Visual Basic dialect  as a scripting language. If you are lucky you get something relatively functional like VBA (with TestPartner) or even VB.NET (with Rational Functional Tester). Otherwise you might be forced to code your tests in VBScript, which is really, really painful (the main reason why I don't like QuickTest Professional). Rational Functional Tester also lets you use Java, which makes it my favorite among the commercial tools.</p>
<p style="margin-bottom: 0in;">Selenium is language-agnostic. You can use almost any programming language you want. C# and Java are popular  and PHP is also an option if you are automating a PHP web app and want to stick to the same language for testing.  <a href="http://mislav.uniqpath.com/poignant-guide/" target="_blank">Ruby</a> is a great language that makes coding fun and the Selenium library for Ruby provides some domain-specific idioms for testing, similar to what Rails does for web development. If you are a Perl, Python or Groovy fan you can use them too. As an additional bonus you will be able to use any development environment you are comfortable with to write your scripts – be it Eclipse, Microsoft Visual Studio or even Vi or Emacs if you want to.</p>
<h5 style="margin-bottom: 0in;">Selenium has a powerful approach for locating UI objects</h5>
<p style="margin-bottom: 0in;">Most automation tools are surprisingly limited in the way they identify the UI objects to interact with. They let you locate a control by some unique property (like id) or by a collection of properties which together identify it uniquely on the web page. In my experience this approach is sufficient in only about half of the real-world cases.</p>
<p style="margin-bottom: 0in;">Imagine a web page containing 3 identical OK buttons. The buttons are exactly the same and have no id's  or anything in their properties to distinguish them. Lets say that the first button is located in a form with id 'signup', the second is inside 'order' and the third is inside 'invoice'.  Most automation tools do not let you easily identify a UI object in relation to other objects in the page, i.e. you can not say <em>I want to click the button with caption 'OK', which is located inside the 'signup' form</em>. Normally the most you get is <em>I want to click the second button with caption 'OK' on the page. </em><span style="font-style: normal;">This will work, but only until you get a new version of your application with added additional OK button above the one you are interested in. The XPath expressions in Selenium can locate objects in the DOM document hierarchy (“//form[@id='signup']//input[@type='button' and @value='OK']”) and are very powerful – for instance you can specify that you want to click the checkbox, which is located inside a table row next to a cell with some specific text in it.</span></p>
<h5 style="margin-bottom: 0in;">Your tests will run on any browser without changes (well, almost)</h5>
<p style="margin-bottom: 0in;">While you should not expect that automated tests will catch most browser-dependent bugs (like broken layout), the option to run your  tests on all browsers that you support is definitely useful. As with programming languages, Selenium offers you a wide choice of browers to run your tests on – not only specific versions of IE and maybe Firefox (the choice you are likely to get from commercial test automation tools), but also Safari, Chrome and Opera. What is more important – about 95% of your tests will run without any changes on all supported browsers. I don't know other automation tool that does this.</p>
<h5 style="margin-bottom: 0in;">It is surprisingly stable and robust for a 1.0 version</h5>
<p style="margin-bottom: 0in;">My experience with test automation is that if you want to run lots of long tests, you have to expect that something will go wrong at some point – random crashes are not that uncommon in this business. Selenium is at least as stable as anything else I have tried and we routinely run hour-long tests without any problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/12/25/five-reasons-i-like-selenium/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How do you test your web services?</title>
		<link>http://testautomationblog.com/2009/12/12/how-to-test-web-services/</link>
		<comments>http://testautomationblog.com/2009/12/12/how-to-test-web-services/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 21:22:48 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Test Tool Reviews]]></category>
		<category><![CDATA[automation tools]]></category>
		<category><![CDATA[JUnit]]></category>
		<category><![CDATA[SoapUI]]></category>
		<category><![CDATA[TestNG]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=162</guid>
		<description><![CDATA[Service oriented architecture is not something new or cool anymore. From enterprise software to web sites, software exposing its functionality via web services is becoming increasingly common.
The question is how to test those services. One option is to use a unit testing framework and create tests calling the services in any programming language you are [...]]]></description>
			<content:encoded><![CDATA[<p>Service oriented architecture is not something new or cool anymore. From enterprise software to web sites, software exposing its functionality via web services is becoming increasingly common.<br />
The question is how to test those services. One option is to use a unit testing framework and create tests calling the services in any programming language you are familiar with (Java + Junit, C# + Nunit, etc). Whether such tests can be called unit, functional or even integration tests is not that important, but this approach is probably best suited for developers creating tests themselves. It is also not quite convenient for ad-hoc or exploratory testing.<br />
A lot of commercial Java application servers such as SAP NetWeaver provide built-in web-based tools for browsing and testing the deployed services on the server. Using such tool is a good option for ad-hoc testing, because usually the services are readily accessible in it without any need for additional configuration. If you don't have access to something like this or if you need more flexibility, like maybe saving the test parameters and creating whole test suites, you might want to look at <a href="http://www.soapui.org" target="_blank">SoapUI</a>. This is a tool for web service testing that has a free (open source) version and a commercial 'Pro' version with additional features. The most useful 'pro' feature for me is the form-based interface for entering the input parameters for the service call. SoapUI allows you to create whole scenarios consisting of services called in sequence and exchanging data between them. It even has some performance / load testing features.<br />
SoapUI seems to be the most popular tool for web service testing, but it has its quirks and is not always as robust as I would like it to be.  I am curious if  anyone knows something better out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/12/12/how-to-test-web-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows 7 Automation API Available on Vista and Server 2008</title>
		<link>http://testautomationblog.com/2009/10/31/windows-7-automation-api-platform-update/</link>
		<comments>http://testautomationblog.com/2009/10/31/windows-7-automation-api-platform-update/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 10:19:56 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Automation API]]></category>
		<category><![CDATA[automation tools]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[UI automation]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Automation API]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=152</guid>
		<description><![CDATA[
Right after the recent release of Windows 7 Microsoft also released a platform update for Windows Vista and Windows Server 2008. The update brings in some of the new technologies from Windows 7 to those operating systems. Besides 'Windows Graphics, Imaging, and XPS Library' (which  actually gives you  new DirectX), 'Windows Portable Devices Platform' and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-154" title="Windows-Automation" src="http://testautomationblog.com/wp-content/uploads/2009/10/Windows-Automation.jpg" alt="Windows-Automation" width="240" height="235" /></p>
<p>Right after the recent release of Windows 7 Microsoft also released a <a href="http://support.microsoft.com/kb/971644" target="_blank">platform update</a> for Windows Vista and Windows Server 2008. The update brings in some of the new technologies from Windows 7 to those operating systems. Besides<strong> </strong>'<strong>Windows Graphics, Imaging, and XPS Library</strong>' (which  actually gives you  new DirectX), '<strong>Windows Portable Devices Platform</strong>' and '<strong>Windows Ribbon and Animation Manager Library</strong>' (I hate the ribbon interface), the update also includes something called '<strong>Windows Automation API</strong>', which "<em>enables accessibility tools and test automations to access the Windows user interface in a consistent way across operating system versions</em>"<br />
Since <strong>Active Accessibility</strong> Microsoft has been providing programmatic interfaces for UI automation in Windows.  So if you are starting a Windows automation project, think about using this approach.  You can script with the <a href="http://msdn.microsoft.com/en-us/library/dd561932%28VS.85%29.aspx" target="_blank">Automation API</a> in any of Microsoft's programming languages (Visual Basic, C# and even C++)  even with the free <a href="http://www.microsoft.com/exPress/" target="_blank">Express Editions of Visual Studio</a>. This will not only be a really cost efficient approach, compared with the prices of automation tools like <strong>QTP </strong>or <strong>RFT</strong>, but probably will produce results which are more stable too.  After all this is the technology Microsoft uses to create UI tests for their own applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/10/31/windows-7-automation-api-platform-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Selecting Unnamed Pop-up Windows in Selenium</title>
		<link>http://testautomationblog.com/2009/10/08/selecting-unnamed-pop-up-windows-in-selenium/</link>
		<comments>http://testautomationblog.com/2009/10/08/selecting-unnamed-pop-up-windows-in-selenium/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 18:11:04 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Pop-Up]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=133</guid>
		<description><![CDATA[If the application you are testing tends to open new browser windows using the target="_blank" technique, you might have some problems with Selenium.]]></description>
			<content:encoded><![CDATA[<p><em>If the application you are testing tends to open new browser windows using the target="_blank" technique, you might have some problems with Selenium.</em></p>
<p>One of the reasons I find <a href="http://seleniumhq.org/" target="_blank">Selenium</a> a great test automation tool for the web  is that it lets you easily run your test scripts on different browsers without too much effort. Most scripts will run smoothly on IE, Firefox and even on more exotic browsers like Safari, Opera and Chrome without needing browser-specific code or having to tweak the test for a particular browser.  One of the few areas where you are likely to face problems is the handling of pop-up windows.  If the application you are testing tends to open new browser windows using the <strong>target="_blank" </strong>technique, you might have some problems with Selenium. The standard <strong>.selectWindow()</strong> method provided by Selenium requires either a title of the pop-up window (which is often the same as the title of the main window) or a name or a variable name (which are both missing, when the window is opened using a target="_blank" link).</p>
<p>You will need a workaround to select such windows and unfortunately the workarounds do not always work the same for all browsers. The following code snippets might be useful if you run into the same problem. They are tested on the <strong>*chrome</strong> and <strong>*iehta</strong> Selenium modes (with Internet Explorer 7 and Firefox 3).</p>
<p>Here is how you can select the pop-up window which is opened after a target="_blank" link is clicked. This actually combines several hacks and workarounds, but works at the end (at least for me):</p>
<pre class="java">        <span style="color: #808080; font-style: italic;">//A hack to select unnamed pop-up windows</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>browser.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;*iehta&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #808080; font-style: italic;">//Find out if Selenium substituted the blank target...</span>
            <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>selenium.<span style="color: #006600;">isElementPresent</span><span style="color: #66cc66;">&#40;</span>
                       <span style="color: #ff0000;">&quot;//a[starts-with(@target,'selenium_blank')]&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #808080; font-style: italic;">// ...and make it notice the new window on IE</span>
                selenium.<span style="color: #006600;">openWindow</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&quot;</span>, selenium.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">&#40;</span>
                      <span style="color: #ff0000;">&quot;//a[starts-with(@target,'selenium_blank')]@target&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> winNames = selenium.<span style="color: #006600;">getAllWindowNames</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #808080; font-style: italic;">//the last one is the pop-up window we want</span>
        selenium.<span style="color: #006600;">waitForPopUp</span><span style="color: #66cc66;">&#40;</span>winNames<span style="color: #66cc66;">&#91;</span>winNames.<span style="color: #006600;">length</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#93;</span>, timeout<span style="color: #66cc66;">&#41;</span>;
        selenium.<span style="color: #006600;">selectWindow</span><span style="color: #66cc66;">&#40;</span>winNames<span style="color: #66cc66;">&#91;</span>winNames.<span style="color: #006600;">length</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>And here is how you can go back to the main window after you finished working with the pop-up:</p>
<pre class="java">        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> winTitles = selenium.<span style="color: #006600;">getAllWindowTitles</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        selenium.<span style="color: #006600;">selectWindow</span><span style="color: #66cc66;">&#40;</span>winTitles<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</pre>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/10/08/selecting-unnamed-pop-up-windows-in-selenium/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TestPartner Review &#8211; Final</title>
		<link>http://testautomationblog.com/2009/10/04/test-partner-review-final/</link>
		<comments>http://testautomationblog.com/2009/10/04/test-partner-review-final/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 17:18:23 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Test Tool Reviews]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[TestPartner]]></category>
		<category><![CDATA[UI automation]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=83</guid>
		<description><![CDATA[...use Window.TextSelect if you can not identify something

This is the final part of my hands-on review of TestPartner. Here I will try to demonstrate the old-style Visual Basic scripting approach, which I find to be more reliable.   I will again use my GMail scenario.
As I mentioned before, the only place I find recording useful is [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><em>...use Window.TextSelect if you can not identify something</em></p>
<p align="left"><em><img class="aligncenter size-full wp-image-148" title="Review" src="http://testautomationblog.com/wp-content/uploads/2009/10/617842_measure_1.jpg" alt="Review" width="225" height="300" /></em></p>
<p align="left">This is the final part of my hands-on review of TestPartner. Here I will try to demonstrate the old-style Visual Basic scripting approach, which I find to be more reliable.   I will again use my GMail scenario.</p>
<p align="left">As I mentioned before, the only place I find recording useful is in such cases when you want to get to know how the tool ‘sees’ the UI.  I have no experience with the UI of GMail,  so I tried to record the scenario first.</p>
<p align="left">This is the script that I got:</p>
<pre class="vb"><span style="color: #b1b100;">Sub</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080;">' Begin record on Monday, 13. September 2009 at</span>
<span style="color: #808080;">' 11:17:07 by Admin</span>
&nbsp;
    <span style="color: #808080;">' Attach to Gmail Email from Google -</span>
    <span style="color: #808080;">' Microsoft Internet Explorer IEWindow</span>
    IEWindow<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Gmail Email from Google - IEWindow&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Attach</span>
&nbsp;
    <span style="color: #808080;">' Attach to Caption='Gmail: Email from</span>
    <span style="color: #808080;">' Google'</span>
    HTMLBrowser<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Caption='Gmail: Email from Google'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Attach</span>
        HTMLEditBox<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name=Email&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">SetText</span> <span style="color: #ff0000;">&quot;testautomationblog&quot;</span>
        HTMLEditBox<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name=Passwd&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">SetPasswordText</span> <span style="color: #ff0000;">&quot;***&quot;</span>
        HTMLButton<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name=signIn&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
&nbsp;
    <span style="color: #808080;">' Attach to Gmail - Inbox (2) -</span>
    <span style="color: #808080;">' testautomationblog@gmailcom - Microsoft</span>
    <span style="color: #808080;">' Internet Explorer IEWindow</span>
    IEWindow<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Gmail - Inbox (2) - IEWindow&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Attach</span>
&nbsp;
    <span style="color: #808080;">' Attach to Name=cgudh0fxq7w2n</span>
    HTMLFrame<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name=cgudh0fxq7w2n&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Attach</span>
        HTMLSpan<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ID=':r3'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span> <span style="color: #cc66cc;">43</span>, <span style="color: #cc66cc;">12</span>
&nbsp;
    <span style="color: #808080;">' Attach to Gmail - Compose Mail -</span>
    <span style="color: #808080;">' testautomationblog@gmailcom - Microsoft</span>
    <span style="color: #808080;">' Internet Explorer IEWindow</span>
    IEWindow<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Gmail - Compose Mail - IEWindow&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Attach</span>
&nbsp;
    <span style="color: #808080;">' Attach to ID=':kl'</span>
    HTMLFrame<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ID=':kl'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Attach</span>
        HTMLFrame<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ID=':kl'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span> <span style="color: #cc66cc;">33</span>, <span style="color: #cc66cc;">19</span>
        HTMLFrame.<span style="color: #b1b100;">Type</span> <span style="color: #ff0000;">&quot;Lorem Ipsum Dolor&quot;</span>
&nbsp;
    <span style="color: #808080;">' Attach to Name=cgudh0fxq7w2n</span>
    HTMLFrame<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name=cgudh0fxq7w2n&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Attach</span>
        HTMLImage<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ID=':ia'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
        HTMLDiv<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ID='' Index=589&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span> <span style="color: #cc66cc;">48</span>, <span style="color: #cc66cc;">7</span>
        HTMLAnchor<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Caption='Drafts (1)'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
        HTMLSpan<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ID='' Index=38&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">MouseDown</span> <span style="color: #cc66cc;">42</span>, <span style="color: #cc66cc;">7</span>
        HTMLDiv<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ID='' Index=702&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">MouseUp</span> <span style="color: #cc66cc;">358</span>, <span style="color: #cc66cc;">25</span>
        HTMLDiv<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ID='' Index=733&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span> <span style="color: #cc66cc;">35</span>, <span style="color: #cc66cc;">12</span>
        HTMLAnchor<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Caption='Sign out'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
&nbsp;
<span style="color: #808080;">' End record on Monday, 13. September 2009 at</span>
<span style="color: #808080;">' 11:18:22 by Admin</span>
&nbsp;
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span></pre>
<p>As I expected, the recorded script could not be run successfully at all.  So what is wrong with it?</p>
<p>The recording has used two ways of addressing the controls. The first one is used with controls that TestPartner attaches to, those seem to be the controls it sees as more important,  for example see line 12. Those controls are identified using something called object maps. The object maps are artifacts that represent definitions of UI controls. When you access a control in a script via an object map, you provide only the name of the map. The actual properties used to identify the control are stored in the map itself. This is the definition of the object map from line 12:</p>
<p style="text-align: center;"><a href="http://testautomationblog.com/wp-content/uploads/2009/04/object_map.png"><img class="aligncenter size-full wp-image-99" title="object_map" src="http://testautomationblog.com/wp-content/uploads/2009/04/object_map.png" alt="object_map" width="323" height="237" /></a></p>
<p>Basically this says that the window we are interested in is an Internet Explorer window with a caption 'Gmail: Email from Google - Microsoft Internet Explorer'. The idea of object maps is that they try to separate how controls are identified from the test logic. If something changes in some particular control, you will have to modify only the relevant object map, but not the script itself.    This looks like a nice idea, but I found that in practice it does not always work that well.</p>
<p>The second way of addressing controls is called 'Raw attach names'. You can see it for example in rows 12-15.  Here you just provide sets of properties and their values as a string.  Notice how TestPartner identifies controls with expressions like "Name=cgudh0fxq7w2n"  and "ID=':r3'".  Unfortunately as we  saw before, those IDs and Names are dynamically generated and change each time you log in GMail. We need a better way to locate those controls. Unfortunately GMail does not provide easy and reliable way to locate some of them (like persistent names or IDs for example), and TestPartner on the other hand does not know how to identify controls based on their relative location in the page.</p>
<p>Still, with some dirty hacks,  I was able to quickly come up with this version of the script which can be executed reliably:</p>
<pre class="vb"><span style="color: #b1b100;">Sub</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
    sText = <span style="color: #ff0000;">&quot;Lorem Ipsum Dolor&quot;</span>
&nbsp;
    <span style="color: #808080;">' -- Login</span>
    IEWindow<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Caption='Gmail*'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Attach</span>
    HTMLEditBox<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name=Email&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">SetText</span> <span style="color: #ff0000;">&quot;testautomationblog&quot;</span>
    HTMLEditBox<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name=Passwd&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">SetPasswordText</span> <span style="color: #ff0000;">&quot;********&quot;</span>
    HTMLButton<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name=signIn&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
&nbsp;
    <span style="color: #808080;">' -- Go to compose mail and type the text</span>
    HTMLSpan<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;InnerText='Compose Mail'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
    HTMLFrame<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Name='' Index=1&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
    IEWindow.<span style="color: #b1b100;">Type</span> sText
&nbsp;
    <span style="color: #808080;">' -- Center and save</span>
    HTMLImage<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Width=20 Height=20 Index=16&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
    Window.<span style="color: #66cc66;">TextSelect</span> <span style="color: #ff0000;">&quot;Save Now&quot;</span>
&nbsp;
    <span style="color: #808080;">' -- Wait for the draft to get saved</span>
    Sleep <span style="color: #cc66cc;">2</span>
    Window.<span style="color: #66cc66;">TextSelect</span> <span style="color: #ff0000;">&quot;Draft saved&quot;</span>
&nbsp;
    <span style="color: #808080;">' -- Go to Drafts</span>
    HTMLAnchor<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Caption='Drafts*'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
    HTMLSpan<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;InnerText='*&quot;</span> &amp;amp; sText &amp;amp; <span style="color: #ff0000;">&quot;'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
&nbsp;
    <span style="color: #808080;">' -- Find the text and discard the draft</span>
    Window.<span style="color: #66cc66;">TextSelect</span> sText
    Window.<span style="color: #66cc66;">TextSelect</span> <span style="color: #ff0000;">&quot;Discard&quot;</span>
&nbsp;
    <span style="color: #808080;">' -- Logout</span>
    HTMLAnchor<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Caption='Sign out'&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #66cc66;">Click</span>
&nbsp;
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span></pre>
<p>This is a quick summary:<br />
At line 6 I attach to the IE window. This is the only place I attach in the script as I only work in one window. I used raw attach instead of object map. Note how I used a wilcard for the window caption. Lines 7-12 are self explainotary. What you see in lines 13 and 14 is really a small hack. The editor area in GMail is contained in a HTMLFrame.  TestPartner can not find anything meaningful in it to identify it, so I used HTMLFrame("Name='' Index=1"), which means basically the first HTMLFrame with empty name.  Because the HTMLFrame object does not support the SetText method (like the HTMLEditBox in line 7 for example), I first click on it (line 13) and then just type in the text (line 14). I do not feel very good about this solution, but it was the first quick hack I could think of.<br />
Identifying the center button in the toolbar of GMail was also problematic (line 17). All the buttons in GMail also lack unique IDs or Names, so I was able to identify the button only as HTMLImage("Width=20 Height=20 Index=16") - the 16th HTMLImage with Width=20 and Height=20 in the page.<br />
Clicking the 'Save Now' button (line 18) also proved more difficult than I anticipated. For some reason it appeared as an empty unidentifiable Div when I tried to locate it with the object browser.  I used the Window.TextSelect trick, which is the most universal way to make TestPartner click on some text you can not identify otherwise.  This is actually a helpful tip - use Window.TextSelect if you can not identify something.  After clicking the 'Save Now' button we have to wait for the backend to actually save the page before moving on with the test. A quick and somewhat dirty way to do this is shown on lines and - wait for 2 seconds and then verify that the "Draft saved" text appears on the page.  I think the rest of the script needs no explanation.</p>
<p>To sum it up - TestPartner can be buggy and confusing, but after all, it is powerful enough to let you automate almost anything.  Maybe you'll need some time to find the right workarounds. Probably they will be ugly. Overall there are much better tools, especially if you want to do web automation. There are worse too, but I am happy that I don't have to use TestPartner anymore.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/10/04/test-partner-review-final/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
