[BrowserTest] Fix failing VisualEditor_save_dialog scenario

Looks like VisualEditor does not allow saving the page, if the changes
to the page were made while the browser did not have focus.

Change-Id: I959bcb4cc2f72237d2ea75249a56e140d4f7c867
Paired-With: Amir Aharoni
This commit is contained in:
Željko Filipin 2014-10-02 14:45:24 +02:00
parent 005c6fef27
commit 4ab4ad64dc

View file

@ -17,7 +17,10 @@ Given(/^I go to the "(.+)" page with content "(.+)"$/) do |page_title, page_cont
end
Given(/^I click in the editable part$/) do
on(VisualEditorPage).content_element.when_present.send_keys("")
on(VisualEditorPage) do |page|
page.content_element.when_present.fire_event("onfocus")
page.content_element.send_keys("")
end
end
Given(/^I make the text "(.*?)" be selected$/) do |select_text|
@ -99,4 +102,4 @@ end
Then(/^I can click Cancel save$/) do
on(VisualEditorPage).confirm_switch_cancel_element.when_present.click
end
end