Add /print command to web driver#268
Conversation
minusnine
left a comment
There was a problem hiding this comment.
I apologize for the extremely high latency in this review. Thank you very much for your contribution.
| // Screenshot takes a screenshot of the browser window. | ||
| Screenshot() ([]byte, error) | ||
| // Print takes PrintArgs and returns a PDF representation of the browser window. | ||
| Print(args PrintArgs) ([]byte, error) |
There was a problem hiding this comment.
Will you please add a new test function in internal/seleniumtest/seleniumtest.go. It will be similar to this test and should be added just below it:
selenium/internal/seleniumtest/seleniumtest.go
Line 1481 in e9100b7
The function call should be added to commonTests, after this line:
|
you know when the merge will happen to use it ? |
Co-authored-by: Eric Garrido <eric@ericgar.com>
|
Hello, marwan-at-work can you add PrintOrientation ? The code is below. I have small problems under firefox for printing but with chrome it's good. ` type PrintArgs struct { |
|
@Archie1978 done |
|
Any updates here? :) |
Hi there,
Thank you for this helpful library. I noticed that the print command is somewhat less documented and also missing from this library so I added here.
The print command is described in the following spec: https://www.w3.org/TR/webdriver/#endpoints
Note there are more arguments to be added but I only added the ones I am using and have tested. Later on, people can add more arguments as needed. Otherwise, I'm happy to add all of the arguments.