mirror of
https://github.com/moodle/moodle.git
synced 2025-03-22 16:40:07 +01:00
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.
This commit is contained in:
parent
4e4c8d3a27
commit
dd2e1c222a
@ -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 . "]";
|
||||
|
Loading…
x
Reference in New Issue
Block a user