diff --git a/lib/editor/atto/tests/behat/customtoolbar.feature b/lib/editor/atto/tests/behat/customtoolbar.feature
index ec282c2e9c5..dfecd22fec9 100644
--- a/lib/editor/atto/tests/behat/customtoolbar.feature
+++ b/lib/editor/atto/tests/behat/customtoolbar.feature
@@ -14,7 +14,7 @@ Feature: Atto editor with customised toolbar
| label | L1 | FixtureLink | C1 | label1 |
When I log in as "admin"
And I am on "Course 1" course homepage
- And I follow "FixtureLink"
+ And I click on "FixtureLink" "link" in the "region-main" "region"
@javascript
Scenario: Confirm that both editors have different toolbars but still function
diff --git a/lib/editor/atto/tests/behat/disablecontrol.feature b/lib/editor/atto/tests/behat/disablecontrol.feature
index 893d241b3e5..b7a6678157e 100644
--- a/lib/editor/atto/tests/behat/disablecontrol.feature
+++ b/lib/editor/atto/tests/behat/disablecontrol.feature
@@ -14,7 +14,7 @@ Feature: Atto with enable/disable function.
| label | L1 | Control Enable/Disable Atto | C1 | label1 |
And I log in as "admin"
And I am on "Course 1" course homepage
- And I follow "Control Enable/Disable Atto"
+ And I click on "Control Enable/Disable Atto" "link" in the "region-main" "region"
@javascript
Scenario: Check disable Atto editor.
diff --git a/lib/editor/textarea/tests/behat/disablecontrol.feature b/lib/editor/textarea/tests/behat/disablecontrol.feature
index 9e482056a7f..bac5635b481 100644
--- a/lib/editor/textarea/tests/behat/disablecontrol.feature
+++ b/lib/editor/textarea/tests/behat/disablecontrol.feature
@@ -18,7 +18,7 @@ Feature: Text area with enable/disable function.
And I set the field "Text editor" to "Plain text area"
And I press "Save changes"
And I am on "Course 1" course homepage
- And I follow "Control Enable/Disable Text area"
+ And I click on "Control Enable/Disable Text area" "link" in the "region-main" "region"
@javascript
Scenario: Check disable Text area editor.
diff --git a/lib/editor/tinymce/tests/behat/disablecontrol.feature b/lib/editor/tinymce/tests/behat/disablecontrol.feature
index 084738321b9..cb8b92191f6 100644
--- a/lib/editor/tinymce/tests/behat/disablecontrol.feature
+++ b/lib/editor/tinymce/tests/behat/disablecontrol.feature
@@ -18,7 +18,7 @@ Feature: Tinymce with enable/disable function.
And I set the field "Text editor" to "TinyMCE HTML editor"
And I press "Save changes"
And I am on "Course 1" course homepage
- And I follow "Control Enable/Disable Tinymce"
+ And I click on "Control Enable/Disable Tinymce" "link" in the "region-main" "region"
@javascript
Scenario: Check disable Tinymce editor.
diff --git a/lib/tests/behat/largeforms.feature b/lib/tests/behat/largeforms.feature
index 1e6223ae0c3..57e388277e6 100644
--- a/lib/tests/behat/largeforms.feature
+++ b/lib/tests/behat/largeforms.feature
@@ -13,7 +13,7 @@ Feature: Forms with a large number of fields
| activity | name | intro | course | idnumber |
| label | L1 | FixtureLink | C1 | label1 |
When I am on the "C1" "Course" page logged in as "admin"
- And I follow "FixtureLink"
+ And I click on "FixtureLink" "link" in the "region-main" "region"
# Note: These tests do not actually use JavaScript but they don't work with
# the headless 'browser'.
diff --git a/lib/tests/behat/readonlyform.feature b/lib/tests/behat/readonlyform.feature
index bcf217ab527..2c4fae6bbd4 100644
--- a/lib/tests/behat/readonlyform.feature
+++ b/lib/tests/behat/readonlyform.feature
@@ -13,7 +13,7 @@ Feature: Read-only forms should work
| activity | name | intro | course | idnumber |
| label | L1 | Fixture link | C1 | label1 |
Given I am on the "C1" "Course" page logged in as "admin"
- And I follow "Fixture link"
+ And I click on "Fixture link" "link" in the "region-main" "region"
When I expand all fieldsets
Then the field "Name" matches value "Important information"
@@ -26,7 +26,7 @@ Feature: Read-only forms should work
| activity | name | intro | course | idnumber |
| label | L1 | Fixture link | C1 | label1 |
Given I am on the "C1" "Course" page logged in as "admin"
- And I follow "Fixture link"
+ And I click on "Fixture link" "link" in the "region-main" "region"
When I expand all fieldsets
Then the field "Name" matches value "Important information"
Then the field "Other" matches value "Other information"