<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: A little abstraction when testing software with Selenium-RC and Java</title>
	<atom:link href="http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-little-abstraction-when-testing-software-with-selenium-rc-and-java</link>
	<description>A different view of software testing</description>
	<lastBuildDate>Fri, 10 Feb 2012 08:37:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Sakthi</title>
		<link>http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-1458</link>
		<dc:creator>Sakthi</dc:creator>
		<pubDate>Sun, 20 Sep 2009 03:37:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-1458</guid>
		<description>This is a good article. I am a recent convert to Selenium from QTP. Looking to see some code examples of identifying webpage objects.

Thanks for sharing...

-Sakthi.</description>
		<content:encoded><![CDATA[<p>This is a good article. I am a recent convert to Selenium from QTP. Looking to see some code examples of identifying webpage objects.</p>
<p>Thanks for sharing&#8230;</p>
<p>-Sakthi.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prashant</title>
		<link>http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-1451</link>
		<dc:creator>Prashant</dc:creator>
		<pubDate>Tue, 08 Sep 2009 17:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-1451</guid>
		<description>This is a good article. However I really having a tough time implementing Selenium in one of my application wherein I am using Ext JS. Folowing is a query, please see if someone could solve it and let me know same.

I have a simple login page written in extension JS in following way:
Ext.onReady(function()
{
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = &#039;side&#039;;
new Ext.Button({
renderTo:&#039;login&#039;,
text: &#039;Login&#039;,
width: 800
}).on(&#039;click&#039;,function()
{
document.forms[0].submit();

});
});

Now when I use selenium testing via browser I get a randomly generated id which when hard coded can very well be used in following way:
selenium.click(&quot;ext-gen26&quot;);

My concern is how to get reference of this generated id, so my selenium test case in JUnit is not dependent on randomly generated ids from Extension JS?

Your suggestions appreciated.

Regards,
Prashant

&lt;em&gt;Prashant, I haven&#039;t worked with Ext so I don&#039;t know exactly how it works, and I don&#039;t know what html it uses to model the button. 

I assume that it must be more complicated than an xpath that checks for a button with the text login:
//button[text()=&#039;Login&#039;]

But if you are using renderTo, doesn&#039;t that mean that you already have an element on the form with the id &#039;login&#039;? If so then don&#039;t you already know the top level element to use as a basis for an xpath for your click locator?

You might find this article useful &lt;a href=&quot;http://www.xeolabs.com/portal/node/34&quot; rel=&quot;nofollow&quot;&gt;http://www.xeolabs.com/portal/node/34&lt;/a&gt;&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>This is a good article. However I really having a tough time implementing Selenium in one of my application wherein I am using Ext JS. Folowing is a query, please see if someone could solve it and let me know same.</p>
<p>I have a simple login page written in extension JS in following way:<br />
Ext.onReady(function()<br />
{<br />
Ext.QuickTips.init();<br />
Ext.form.Field.prototype.msgTarget = &#8216;side&#8217;;<br />
new Ext.Button({<br />
renderTo:&#8217;login&#8217;,<br />
text: &#8216;Login&#8217;,<br />
width: 800<br />
}).on(&#8216;click&#8217;,function()<br />
{<br />
document.forms[0].submit();</p>
<p>});<br />
});</p>
<p>Now when I use selenium testing via browser I get a randomly generated id which when hard coded can very well be used in following way:<br />
selenium.click(&#8220;ext-gen26&#8243;);</p>
<p>My concern is how to get reference of this generated id, so my selenium test case in JUnit is not dependent on randomly generated ids from Extension JS?</p>
<p>Your suggestions appreciated.</p>
<p>Regards,<br />
Prashant</p>
<p><em>Prashant, I haven&#8217;t worked with Ext so I don&#8217;t know exactly how it works, and I don&#8217;t know what html it uses to model the button. </p>
<p>I assume that it must be more complicated than an xpath that checks for a button with the text login:<br />
//button[text()='Login']</p>
<p>But if you are using renderTo, doesn&#8217;t that mean that you already have an element on the form with the id &#8216;login&#8217;? If so then don&#8217;t you already know the top level element to use as a basis for an xpath for your click locator?</p>
<p>You might find this article useful <a href="http://www.xeolabs.com/portal/node/34" rel="nofollow">http://www.xeolabs.com/portal/node/34</a></em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lindsay</title>
		<link>http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-1354</link>
		<dc:creator>Lindsay</dc:creator>
		<pubDate>Thu, 30 Apr 2009 04:48:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-1354</guid>
		<description>Aha! We use these techniques in our functional testing framework. 

It&#039;s written in Java and drives Selenium to test an ExtJS UI. Although the framework is in-house and source is not public, I wrote an article on it that you might find useful

http://www.neocoders.com/portal/articles/selenium-and-extjs

cheers,
Lindsay

&lt;em&gt;Thanks Lindsay, an interesting read - everyone go check it out. :)&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>Aha! We use these techniques in our functional testing framework. </p>
<p>It&#8217;s written in Java and drives Selenium to test an ExtJS UI. Although the framework is in-house and source is not public, I wrote an article on it that you might find useful</p>
<p><a href="http://www.neocoders.com/portal/articles/selenium-and-extjs" rel="nofollow">http://www.neocoders.com/portal/articles/selenium-and-extjs</a></p>
<p>cheers,<br />
Lindsay</p>
<p><em>Thanks Lindsay, an interesting read &#8211; everyone go check it out. :)</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avi Naparstek</title>
		<link>http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-1166</link>
		<dc:creator>Avi Naparstek</dc:creator>
		<pubDate>Fri, 03 Oct 2008 19:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-1166</guid>
		<description>Hi. I liked your post. And admittantly, I found it through a link from Anthony Marcano&#039;s posting, which I liked too.

This brings to mind a technique I&#039;ve been finding myself using on occasion when TDD/BDD&#039;ing code. I&#039;d end up with a fixture looking like this:

[Test]
public void DrawingOnScreen()
{
 GivenACanvasOfSize(100,100);
 WhenDrawingABlackPixelAtPosition(99,99);
 ThenTheResultingPictureShoulBe(expectedBitmap);
}

[Test]
public void DrawingOffScreen()
{
 GivenACanvasOfSize(100,100);
 WhenDrawingABlackPixelAtPosition(101,99);
 ThenTheResultingPictureShouldBe(expectedBitmap);
}
...

The tests are extremely readable and tracable back to stories/requirements, but I must admit having so much refactored untested test-code behind the scenes does make me feel uneasy.

I&#039;ve recently been coaching team members on writing acceptance tests with Selenium.
We havn&#039;t tried any of such techniques (yet), and I too find that the tests focus too much on the task-level (type this and that, click that, assert this textbox etc.) instead of on the activity level (perform an invalid login, assert that we get a &quot;login denied&quot; message etc).

I&#039;m guessing too that stuff like UI-Map can get us closer to an activity-testing DSL, although it has a high learning curve for non-developers to use it. Same with Selenium RC (as opposed to HTML).

 - Avi</description>
		<content:encoded><![CDATA[<p>Hi. I liked your post. And admittantly, I found it through a link from Anthony Marcano&#8217;s posting, which I liked too.</p>
<p>This brings to mind a technique I&#8217;ve been finding myself using on occasion when TDD/BDD&#8217;ing code. I&#8217;d end up with a fixture looking like this:</p>
<p>[Test]<br />
public void DrawingOnScreen()<br />
{<br />
 GivenACanvasOfSize(100,100);<br />
 WhenDrawingABlackPixelAtPosition(99,99);<br />
 ThenTheResultingPictureShoulBe(expectedBitmap);<br />
}</p>
<p>[Test]<br />
public void DrawingOffScreen()<br />
{<br />
 GivenACanvasOfSize(100,100);<br />
 WhenDrawingABlackPixelAtPosition(101,99);<br />
 ThenTheResultingPictureShouldBe(expectedBitmap);<br />
}<br />
&#8230;</p>
<p>The tests are extremely readable and tracable back to stories/requirements, but I must admit having so much refactored untested test-code behind the scenes does make me feel uneasy.</p>
<p>I&#8217;ve recently been coaching team members on writing acceptance tests with Selenium.<br />
We havn&#8217;t tried any of such techniques (yet), and I too find that the tests focus too much on the task-level (type this and that, click that, assert this textbox etc.) instead of on the activity level (perform an invalid login, assert that we get a &#8220;login denied&#8221; message etc).</p>
<p>I&#8217;m guessing too that stuff like UI-Map can get us closer to an activity-testing DSL, although it has a high learning curve for non-developers to use it. Same with Selenium RC (as opposed to HTML).</p>
<p> &#8211; Avi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mude este título &#187; Blog Archive &#187; Testes Automáticos com o Selenium</title>
		<link>http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-518</link>
		<dc:creator>Mude este título &#187; Blog Archive &#187; Testes Automáticos com o Selenium</dc:creator>
		<pubDate>Wed, 21 May 2008 19:06:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-518</guid>
		<description>[...] ajudar nestes casos, o ideal seria abstrair o código Selenium e modularizá-lo em funções ou operações de negócio, para que o código final possa ser lido e [...]</description>
		<content:encoded><![CDATA[<p>[...] ajudar nestes casos, o ideal seria abstrair o código Selenium e modularizá-lo em funções ou operações de negócio, para que o código final possa ser lido e [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antony Marcano</title>
		<link>http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-60</link>
		<dc:creator>Antony Marcano</dc:creator>
		<pubDate>Mon, 17 Mar 2008 10:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.eviltester.com/index.php/2008/03/08/a-little-abstraction-when-testing-software-with-selenium-rc-and-java/#comment-60</guid>
		<description>Nice post Alan! I also use this approach of abstracting behind methods - however, I&#039;ve found my refactorings taking me in the direction of using the Command pattern instead of the methods (for various reasons).

Referencing the &quot;literate API&quot; example in the comment of my post - command classes provide the same aggregation of activities as methods but allow you to minimise change... it also makes it easier to write the syntactic sugar illustrated in the literate API example I tagged on the foot of the post you&#039;ve referenced.

I&#039;ll put together an example that I can share openly (without restriction of NDAs) and post to my blog in the next week or so (hopefully).

&lt;em&gt;Thanks for the comment Antony. I look forward to seeing the blog post you write. I like to see &#039;real&#039; code examples on the internet for at least 2 reasons: so that I can learn, and so that I have more resources to point people at to help their learning.&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>Nice post Alan! I also use this approach of abstracting behind methods &#8211; however, I&#8217;ve found my refactorings taking me in the direction of using the Command pattern instead of the methods (for various reasons).</p>
<p>Referencing the &#8220;literate API&#8221; example in the comment of my post &#8211; command classes provide the same aggregation of activities as methods but allow you to minimise change&#8230; it also makes it easier to write the syntactic sugar illustrated in the literate API example I tagged on the foot of the post you&#8217;ve referenced.</p>
<p>I&#8217;ll put together an example that I can share openly (without restriction of NDAs) and post to my blog in the next week or so (hopefully).</p>
<p><em>Thanks for the comment Antony. I look forward to seeing the blog post you write. I like to see &#8216;real&#8217; code examples on the internet for at least 2 reasons: so that I can learn, and so that I have more resources to point people at to help their learning.</em></p>
]]></content:encoded>
	</item>
</channel>
</rss>

