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

How to kick off to work? No results. #22

Closed drupality closed 7 years ago

drupality commented 8 years ago

My config:

default:
  extensions:
    Bex\Behat\ScreenshotExtension:
      image_drivers:
        local:
          screenshot_directory: '/var/www/project/tests/failures'

Test ouput:

alExtension\Context\MinkContext::assertTextVisible()
    And I should see the text "The requested product Test Product is currently not available for this country" # Drupal\DrupalExtension\Context\MinkContext::assertTextVisible()
      The text "The requested product Test Product is currently not available for this country" was not found anywhere in the text of the current page. (Behat\Mink\Exception\ResponseTextException)

--- Failed scenarios:

    features/product.feature:12

1 scenario (1 failed)
7 steps (6 passed, 1 failed)

No message, no screenshot.

What am I doing wrong? behat version 3.0.15

drupality commented 8 years ago

Ok, my scenario had missing @javascript tag. Now it works but screenshoot is empty

elvetemedve commented 8 years ago

@drupality The driver you use for browser session does not support taking screenshots. I suggest you to use Mink as browser session with Selenium driver. See an example here: http://docs.behat.org/en/v3.0/user_guide/configuration.html#extensions

zkent commented 8 years ago

@elvetemedve I used your exact setup described and it worked perfectly for me the first time. Thanks for creating this!

elvetemedve commented 8 years ago

@drupality Any news on this? Can I close this ticket or you still have this problem?

drupality commented 7 years ago

@elvetemedve We have resigned from screenshots, please close this ticket.