From 4cedc6058bb274a582477c295117f0826e9fd9c3 Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Thu, 26 May 2016 23:52:59 +0200 Subject: lvc: duplicate the waitAny to deal with race condition --- cucumber/features/step_definitions/common_steps.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cucumber') diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb index 6894b83f..c45459dd 100644 --- a/cucumber/features/step_definitions/common_steps.rb +++ b/cucumber/features/step_definitions/common_steps.rb @@ -305,6 +305,7 @@ end Given /^in ([a-z]*) mode I set the root password to "([^"]*)"$/ do |ui_mode, rootpw| # Root Password, twice + on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword",ui_mode),diui_png("RootPassword",ui_mode)], 30 * PATIENCE) on_screen, _ = @screen.waitAny([diui_png("ShowRootPassword",ui_mode),diui_png("RootPassword",ui_mode)], 30 * PATIENCE) @screen.type(rootpw) if "gui" == ui_mode @@ -324,6 +325,7 @@ Given /^in ([a-z]*) mode I set the password for "([^"]*)" to be "([^"]*)"$/ do | @screen.waitVanish(diui_png("NameOfUser",ui_mode), 10 * PATIENCE) @screen.type(Sikuli::Key.ENTER) on_screen, _ = @screen.waitAny([diui_png("ShowUserPassword",ui_mode),diui_png("UserPassword",ui_mode)], 10 * PATIENCE) + on_screen, _ = @screen.waitAny([diui_png("ShowUserPassword",ui_mode),diui_png("UserPassword",ui_mode)], 10 * PATIENCE) @screen.type(password) if "gui" == ui_mode @screen.type(Sikuli::Key.TAB) -- cgit v1.2.3-70-g09d2