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
make the screenshot actions act the same as Chrome commands #863
Commits on Jul 12, 2021
-
screenshot: get node's position relative to its document
Before this change, it's relative to the viewport. So it will get the wrong position if the page scrolls. Fixes chromedp#844.
Configuration menu - View commit details
-
Copy full SHA for 8601120 - Browse repository at this point
Copy the full SHA 8601120View commit details -
Configuration menu - View commit details
-
Copy full SHA for b5b7347 - Browse repository at this point
Copy the full SHA b5b7347View commit details -
screenshot: make it act the same as Chrome commands
Here is the list of actions and the coresponding commands: - FullScreenshot: Capture full size screenshot - CaptureScreenshot: Capture screenshot - Screenshot: Capture node screenshot
Configuration menu - View commit details
-
Copy full SHA for d0af60e - Browse repository at this point
Copy the full SHA d0af60eView commit details -
screenshot: extract screenshot.go
Reasons: - CaptureScreenshot has nothing to do with navigation, so it's ok to move it out of the nav.go file. - FullScreenshot does not use emulate action any more, so it's ok to move it out of the emulate.go file. - query.go is a little big and I'm planning to add more unit test for the screenshot feature, so it's better to move the feature to another file. This change is a simple refactor, and does not change any behavior of the source code.
Configuration menu - View commit details
-
Copy full SHA for 94ce628 - Browse repository at this point
Copy the full SHA 94ce628View commit details -
screenshot: compare images with pixelmatch
github.com/orisano/pixelmatch is a go port of pixelmatch, which is used by puppeteer to compare images.
Configuration menu - View commit details
-
Copy full SHA for a40cf97 - Browse repository at this point
Copy the full SHA a40cf97View commit details -
screenshot: add unit test for FullScreenshot
This unit test is copied from puppeteer: - testdata/grid.html - testdata/digits/[0-9].png - testdata/screenshots/grid-fullpage.png
Configuration menu - View commit details
-
Copy full SHA for d8c4817 - Browse repository at this point
Copy the full SHA d8c4817View commit details -
screenshot: replace the unit test for CaptureScreenshot
This unit test is copied from puppeteer: - testdata/screenshots/sanity.png
Configuration menu - View commit details
-
Copy full SHA for 3357b6f - Browse repository at this point
Copy the full SHA 3357b6fView commit details -
screenshot: replace the unit test for Screenshot
This unit test is copied from puppeteer. The Screenshot action is updated to handle fractional dimensions properly too.
Configuration menu - View commit details
-
Copy full SHA for 52c74ed - Browse repository at this point
Copy the full SHA 52c74edView commit details