Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write screenshot to file #292

Merged
merged 3 commits into from
Jan 13, 2020
Merged

Write screenshot to file #292

merged 3 commits into from
Jan 13, 2020

Conversation

negiDharmendra
Copy link
Contributor

  • Changed default screenshot grabber to write to file and return file path.
  • Depricate existing custom screenshot grabber API contract.
  • Create a new API contact for custom screenshot grabber to write the screenshot into file and returning file path instead of screenhsot bytes.
const path = require("path");
const { screenshot } = require('taiko');
gauge.customScreenshotWriter = async function () {
    const screenshotFilePath = path.join(process.env['gauge_screenshots_dir'], 'screenshot.png');
    await screenshot({ path: screenshotFilePath });
    return path.basename(screenshotFilePath);
};

	- Change default and custome screenshot api <screenshotFn> to
          write screenshots to file.

	- Add a new API customScreenshotWriter
@gaugebot gaugebot bot added the cla-signed label Jan 13, 2020
@gaugebot gaugebot bot requested a review from BugDiver January 13, 2020 08:56
@BugDiver BugDiver merged commit caaddf6 into master Jan 13, 2020
@BugDiver BugDiver deleted the write-screenshot-to-file branch January 13, 2020 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants