public function SocialMinkContext::iMakeAScreenshotWithFileName in Open Social 8
Same name and namespace in other branches
- 8.2 tests/behat/features/bootstrap/SocialMinkContext.php \SocialMinkContext::iMakeAScreenshotWithFileName()
@Given /^I make a screenshot with the name "([^"]*)"$/
2 calls to SocialMinkContext::iMakeAScreenshotWithFileName()
- SocialMinkContext::iMakeAScreenshot in tests/
behat/ features/ bootstrap/ SocialMinkContext.php - @Given /^I make a screenshot$/
- SocialMinkContext::takeScreenShotAfterFailedStep in tests/
behat/ features/ bootstrap/ SocialMinkContext.php - @AfterStep
File
- tests/
behat/ features/ bootstrap/ SocialMinkContext.php, line 55
Class
- SocialMinkContext
- Defines application features from the specific context.
Code
public function iMakeAScreenshotWithFileName($filename) {
$screenshot = $this
->getSession()
->getDriver()
->getScreenshot();
$file_and_path = '/var/www/travis_artifacts/' . $filename . '.jpg';
file_put_contents($file_and_path, $screenshot);
}