mirror of
https://github.com/appium/appium.git
synced 2026-01-15 14:49:55 -06:00
Merge pull request #166 from jlipps/master
more flexibility in alert handling and getting text of buttons
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user