From dd2e1c222a52655c982f7f0e6878c65c3e4cfe4a Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Mon, 1 Dec 2014 20:00:10 +0000 Subject: [PATCH] MDL-48373 behat: find table columns better. It was not possible to select the question bank 'Created by' or 'Modified by' columns without this change. --- lib/tests/behat/behat_general.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests/behat/behat_general.php b/lib/tests/behat/behat_general.php index 1844f109e67..b0a02c58100 100644 --- a/lib/tests/behat/behat_general.php +++ b/lib/tests/behat/behat_general.php @@ -1039,9 +1039,9 @@ class behat_general extends behat_base { } else { // Header can be in thead or tbody (first row), following xpath should work. $theadheaderxpath = "thead/tr[1]/th[(normalize-space(.)=" . $columnliteral . " or a[normalize-space(text())=" . - $columnliteral . "])]"; + $columnliteral . "] or div[normalize-space(text())=" . $columnliteral . "])]"; $tbodyheaderxpath = "tbody/tr[1]/td[(normalize-space(.)=" . $columnliteral . " or a[normalize-space(text())=" . - $columnliteral . "])]"; + $columnliteral . "] or div[normalize-space(text())=" . $columnliteral . "])]"; // Check if column exists. $columnheaderxpath = $tablexpath . "[" . $theadheaderxpath . " | " . $tbodyheaderxpath . "]";