Question

I have a feature file in Behat (below) where I define the table headings. I have been using getRowsHash() to get the table headings and it has been working fine.

| TableHeadings |
| FlagIcon      |
| Flight        |
| Stand         |
| From          |

But just recently while testing a page with 18 headings, it started failing. I could't get any answers. So thought of trying getHash() instead and it worked fine.

Is there a limitation with getRowsHash() beyond 15 rows or should I be using getRows() or getHash() instead.

Note: If I use getRowsHash(), I get an error that expected (15) is not equal to Actual (18). As I mentioned above I have expected (18 headings not 15)

Was it helpful?

Solution

There's no such limitation, see it for yourself: https://github.com/Behat/Gherkin/blob/master/src/Behat/Gherkin/Node/TableNode.php#L92

There must be a mistake on your side. You gave too little details to judge where it is exactly.

Are your scenarios still readable with so much details in them? I'd consider putting only relevant details into your scenarios and hide the rest in a context file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top