From cd7ea8f0ccf59865ee2d73d133f13e6d0456d4f4 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Thu, 28 Mar 2013 18:03:27 +0800 Subject: [PATCH] MDL-38788 behat: Generic form elements interaction compatibile with JS disabled --- lib/tests/behat/behat_forms.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/tests/behat/behat_forms.php b/lib/tests/behat/behat_forms.php index fd82d95bbb8..b40cdb02d82 100644 --- a/lib/tests/behat/behat_forms.php +++ b/lib/tests/behat/behat_forms.php @@ -176,7 +176,9 @@ class behat_forms extends behat_base { $selectnode->selectOption($option); // Adding a click as Selenium requires it to fire some JS events. - $selectnode->click(); + if ($this->running_javascript()) { + $selectnode->click(); + } } /** @@ -192,7 +194,9 @@ class behat_forms extends behat_base { $radionode->check(); // Adding a click as Selenium requires it to fire some JS events. - $radionode->click(); + if ($this->running_javascript()) { + $radionode->click(); + } } /**