Merge pull request #166 from jlipps/master

more flexibility in alert handling and getting text of buttons
This commit is contained in:
Sebastian Tiedtke
2013-02-12 10:11:09 -08:00
6 changed files with 66 additions and 5 deletions

View File

@@ -85,4 +85,15 @@ describe "Computation" do
a.accept
end
it "should find alerts" do
els = @driver.find_elements(:tag_name, 'button')
els[1].click
alert = @driver.find_element(:tag_name, 'alert')
buttons = alert.find_elements(:tag_name, 'button')
buttons[0].text.should eq("Cancel")
buttons[0].click
alerts = @driver.find_elements(:tag_name, 'alert')
alerts.should be_empty
end
end