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()));
  }
CommentFileSizeAuthor
#1 unexpected-return-value-2404457.patch667 bytes@James
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

@James’s picture

@James’s picture

Status: Needs work » Needs review
jhedstrom’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.