-
Notifications
You must be signed in to change notification settings - Fork 411
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 /print command to web driver #268
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for the extremely high latency in this review. Thank you very much for your contribution.
@@ -396,6 +412,8 @@ type WebDriver interface { | |||
KeyUp(keys string) error | |||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
func testDismissAlert(t *testing.T, c Config) { |
The function call should be added to commonTests, after this line:
t.Run("DismissAlert", runTest(testDismissAlert, c)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@minusnine done
you know when the merge will happen to use it ? |
Co-authored-by: Eric Garrido <[email protected]>
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.