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
Screenshoot of elements in scrolled page doesn't work properly #844
Comments
@vachix Thanks for the sharing! Would you like to send a PR? Things to note:
It seems there is a lot to do. So it's okay if you don't want to work on it. Thank you very much! ------8<------ Update: I found this document: Viewport bounds and scale for screenshots |
@vachix I'm going to work on this issue. Thank you! |
Before this change, it's relative to the viewport. So it will get the wrong position if the page scrolls. Fixes chromedp#844.
@vachix I have just pushed some commits to my forked repository (https://github.com/zekelu/chromedp/). Can you clone the repository and checkout the screenshot branch, then use the replace directive in go.mod to test whether this issue has been addressed? Thank you! |
Status update (in #863):
|
Before this change, it's relative to the viewport. So it will get the wrong position if the page scrolls. Fixes chromedp#844.
Before this change, it's relative to the viewport. So it will get the wrong position if the page scrolls. Fixes chromedp#844.
Before this change, it's relative to the viewport. So it will get the wrong position if the page scrolls. Fixes #844.
Hello, it looks like the problem is the Chrome DevTools Protocol for screenshot expects a position of element relative to the root document, but the
dom.GetBoxModel()
method returns a position relative to the viewport. Here is my quick fix works for me 0763802What versions are you running?
What did you do? Include clear steps.
What did you expect to see?
Screenshoot of my element
What did you see instead?
Screenshot of another part of page
The text was updated successfully, but these errors were encountered: