RailsCasts Pro episodes are now free!
Learn more or hide this
Resources
script/plugin install git://github.com/ryanb/selenium-on-rails.git script/generate selenium destroy_product.rsel rake test:acceptance
setup :fixtures => :all product = Product.first open '/' click "css=#product_#{product.id} a:contains('Destroy')" assert_confirmation('*') wait_for_element_present "css=#flash_notice" assert_element_not_present "css=#product_#{product.id}" refresh assert_element_not_present "css=#product_#{product.id}"
environments: - test browsers: firefox: '/Applications/Firefox.app/Contents/MacOS/firefox-bin' safari: '/Applications/Safari.app/Contents/MacOS/Safari'
Full Source Code