Reputation: 16924
I have several 'it' blocks in my selenium test file (using Ruby and rspec) that test various portions of my web application. Each 'it' block stops executing and goes to the next 'it' block if any of the conditions or code fails.
Example 'it' block
it "should load example.com" do
page.open("http://example.com")
page.wait_for_page_to_load(25)
end
Upvotes: 3
Views: 224
Reputation: 16924
I don't like my current solution and think there is a better way to accomplish this, but for now...
.
it "should load example.com" do
begin
page.open("http://example.com")
page.wait_for_page_to_load(25)
"wow".should == "cool"
rescue Exception => e
// code that responds to failed test
end
end
Why I don't like this
Upvotes: 1