<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Jump Start FitNesse with Selenium using Generic Fixture</title>
	<atom:link href="http://anubhava.wordpress.com/2008/03/09/jump-start-fitnesse-with-selenium/feed/" rel="self" type="application/rss+xml" />
	<link>http://anubhava.wordpress.com/2008/03/09/jump-start-fitnesse-with-selenium/</link>
	<description>Generic Fixture, just a better FitNesse Fixture</description>
	<lastBuildDate>Wed, 28 Oct 2009 16:34:13 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: anubhava</title>
		<link>http://anubhava.wordpress.com/2008/03/09/jump-start-fitnesse-with-selenium/#comment-68</link>
		<dc:creator>anubhava</dc:creator>
		<pubDate>Wed, 08 Jul 2009 18:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://anubhava.wordpress.com/?p=15#comment-68</guid>
		<description>Dear Aristotelis,

Your post is not that long :)
I believe that Selenium RC has all the functions/features that are supported by Selenium. I use Selenium IDE (in Firefox) to record my test and then change the format to Java to get the API that needs to run in Selenium RC.

Regarding your question WaitForElement short answer is use waitForCondition method in Selenium RC. It has 2 parameters: 1. a javascript conditions and 2. timeout value

To illustrate its use in the form of a DSL I made a small test script to open a FAQ page. This FAQ page only shows questions to users initially and all answers elements remain in hidden div elements. Once user clicks on a question its answer is loaded up using AJAX and its div container becomes visible.

&#124; user clicks on the xpath link named &#124; id(&#039;Q1&#039;) &#124;
&#124; get text from element named &#124; A1 &#124; &#124;
&#124; wait for the answer # &#124; 1 &#124; to show up in &#124; 5 &#124; seconds &#124;
&#124; get text from element named &#124; A1 &#124; &#124;

Once run the first get text command shows blank text since answer hasn&#039;t been loaded. But the second get text command correctly displays the answer because there is a waitForCondition method call in between.

Here is the relevant DSL for above script:
!&#124; DSL Adapter &#124;
&#124; user clicks on the xpath link named &#124; % &#124; click &#124; xpath={1} &#124;
&#124; get text from element named &#124; % &#124; getText &#124; xpath=id(&#039;{1}&#039;) &#124;
&#124; wait for the answer # &#124; % &#124; to show up in &#124; % &#124; seconds &#124; waitForCondition &#124; document.getElementById(&#039;A{1}&#039;).style.display == &#039;block&#039;, {2}000 &#124;
&#124; wait for the 1st answer to show up in &#124; % &#124; seconds &#124; waitForCondition &#124; document.getElementById(&#039;A1&#039;).style.display == &#039;block&#039;, {1}000 &#124;

I will respond to your suggestion of classifying DSL on other post where the comment was made.

cheers,
Anubhava</description>
		<content:encoded><![CDATA[<p>Dear Aristotelis,</p>
<p>Your post is not that long <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I believe that Selenium RC has all the functions/features that are supported by Selenium. I use Selenium IDE (in Firefox) to record my test and then change the format to Java to get the API that needs to run in Selenium RC.</p>
<p>Regarding your question WaitForElement short answer is use waitForCondition method in Selenium RC. It has 2 parameters: 1. a javascript conditions and 2. timeout value</p>
<p>To illustrate its use in the form of a DSL I made a small test script to open a FAQ page. This FAQ page only shows questions to users initially and all answers elements remain in hidden div elements. Once user clicks on a question its answer is loaded up using AJAX and its div container becomes visible.</p>
<p>| user clicks on the xpath link named | id(&#8216;Q1&#8242;) |<br />
| get text from element named | A1 | |<br />
| wait for the answer # | 1 | to show up in | 5 | seconds |<br />
| get text from element named | A1 | |</p>
<p>Once run the first get text command shows blank text since answer hasn&#8217;t been loaded. But the second get text command correctly displays the answer because there is a waitForCondition method call in between.</p>
<p>Here is the relevant DSL for above script:<br />
!| DSL Adapter |<br />
| user clicks on the xpath link named | % | click | xpath={1} |<br />
| get text from element named | % | getText | xpath=id(&#8216;{1}&#8217;) |<br />
| wait for the answer # | % | to show up in | % | seconds | waitForCondition | document.getElementById(&#8216;A{1}&#8217;).style.display == &#8216;block&#8217;, {2}000 |<br />
| wait for the 1st answer to show up in | % | seconds | waitForCondition | document.getElementById(&#8216;A1&#8242;).style.display == &#8216;block&#8217;, {1}000 |</p>
<p>I will respond to your suggestion of classifying DSL on other post where the comment was made.</p>
<p>cheers,<br />
Anubhava</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aristotelis</title>
		<link>http://anubhava.wordpress.com/2008/03/09/jump-start-fitnesse-with-selenium/#comment-67</link>
		<dc:creator>Aristotelis</dc:creator>
		<pubDate>Wed, 08 Jul 2009 10:52:20 +0000</pubDate>
		<guid isPermaLink="false">http://anubhava.wordpress.com/?p=15#comment-67</guid>
		<description>Dear Anubhava,

Thank you for all you have created and keep offering to us.

Could someone show the way to implement (or provide ready-made) the WaitForElement type functionality of Selenium through the Generic Fixture?

----

While trying to evaluate whether to use Generic Fixture and DSL for our test definitions we came across the &#039;WaitForElement Issue&#039; which, after our extensive research, we believe boils down to:

1 » During web  testing, especially for Ajax functionalities, waiting for an element or text to appear/disappear/be created/removed/etc.. becomes very important 

2 » Selenium itself does provide many great functions to do this but Selenium RC does NOT (Selenium Remote Control is the API used by Fitnesse to execute Selenium commands)

3 » It is &#039;apparently easy&#039; to create such functionality using e.g. java classes and there is an example online of the little code necessary

However:  we have spent many hours and have not managed yet to implement these commands and use them easily through the Generic Fixture DSL.

Considering the fundamental importance of commands such as WaitForElement for web testing, I would think that providing them ready, or at least showing the way to implement them, would mean a dramatic decrease in the effort needed to put Generic Fixture + DSL running and testing.

Sorry for the long post,
Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Dear Anubhava,</p>
<p>Thank you for all you have created and keep offering to us.</p>
<p>Could someone show the way to implement (or provide ready-made) the WaitForElement type functionality of Selenium through the Generic Fixture?</p>
<p>&#8212;-</p>
<p>While trying to evaluate whether to use Generic Fixture and DSL for our test definitions we came across the &#8216;WaitForElement Issue&#8217; which, after our extensive research, we believe boils down to:</p>
<p>1 » During web  testing, especially for Ajax functionalities, waiting for an element or text to appear/disappear/be created/removed/etc.. becomes very important </p>
<p>2 » Selenium itself does provide many great functions to do this but Selenium RC does NOT (Selenium Remote Control is the API used by Fitnesse to execute Selenium commands)</p>
<p>3 » It is &#8216;apparently easy&#8217; to create such functionality using e.g. java classes and there is an example online of the little code necessary</p>
<p>However:  we have spent many hours and have not managed yet to implement these commands and use them easily through the Generic Fixture DSL.</p>
<p>Considering the fundamental importance of commands such as WaitForElement for web testing, I would think that providing them ready, or at least showing the way to implement them, would mean a dramatic decrease in the effort needed to put Generic Fixture + DSL running and testing.</p>
<p>Sorry for the long post,<br />
Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WW Yong</title>
		<link>http://anubhava.wordpress.com/2008/03/09/jump-start-fitnesse-with-selenium/#comment-37</link>
		<dc:creator>WW Yong</dc:creator>
		<pubDate>Thu, 21 Aug 2008 08:57:25 +0000</pubDate>
		<guid isPermaLink="false">http://anubhava.wordpress.com/?p=15#comment-37</guid>
		<description>Hi Anubhava,

I was struggling to learn FitNesse &amp; Selenium since I am new to them.  I truly appreciate the tips and examples which you have put up here, keep up the good work!

Yong</description>
		<content:encoded><![CDATA[<p>Hi Anubhava,</p>
<p>I was struggling to learn FitNesse &amp; Selenium since I am new to them.  I truly appreciate the tips and examples which you have put up here, keep up the good work!</p>
<p>Yong</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anubhava</title>
		<link>http://anubhava.wordpress.com/2008/03/09/jump-start-fitnesse-with-selenium/#comment-22</link>
		<dc:creator>anubhava</dc:creator>
		<pubDate>Mon, 12 May 2008 21:54:30 +0000</pubDate>
		<guid isPermaLink="false">http://anubhava.wordpress.com/?p=15#comment-22</guid>
		<description>Hi Martin,

Thanks for the nice words.

Sure you can cross-check a value from web page against a database value. You can take a look at my post on running database queries using Generic Fixture at: http://anubhava.wordpress.com/2008/05/07/database-testing-using-generic-fixture/

Using example query on that page you can execute the database query and store &quot;age&quot; of the given employee in a variable age as follows:
&#124; age=getInt &#124; age &#124; &#124;

And then using the DSL defined in above post you can simply compare variable age with text of an HTML element as follows:
&#124; get text from element named &#124; age_element &#124; &#124; age= &#124;

FitNesse will turn above cell to green if HTML element &quot;age_element&quot; has same value as the value in emp table otherwise it will be marked red.

happy testing,
Anubhava</description>
		<content:encoded><![CDATA[<p>Hi Martin,</p>
<p>Thanks for the nice words.</p>
<p>Sure you can cross-check a value from web page against a database value. You can take a look at my post on running database queries using Generic Fixture at: <a href="http://anubhava.wordpress.com/2008/05/07/database-testing-using-generic-fixture/" rel="nofollow">http://anubhava.wordpress.com/2008/05/07/database-testing-using-generic-fixture/</a></p>
<p>Using example query on that page you can execute the database query and store &#8220;age&#8221; of the given employee in a variable age as follows:<br />
| age=getInt | age | |</p>
<p>And then using the DSL defined in above post you can simply compare variable age with text of an HTML element as follows:<br />
| get text from element named | age_element | | age= |</p>
<p>FitNesse will turn above cell to green if HTML element &#8220;age_element&#8221; has same value as the value in emp table otherwise it will be marked red.</p>
<p>happy testing,<br />
Anubhava</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Cullen</title>
		<link>http://anubhava.wordpress.com/2008/03/09/jump-start-fitnesse-with-selenium/#comment-21</link>
		<dc:creator>Martin Cullen</dc:creator>
		<pubDate>Tue, 29 Apr 2008 21:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://anubhava.wordpress.com/?p=15#comment-21</guid>
		<description>Hi Anubhava,

Thats a great post I must say. I followed all these setup instructions and was able to run my first automated web test in no time. 
However after accomplishing that I would like to know if there is a way I can validate the text from an HTML element (let&#039;s say some html text field) against a value from database table by running a database query? In other words I want to get a value from a web page and compare that value with a value in a database table.

cheers,
Martin</description>
		<content:encoded><![CDATA[<p>Hi Anubhava,</p>
<p>Thats a great post I must say. I followed all these setup instructions and was able to run my first automated web test in no time.<br />
However after accomplishing that I would like to know if there is a way I can validate the text from an HTML element (let&#8217;s say some html text field) against a value from database table by running a database query? In other words I want to get a value from a web page and compare that value with a value in a database table.</p>
<p>cheers,<br />
Martin</p>
]]></content:encoded>
	</item>
</channel>
</rss>
