mink - Behat follow links with html in it -
i have response similar to
<a href="..."><span>1</span> widget</a>
and feature like
feature: feature scenario: scenario given on homepage should see "1 widget"
this fail because of span tag. proper way assert text nowadays or follow link?
you can utilize regex check text,
then should see text matching "pattern"
if you're able modify html, adding unique id attribute link easiest way click it. if that's not possible, can utilize css selector locate link element , click it. in step (note: untested code!),
$node = $this->getsession()->getpage()->find('css', 'your css selector'); $node->click();
behat mink
No comments:
Post a Comment