I'm using Behat and Mink framework for BDD (using PHP)
I was looping through td elements to verify the values and text. Since all the elements returned are span elements, I could use getText() on the elements and it was all good.
$page = $this->getSession()->getPage();
$expected_values = ["Tuesday", 22, 22, 22, 22];
$actual_rows = $page->findAll('css', 'table.admin-table tbody tr td');
$actual_Values = array();
foreach($actual_rows as $row) {
$actual_Values[] = $row->getText();
}
assertEquals($expected_values, $actual_Values);
But recently, the design of the page has changed. And some of the span elements have been replaced by input elements. And getText() returns null so I replaced it with getValue(). But since the first td element is a span it returns null if we use getText().
Is there anyway I can skip the first td within the loop from the code snippet above.
Update: Here is what I put in comments which hasn't rendered properly:
$actual_Values[] = $row->find('css', 'input')->getValue();