MDL-66979 behat: Use tab to blur current focus

The focus should be on something, rather than removed.

The way in which focus removal works can lead to side effects.
This commit is contained in:
Andrew Nicols 2020-06-26 13:18:38 +08:00
parent fd5621554a
commit 74a86acc8d

View file

@ -66,7 +66,7 @@ class behat_enrol extends behat_base {
// Ensure we get button in focus, before pressing button.
if ($this->running_javascript()) {
$this->execute("behat_general::i_take_focus_off_field", array(get_string('addinstance', 'enrol'), "button"));
$this->execute('behat_general::i_press_named_key', ['', 'tab']);
}
// Save changes.