Chrome does not always dismiss the beta warning

Change-Id: I48249852d308cfb68ab64cedde6a83f41879ff36
This commit is contained in:
cmcmahon 2014-01-22 08:49:35 -07:00
parent dabe8ad402
commit 09ed99ef81

View file

@ -9,10 +9,14 @@ end
When(/^I click Edit for VisualEditor$/) do
on(VisualEditorPage) do |page|
page.edit_ve_element.when_present.click
#This begin/rescue clause dismisses the VE warning message when it exists, and does not fail when it does not exist
begin
page.beta_warning_element.when_present.click
rescue
# Attempt to dismiss "beta warning" pop-up multiple times, since SauceLabs sometimes fails on the first attempt to dismiss.
try = 10
try.times do
#This begin/rescue clause dismisses the VE warning message when it exists, and does not fail when it does not exist
begin
page.beta_warning_element.when_present.click
rescue
end
end
page.content_element.fire_event("onfocus")
end