How to specify setup and teardown in Selenium On Rails?
I use S开发者_JAVA技巧elenium On Rails to do some acceptance test, but before most of tests I need to create some binary test files associated with fixtures, and after each test - remove them. I don't know how to do it. I was searching some kind of setup/teardown functions but I couldn't find.
Usually people use an acceptance test framework like Webrat and set it up to use selenium. To configure Webrat to use selenium, this is how you would set it up in test_helper.rb
:
require "webrat"
Webrat.configure do |config|
config.mode = :selenium
end
Then I would define my setup and teardown in the test code. Would you be interested with this approach?
精彩评论