From: Eloy Lafuente (stronk7) Date: Tue, 19 Jul 2016 10:13:00 +0000 (+0200) Subject: Merge branch 'wip-mdl-55258-m' of https://github.com/rajeshtaneja/moodle X-Git-Tag: v3.2.0-beta~799 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=a900c680ba2c3d538d8d78c9df27c780f7d3ccde;hp=29dcec68039d3bc1eb78fc681bf63e3304b959ca Merge branch 'wip-mdl-55258-m' of https://github.com/rajeshtaneja/moodle --- diff --git a/lib/tests/behat/behat_forms.php b/lib/tests/behat/behat_forms.php index 23459628364..d681d2ccfbf 100644 --- a/lib/tests/behat/behat_forms.php +++ b/lib/tests/behat/behat_forms.php @@ -54,6 +54,10 @@ class behat_forms extends behat_base { // Ensures the button is present. $buttonnode = $this->find_button($button); + // Focus on button to ensure it is in viewport, before pressing it. + if ($this->running_javascript()) { + $buttonnode->focus(); + } $buttonnode->press(); }