MDL-77685 core_grades: Fix row_column_of_table_should_contain()

Backport from MDL-77632.
This commit is contained in:
Mihail Geshoski
2024-05-30 09:42:26 +01:00
committed by Paul Holden
parent e8d03fdae4
commit a7d476c35f
+2 -2
View File
@@ -1411,8 +1411,8 @@ EOF;
// Check if value exists in specific row/column.
// Get row xpath.
// GoutteDriver uses DomCrawler\Crawler and it is making XPath relative to the current context, so use descendant.
$rowxpath = $tablexpath."/tbody/tr[descendant::th[normalize-space(.)=" . $rowliteral .
"] | descendant::td[normalize-space(.)=" . $rowliteral . "]]";
$rowxpath = $tablexpath . "/tbody/tr[descendant::*[@class='rowtitle'][normalize-space(.)=" . $rowliteral . "] | " . "
descendant::th[normalize-space(.)=" . $rowliteral . "] | descendant::td[normalize-space(.)=" . $rowliteral . "]]";
$columnvaluexpath = $rowxpath . $columnpositionxpath . "[contains(normalize-space(.)," . $valueliteral . ")]";