<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>andthennothing.net: Selenium on Rails</title>
    <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>&amp;ldquo;first there was a three-legged monkey...&amp;rdquo;</description>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>Shinya: the new version is enabled for test environment only by default.&lt;br /&gt;&lt;br /&gt;

Eric: your patch is included in the new version. Thanks a bunch!</description>
      <pubDate>Sun, 19 Feb 2006 14:30:55 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:7baf7f3a-10db-41cd-bf33-cf5c059e546b</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-689</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>No, the two plugins are two different solutions to the same problem. If you want to write the tests in Ruby and use my plugin, Erik's patch above is the closest match at the moment. Have you noticed &lt;a href='http://andthennothing.net/archives/2006/02/08/selenium-ide' rel="nofollow"&gt;Selenium IDE&lt;/a&gt;? It's a neat way to author and edit Selenese test files.</description>
      <pubDate>Thu, 16 Feb 2006 08:14:27 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:906bf79e-8d45-4e4e-8759-a21976433ed1</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-674</link>
    </item>
    <item>
      <title>"Selenium on Rails" by lstrecv</title>
      <description>&lt;a href='http://svn.viney.net.nz/things/rails/plugins/selenium_testing/README' rel="nofollow"&gt;http://svn.viney.net.nz/things/rails/plugins/selenium_testing/README&lt;/a&gt;

Do you interface with this, use this?</description>
      <pubDate>Thu, 16 Feb 2006 06:26:11 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1fedbac8-29af-4812-b1f5-c45c62008a5e</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-673</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Eric</title>
      <description>&lt;p&gt;I'm glad you like it! I included rdoc and test cases and tried to stick to your style as much as possible.&lt;/p&gt;

&lt;p&gt;And yes, method_missing would be a perfectly valid approach. I put in stubs for two reasons:&lt;/p&gt;


&lt;ol&gt;
&lt;li&gt;It gives rdoc something to document, and&lt;/li&gt;
&lt;li&gt;It would allow future support for keyword arguments, such as ':regex ...', where Selenium has multiple argument formats.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I think that (1) is useful, and (2) is probably not important. So it's up to you how it should work!&lt;/p&gt;

&lt;p&gt;The one thing that I didn't include was easy support for loading fixtures before generating the tables.  There's a really nice version of that {{&lt;a href='http://blog.viney.net.nz/articles/2006/02/09/selenium-testing' rel="nofollow"&gt;here&lt;/a&gt;}}, but I'm not quite sure how it might work in Selenium On Rails.&lt;/p&gt;

&lt;p&gt;Once again, my many thanks for a great plugin! It's going to make several upcoming projects much easier.&lt;/p&gt;</description>
      <pubDate>Wed, 15 Feb 2006 21:40:32 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:96c1cec1-a392-42ff-b6a7-233538ccb14b</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-672</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>Nice patch Erik, good job!&lt;br /&gt;&lt;br /&gt;

I've just browsed through the code briefly, but I have one question: don't you think it's better to use &lt;tt&gt;method_missing&lt;/tt&gt; where no logic is required? It would result in less code and would support &lt;tt&gt;user-extensions.js&lt;/tt&gt;.&lt;br /&gt;&lt;br /&gt;

I'm currently working on rake task support, so I will look into it further when I'm done with that.</description>
      <pubDate>Wed, 15 Feb 2006 21:02:48 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a8f2e667-d649-4963-83ba-1e65c48f4461</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-671</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Eric</title>
      <description>&lt;p&gt;Thanks for the cool plugin, Jonas! I agree, sometimes it's good to duplicate constants.  Other times, though, I just want to write:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&lt;notextile&gt;|assertTitle|#{SITE_NAME}|&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;...and not worry about updating a bunch of test cases when the site name changes. Similarly, I may not want manually update 20 test cases if I re-route some internal URLs.&lt;/p&gt;

&lt;p&gt;My ideal goal is "Once and Only Once": each piece of knowledge should be represented in a single place, and tested in a single place. Perhaps my traditional controller tests already check that certain URLs get routed correctly, and I don't want that information to be duplicated throughout my Selenium tests.&lt;/p&gt;

&lt;p&gt;I hope this make some kind of deranged sense, at least. ;-) In any case--on the off chance you find my patch useful--you're welcome to do anything you want with it. It's the least I can do to thank you for making my life much easier!&lt;/p&gt;</description>
      <pubDate>Wed, 15 Feb 2006 14:06:25 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:3374e398-70cf-4f5e-8899-e9011080531f</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-670</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Eric</title>
      <description>&lt;p&gt;OK, I decided to actually write some code. :-) Click on my name for a patch which enhances Selenium on Rails to support native Ruby test cases, including configuration data and URL routing.&lt;/p&gt;

