MDL-56898 behat: Focus only works with JS

This commit is contained in:
Rajesh Taneja
2016-11-25 09:20:52 +08:00
parent ad76556b76
commit d2a44a71ac
+3 -1
View File
@@ -65,7 +65,9 @@ class behat_enrol extends behat_base {
$this->execute("behat_forms::i_set_the_following_fields_to_these_values", $table);
// Ensure we get button in focus, before pressing button.
$this->execute("behat_general::i_take_focus_off_field", array(get_string('addinstance', 'enrol'), "button"));
if ($this->running_javascript()) {
$this->execute("behat_general::i_take_focus_off_field", array(get_string('addinstance', 'enrol'), "button"));
}
// Save changes.
$this->execute("behat_forms::press_button", get_string('addinstance', 'enrol'));