elvetemedve / behat-screenshot

This is an extension for Behat which provides debugging functionality by taking a screenshot of failed tests.
MIT License
92 stars 17 forks source link

Only take a screenshot when a session is started #49

Closed legolasbo closed 4 years ago

legolasbo commented 5 years ago

This extension currently tries to take a screenshot whenever a step fails, even if that step fails because a session can't be started due to a driver failure. This causes the scenario in question to be skipped instead of failing, resulting in false positives.

elvetemedve commented 5 years ago

Hi @legolasbo,

Sorry for replying so late. Nice catch! The problem is that the Mink library has changed the behaviour of the Behat\Mink\Mink::getSession() method from this to that, so the session won't start automatically like before.

tkotosz commented 4 years ago

looks good to me, I will merge this to a new branch and add the missing specs