&lt;p&gt;Here's a sample:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;&lt;notextile&gt;test.setup # Load fixtures
test.open :controller =&amp;gt; 'customer',
          :action =&amp;gt; 'list'
test.assert_title 'Customers'
test.click 'myLink', :wait =&amp;gt; true
test.assert_title 'Customer: *'&lt;/notextile&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

You can &lt;a href='http://www.randomhacks.net/articles/2006/02/15/selenium-on-rails-reloaded' rel="nofollow"&gt;download my patch from here&lt;/a&gt;. (Yes, there's really a link there, even though it isn't underlined.)</description>
      <pubDate>Wed, 15 Feb 2006 13:50:40 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:5889381e-f861-44a2-9000-667a4aa7d122</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-669</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>Thanks Erik! I'll consider it, but isn't it good with duplication in this case? If the constants change for some reason, don't you want the tests to fail?&lt;br /&gt;&lt;br /&gt;

Do you have any example of what kind of constant you're talking about?</description>
      <pubDate>Tue, 14 Feb 2006 21:27:53 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1496f62c-e411-41af-beb6-657ec0efbee1</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-668</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Eric</title>
      <description>Great plugin! One thought: It would be really nice to be able to use ERB from within Selenese. This way, I could look up site configuration variables and use them in test cases, eliminating some unnecessary duplication of constants.</description>
      <pubDate>Tue, 14 Feb 2006 13:05:46 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0cf11fc8-5c19-479c-a4ca-5f4cf97b2da5</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-666</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>Thanks for sorting that out Shinya! &lt;br /&gt;&lt;br /&gt;

I agree that the plugin should only be available for test environment per default. It has been available for development due to convenience, but I'll change it.</description>
      <pubDate>Wed, 08 Feb 2006 22:20:33 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a3b2b55a-8a3d-40b3-a61a-db3f3d724694</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-613</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Shinya</title>
      <description>&lt;p&gt;
What do you think about adding an option to disable Selenium in development environment?
&lt;/p&gt;
&lt;p&gt;
If you don't use fixtures, enabling Selenium in development environment would be useful. But if you do use fixtures, I prefer to disable it because it will mess up the development database.
&lt;/p&gt;
</description>
      <pubDate>Wed, 08 Feb 2006 03:20:59 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:598595e0-b037-4f91-a082-b3448aa5243f</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-595</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Shinya</title>
      <description>Jonas, thanks for the new version. It's working very well.

I found that link= locator doesn't work in Selenium gem, but works if you install Selenium from svn into vendor/selenium/javascript. It seems that the gem version is too old...
</description>
      <pubDate>Wed, 08 Feb 2006 01:50:40 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:050b28cc-11d1-4fab-838d-a6390cf5bec0</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-594</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>Check the new version out and see if it addresses your issues!&lt;br /&gt;&lt;br /&gt;

Shinya: Thanks! Selenium IDE looks great! I'll try it out some time...&lt;br /&gt;&lt;br /&gt;

Joe: link=linktext doesn't work for me either, but I have no idea why. I don't understand how this could be the plugin's fault though. Let me know if you sort it out.</description>
      <pubDate>Tue, 07 Feb 2006 23:37:21 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:08bfe6ef-120f-48e7-8e43-ded9b5245309</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-592</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Joe</title>
      <description>I'm trying to use this (looks great), however I get errors when it tries to use element locators like "link=some link text to match" - it shows an error "Element link=some link text to match not found"

Anyone else getting this?</description>
      <pubDate>Tue, 07 Feb 2006 18:43:13 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2821334c-5b39-4795-a07e-31e10e2816de</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-579</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Shinya</title>
      <description>Comment on Vincent's patch: I also had to modify it to skip files that end with "~", which is an Emacs backup file.
</description>
      <pubDate>Tue, 07 Feb 2006 08:11:06 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fe1369f8-b8dd-45fc-b413-23ea06cf9fb7</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-566</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Shinya</title>
      <description>Very nice plugin!
I'm an author of Selenium IDE which has been released recently (see &lt;a href='http://www.openqa.org/selenium-ide/' rel="nofollow"&gt;http://www.openqa.org/selenium-ide/&lt;/a&gt;), and I've added a custom format to Wiki that can be used to edit tests for Selenium on Rails.

