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

Add back captureScreenshotAsBase64 #112

Closed
BlackHC opened this issue Apr 11, 2016 · 3 comments · Fixed by #115
Closed

Add back captureScreenshotAsBase64 #112

BlackHC opened this issue Apr 11, 2016 · 3 comments · Fixed by #115

Comments

@BlackHC
Copy link
Contributor

BlackHC commented Apr 11, 2016

The sync webdriver provides both captureScreenshot and captureScreenshotAsBase64.

Atm:

  /// Take a screenshot of the current page as PNG.
  Stream<int> captureScreenshot() async* {
    var encoded = await getRequest('screenshot');
    yield* new Stream.fromIterable(CryptoUtils.base64StringToBytes(encoded));
  }

This could be split up again into two methods.

@DrMarcII
Copy link
Contributor

What is the use case?

@BlackHC
Copy link
Contributor Author

BlackHC commented Apr 12, 2016

We use it to log a screenshot in our html log using an embedded "data:" URL. It doesn't really seem to make sense to decode from base64 to encode right again. What do you think?

@DrMarcII
Copy link
Contributor

Feel free to send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants