From 439b6cea8ae5819ed8e490194b981c651d444969 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 9 Oct 2015 00:08:54 +0200 Subject: [PATCH] Improved test helper. --- test/browser_test_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index 7d55b395d..2efdd279c 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -1242,7 +1242,9 @@ wait untill text in selector disabppears # click on click catcher if params[:do_not_submit] - click( browser: instance, css: '.clickCatcher') + if instance.find_elements( { css: '.clickCatcher' } )[0] + click( browser: instance, css: '.clickCatcher') + end end end