diff --git a/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb index d32e5a7d39..7e619d7261 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb @@ -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 \ No newline at end of file +end