Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Returned unexpected result.
public function getTableRow(Element $element, $search) {
$rows = $element->findAll('css', 'tr');
if (!$rows) {
throw new \Exception(sprintf('No rows found on the page %s', $this->getSession()->getCurrentUrl()));
}
foreach ($rows as $row) {
if (strpos($row->getText(), $search) !== FALSE) {
return $element; //It should return $row
}
}
throw new \Exception(sprintf('Failed to find a row containing "%s" on the page %s', $search, $this->getSession()->getCurrentUrl()));
}
Comment | File | Size | Author |
---|---|---|---|
#1 | unexpected-return-value-2404457.patch | 667 bytes | @James |
Comments
Comment #1
@James CreditAttribution: @James commentedComment #2
@James CreditAttribution: @James commentedComment #3
jhedstromThanks!