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 #148

Merged
merged 8 commits into from
Nov 28, 2019
Merged

Write screenshot to file #148

merged 8 commits into from
Nov 28, 2019

Conversation

negiDharmendra
Copy link
Contributor

@negiDharmendra negiDharmendra commented Nov 21, 2019

  • 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.
Gauge.configure do |config|
  config.custom_screenshot_writer = -> {
    screenshot_data = driver.screenshot_as(:png)
    file = File.join(config.screenshot_dir, 'screenshot-name.png')
    File.write(file, screenshot_data)
    File.basename(file)
  }
end

@gaugebot gaugebot bot added the cla-signed label Nov 21, 2019
@gaugebot gaugebot bot requested a review from Apoorva-GA November 21, 2019 09:29
@Apoorva-GA Apoorva-GA merged commit 2dde83f into master Nov 28, 2019
@Apoorva-GA Apoorva-GA deleted the write-screenshot-to-file branch November 28, 2019 05:11
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.

3 participants