&lt;a href='http://wiki.openqa.org/display/SIDE/SeleniumOnRails' rel="nofollow"&gt;http://wiki.openqa.org/display/SIDE/SeleniumOnRails&lt;/a&gt;
</description>
      <pubDate>Tue, 07 Feb 2006 07:28:37 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:b9b62606-aed8-4142-a44e-b3ce46aeeebc</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-563</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Vincent</title>
      <description>That's just awesome thanks! I gonna start using it.&lt;br /&gt;

I've used the generator to produce a simple test and could run the tests. However, rake test produces errors: 28 tests, 58 assertions, 6 failures, 0 errors&lt;br /&gt;

any idea? I am running ruby 1.8.3 on Ubuntu&lt;br /&gt;

I also noticed that .svn directories are listed as test suites, so I wrote a small patch to omit hidden files:&lt;br /&gt;

Index: vendor/plugins/selenium_on_rails/lib/selenium_on_rails/suite_renderer.rb&lt;br /&gt;
===================================================================&lt;br /&gt;
--- vendor/plugins/selenium_on_rails/lib/selenium_on_rails/suite_renderer.rb    (revision 2)&lt;br /&gt;
+++ vendor/plugins/selenium_on_rails/lib/selenium_on_rails/suite_renderer.rb    (working copy)&lt;br /&gt;
@@ -37,6 +37,7 @@&lt;br /&gt;
       dirs = [] #add dirs to an array in order for files to be processed before dirs&lt;br /&gt;
       Dir.entries(path).each do |e|&lt;br /&gt;
         next if ['.','..'].include? e&lt;br /&gt;
+        next if e.starts_with? '.'&lt;br /&gt;
         filename = File.join path, e&lt;br /&gt;
         if File.directory? filename&lt;br /&gt;
           dirs &amp;lt;&amp;lt; [filename, "#{suite_name}#{e.humanize}."]&lt;br /&gt;</description>
      <pubDate>Tue, 07 Feb 2006 06:02:16 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:3eb49bee-f89e-4ebf-815f-4dc148163d3e</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-560</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Wayne</title>
      <description>Suite, that works!  (pardon the pun...)

I was still getting unbalanced newlines (and 6 test failures), so I changed your clean_text method to:
    text.gsub("\t", '  ').gsub("\r\n", "").gsub("\n","")
to just get rid of em all.

Thanks for the update!</description>
      <pubDate>Tue, 07 Feb 2006 05:34:44 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:db8679b3-6b1e-4cc0-9b02-0a9ab3404df1</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-559</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>Wayne, could you please try the new version out?</description>
      <pubDate>Tue, 07 Feb 2006 01:10:22 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d478d9da-7706-469c-8bd9-e5905f92f933</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-552</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Peter</title>
      <description>This looks very promising. Good work! </description>
      <pubDate>Mon, 06 Feb 2006 23:01:39 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d2e06c60-90e5-4671-892c-615fe9db9882</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-549</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>Thanks for letting me know Wayne! I'll try it on edge rail and see if I get the same error. </description>
      <pubDate>Mon, 06 Feb 2006 20:38:20 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ee69708c-ec40-4501-b64b-f17a5d78a23e</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-548</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Wayne</title>
      <description>Well scratch that, it's still not working.  The current test suite pane is giving a RailsError with:

