+3. If the RedCloth gem is available the Selenese test cases can use it for better markup.

+4. Run the Rakefile in the plugin‘s directory to run the tests in order to see that everything works. (If RedCloth isn‘t installed a few tests will fail since they assume RedCloth is installed.)

+5. Create a test case: script/generate selenium <TestName>

+6. Start the server: script/server -e test

+7. Point your browser to localhost:3000/selenium

+8. 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.

+

+Installation for Rails 2.1 release

+

+Installation for rails versions before Rails 2.1

+

+Rails has been changed in ways that break the original versions of Selenium on Rails. If you're using versions before Rails 2.1 you need to use this release. There are no plans to update this release with new changes or bug fixes unless there is sufficient demand, so if you can update then do so.

+ 3. If the RedCloth gem is available the Selenese test cases can use it for better markup.

+ 4. Run the Rakefile in the plugin‘s directory to run the tests in order to see that everything works. (If RedCloth isn‘t installed a few tests will fail since they assume RedCloth is installed.)

+ 5. Create a test case: script/generate selenium login

+ 6. Start the server: script/server -e test

+ 7. Point your browser to localhost:3000/selenium

+ 8. 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.

+

+Formats

+

+The test cases can be written in a number of formats. Which one you choose is a matter of taste. You can generate your test files by running script/generate selenium or by creating them manually in your /test/selenium directory.

+RSelenese, .rsel

+

+RSelenese enable you to write your tests in Ruby. This is my favorite format.

+See SeleniumOnRails::TestBuilder for available commands. This is also available in the SeleniumIDE, using the format here. IMPORTANT NOTE: RSelenese generates the HTML tables for Selenium behind the scenes when the page is loaded - ONCE. That means code like this:

+

+ (1..10).each do |index|

+ do something

+ end

+

+Will only be executed when the test is loaded, not when the test is run. This is a common error and leads to tests that work the first time and fail the second time.

+Selenese, .sel

+

+Selenese is the dumbest format (in a good way). You just write your commands delimited by | characters.

+

+ |open|/selenium/setup|

+ |open|/|

+ |goBack|

+

+If you don‘t want to write Selenese tests by hand you can use SeleniumIDE which has support for Selenese.

+

+SeleniumIDE makes it super easy to record test and edit them.

+HTML/RHTML

+

+You can write your tests in HTML/RHTML but that‘s mostly useful if you have existing tests you want to reuse.

+Partial test cases

+

+If you have some common actions you want to do in several test cases you can put them in a separate partial test case and include them in your other test cases. This is highly recommended, just as small functions would be recommended in structured programming.

+

+A partial test case is just like a normal test case besides that its filename has to start with _:

+3. If the RedCloth gem is available the Selenese test cases can use it for better markup.

+4. Run the Rakefile in the plugin‘s directory to run the tests in order to see that everything works. (If RedCloth isn‘t installed a few tests will fail since they assume RedCloth is installed.)

+5. Create a test case: script/generate selenium login

+6. Start the server: script/server -e test

+7. Point your browser to localhost:3000/selenium

+8. 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.

+

+== Installation for rails versions before Rails 2.1

+

+Rails has been changed in ways that break the original versions of Selenium on Rails. If you're using versions before Rails 2.1 you need to use this release. There are no plans to update this release with new changes or bug fixes unless there is sufficient demand, so if you can update then do so.

Creating an editor for the test cases is currently considered out of scope for this plugin. SeleniumIDE[http://www.openqa.org/selenium-ide/] does such a good job and has support[http://wiki.openqa.org/display/SIDE/SeleniumOnRails] for both the Selenese and RSelenese formats.

+

+## Contributing ##

+

+Contributing is simple. Fork this repo, make your changes, then issue a pull request. *IMPORTANT* I will not take forks that do not have associated unit tests. There must be tests, and they must pass, so I can bring the changes in.

+

## Credits ##

* Jonas Bengston -- original creator

@@ -192,11 +196,6 @@ from the files and restart your server.

* Nando Vieira, http://simplesideias.com.br

* Gordon McCreight, a neat script that lists any unsupported methods

-## Contributing ##

-

-Contributing is simple. Fork this repo, make your changes, then issue a pull request. *IMPORTANT* I will not take forks that do not have associated unit tests. There must be tests, and they must pass, so I can bring the changes in.

-

-

## Information ##

For more information, check out the [website](http://seleniumhq.org/projects/on-rails/).

- <p>Contributing is simple. Fork this repo, make your changes, then issue a pull request. <em>IMPORTANT</em> I will not take forks that do not have associated unit tests. There must be tests, and they must pass, so I can bring the changes in.</p>

+ <p>Contributing is simple. Fork the github repo listed above, make your changes, then issue a pull request. <em>IMPORTANT</em> I will not take forks that do not have associated unit tests. There must be tests, and they must pass, so I can bring the changes in.</p>