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(); + } } /**