undefined method `test_suite_name' 

There seems to be some problem with the modules/includes...</description>
      <pubDate>Mon, 06 Feb 2006 20:23:42 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:23bfdf1c-85f2-450c-a74c-40a00ffe8401</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-547</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Wayne</title>
      <description>There is a problem running this plugin with edge rails.  I get a SeleniumController not found.  It seems to be related to the reloading changes that have been checked in recently.  Reverting back to revision 3492 seems to work.

Also, running the tests failed for me, due to newline differences.  On osx/safari, I was getting "\r\n" where the text was expecting "\n".  The following test helper fixed the problem (though I'm sure there's a more elegant way...):

def assert_selenese_text_equal(expected, output)
  assert_equal expected.gsub("\n",""), output.gsub("\t", '  ').gsub("\r\n","").gsub("\n","")
end</description>
      <pubDate>Mon, 06 Feb 2006 20:03:32 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f8f169be-0fb5-43ef-bab1-1deac29d9982</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-546</link>
    </item>
    <item>
      <title>"Selenium on Rails" by Jonas</title>
      <description>You're welcome! &lt;br /&gt;

It's easy to enable the plugin for production environment, just edit &lt;tt&gt;init.rb&lt;/tt&gt;. But then you must make sure that the plugin isn't installed when you're putting the app into production since you almost certainly don't want to let the users run the tests. &lt;br /&gt;

Sorry, but I don't know if it's possible to test caching with Selenium. Let me know if you find out :-)</description>
      <pubDate>Mon, 06 Feb 2006 19:22:19 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:bd772b96-20a4-4da9-9de5-c90d34158562</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-544</link>
    </item>
    <item>
      <title>"Selenium on Rails" by YAChris</title>
      <description>Hello,

    Thanks!  I've wanted to try Selenium for quite some time, now I have no excuse :-).  I'm curious about the line:

&gt; Selenium on Rails is disabled for production environments.

since one thing I've wanted to be able to test is caching.  Now I know caching can be turned on in development, so I guess it would just be cool if it could be tested via selenium.  Any ideas?</description>
      <pubDate>Mon, 06 Feb 2006 18:18:44 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fd31de16-3ff8-4d29-a22e-9cd65d3fc0e6</guid>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails#comment-543</link>
    </item>
    <item>
      <title>Selenium on Rails</title>
      <description>&lt;p&gt;&lt;ins&gt;New &lt;a href="http://andthennothing.net/archives/2006/02/19/new-version-of-selenium-on-rails"&gt;version&lt;/a&gt;.&lt;/ins&gt;&lt;/p&gt;


	&lt;p&gt;&lt;ins&gt;Updates at the end.&lt;/ins&gt;&lt;/p&gt;


	&lt;p&gt;One of the things I like about Rails is the built-in support for testing &amp;#8211; it&amp;#8217;s almost hard not to write tests. But even if I write extensive tests (currently &amp;#8220;Code to Test Ratio: 1:3.4&amp;#8221; according to &lt;code&gt;rake stats&lt;/code&gt; in a small toy project) I still feel that it&amp;#8217;s not enough. I occasionally get the urge to fire up the browser and click around to test that everything works. You shouldn&amp;#8217;t have to &amp;#8220;click around&amp;#8221; to test that you haven&amp;#8217;t broken anything that often (although it&amp;#8217;s probably good to use the browser for checking usability).&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s where &lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt; comes in. It&amp;#8217;s a javascript based functional test tool that uses &lt;a href="http://fit.c2.com/"&gt;Fit&lt;/a&gt; like test scripts to test web application directly in the browser. There are other ways to test in browsers, like &lt;a href="http://wtr.rubyforge.org/"&gt;Watir&lt;/a&gt;, but they don&amp;#8217;t run in any browser/platform so I think that javascript based solutions are the way to go. And for javascript based solutions I don&amp;#8217;t know if there are any competition at all.&lt;/p&gt;


	&lt;p&gt;However, I didn&amp;#8217;t think that vanilla Selenium worked as smooth as it should in a Rails context. So I&amp;#8217;ve been writing a plug-in that makes the experience much better, &lt;span class="caps"&gt;IMHO&lt;/span&gt;. It took a bit longer than what I thought, but I&amp;#8217;ve been busy and stuff like this takes time to get into a good enough state to release to the world.&lt;/p&gt;


	&lt;p&gt;Please try it out and let me know if you have any problems using it or if you have suggestions for improvements!&lt;/p&gt;


	&lt;h3&gt;Overview&lt;/h3&gt;


	&lt;p&gt;Selenium on Rails provides an easy way to test Rails application with &lt;a href="http://www.openqa.org/selenium/"&gt;Selenium&lt;/a&gt;.&lt;/p&gt;


This plugin does four things:
	&lt;ol&gt;
	&lt;li&gt;The Selenium files don&amp;#8217;t have to pollute &lt;tt&gt;/public&lt;/tt&gt;, they can stay in the Selenium gem or in &lt;tt&gt;/vendor/selenium/javascript&lt;/tt&gt;.&lt;/li&gt;
		&lt;li&gt;No need to create suite files, they are generated on the fly&amp;#8212;one suite per directory in &lt;tt&gt;/test/selenium&lt;/tt&gt; (suites can be nested).&lt;/li&gt;
		&lt;li&gt;Instead of writing the test cases in &lt;span class="caps"&gt;HTML&lt;/span&gt; you can use ERb/RHTML or Selenese (a template provided by this plugin).&lt;/li&gt;
		&lt;li&gt;Loading of fixtures and wiping of session (&lt;tt&gt;/selenium/setup&lt;/tt&gt;).&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;Selenium on Rails is disabled for production environments.&lt;/p&gt;


	&lt;h3&gt;Installation&lt;/h3&gt;


	&lt;ol&gt;
	&lt;li&gt;Selenium needs to be available. It could either be installed as a gem (&lt;tt&gt;gem install selenium&lt;/tt&gt;) or in &lt;tt&gt;/vendor/selenium/&lt;/tt&gt;.&lt;/li&gt;
		&lt;li&gt;Install Selenium on Rails: &lt;tt&gt;script/plugin install http://andthennothing.net/svn/public/selenium_on_rails/&lt;/tt&gt;&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;If RedCloth is available the Selenese test cases can use it for better markup.&lt;/em&gt;&lt;/li&gt;
		&lt;li&gt;Run the Rakefile in the plugin&amp;#8217;s directory to run the tests in order to see that everything works. (If RedCloth isn&amp;#8217;t installed a few tests will fail since they assume RedCloth is installed.)&lt;/li&gt;
		&lt;li&gt;Create a test case: &lt;tt&gt;script/generate selenium login&lt;/tt&gt;&lt;/li&gt;
		&lt;li&gt;Start the server: &lt;tt&gt;script/server&lt;/tt&gt;&lt;/li&gt;
		&lt;li&gt;Point your browser to &lt;tt&gt;http://localhost:3000/selenium&lt;/tt&gt;&lt;/li&gt;
		&lt;li&gt;If everything works as expected you should see the Selenium test runner. The north east frame contains all your test cases (just one for now), and the north frame contains your test case.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;h3&gt;Todo&lt;/h3&gt;


	&lt;h4&gt;user_extension.js&lt;/h4&gt;


	&lt;p&gt;Selenium has support for &lt;tt&gt;user_extension.js&lt;/tt&gt; which is a way to extend the 
functionality of Selenium. However there is currently no easy way to add such a
file in Selenium on Rails.&lt;/p&gt;


	&lt;h4&gt;Partials&lt;/h4&gt;


	&lt;p&gt;It would be nice if common parts of test cases could be stored in partials.&lt;/p&gt;


	&lt;h4&gt;More setup/teardown support?&lt;/h4&gt;


	&lt;p&gt;Currently there is only support to load fixtures and to wipe the session in
&lt;tt&gt;/selenium/setup&lt;/tt&gt;. Is there a need for more kinds of setups or teardowns?&lt;/p&gt;


	&lt;h3&gt;Credits&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Jon Tirsen&amp;#8212;initial &lt;a href="http://wiki.rubyonrails.com/rails/pages/SeleniumIntegration"&gt;inspiration&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Contact&lt;/h3&gt;


	&lt;p&gt;Jonas Bengtsson, jonas.b@home.se, &lt;a href="http://andthennothing.net"&gt;http://andthennothing.net&lt;/a&gt;&lt;/p&gt;


&lt;hr /&gt;


	&lt;p&gt;&lt;ins&gt;Update:&lt;/ins&gt; The first defect fix is out. It should now work on EdgeRails as well as Rails 1.0.0 (might work on other versions). And the tests ought to pass on non-Windows machines. &lt;em&gt;Thanks Wayne for reporting these errors!&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;&lt;tt&gt;script/plugin update&lt;/tt&gt; (or reinstall the plugin if that doesn&amp;#8217;t work)&lt;/p&gt;


	&lt;p&gt;&lt;ins&gt;Update 2:&lt;/ins&gt; Another defect fix to make sure .files, and files~ are handled correctly, and updated the tests (they work on Windows and NetBSD at least). &lt;em&gt;Thanks Wayne, Vincent and Shinya!&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;&lt;ins&gt;Update 3:&lt;/ins&gt; New &lt;a href="http://andthennothing.net/archives/2006/02/19/new-version-of-selenium-on-rails"&gt;version&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Sun, 05 Feb 2006 23:49:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:23a411c8-5ad8-43f3-8b27-a9f2030a9ff4</guid>
      <author>jonas.b@home.se (Jonas Bengtsson)</author>
      <link>http://andthennothing.net/archives/2006/02/05/selenium-on-rails</link>
      <trackback:ping>http://andthennothing.net/articles/trackback/522</trackback:ping>
    </item>
  </channel>
</rss>
