From 766f8b0a543487f59115f716fee55e560b5a6278 Mon Sep 17 00:00:00 2001
From: Andrew Nicols <andrew@nicols.co.uk>
Date: Mon, 4 Nov 2013 11:32:03 +0800
Subject: [PATCH 1/1] MDL-40975 Behat: Update behat open menu function for new
 format

---
 course/tests/behat/behat_course.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/course/tests/behat/behat_course.php b/course/tests/behat/behat_course.php
index 13c97cd..fd60738 100644
--- a/course/tests/behat/behat_course.php
+++ b/course/tests/behat/behat_course.php
@@ -555,7 +555,10 @@ class behat_course extends behat_base {
             return;
         }
 
-        return new Given('I click on "' . get_string('actions', 'moodle') . '" "link" in the "' . $this->escape($activityname) . '" activity');
+
+        return new Given('I click on ' .
+                '"//a[contains(concat(\' \', normalize-space(@class), \' \'), \' textmenu \')][contains(text(), ' . get_string('edit', 'moodle') . ')]" ' .
+                '"xpath_element" in the "' . $this->escape($activityname) . '" activity');
     }
 
     /**
-- 
1.8.1.2

