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

Make the screenshots in the different browsers equal in size #13

Open
marco-c opened this issue Jan 31, 2018 · 8 comments
Open

Make the screenshots in the different browsers equal in size #13

marco-c opened this issue Jan 31, 2018 · 8 comments
Labels

Comments

@marco-c
Copy link
Owner

marco-c commented Jan 31, 2018

Right now, Chrome is showing a scrollbar that we should get rid of, as it is simply adding noise.
Once we remove the scrollbar, the screenshots are probably not the same size in Firefox and Chrome, so we should adjust it to be the same.

@marxmit7
Copy link
Contributor

marxmit7 commented Feb 8, 2018

9465_chrome
9465_firefox

I found scrollbars earlier in data.zip but not when i am downloading images while now, 1st image is by chrome and the 2nd one is with firefox.
whether this issue is already resolved?

@sagarvijaygupta
Copy link
Collaborator

@amit2rockon I am pretty sure many of the settings of browsers are system dependent. For me images are not coming same in size.

@marco-c marco-c mentioned this issue Feb 12, 2018
@poush
Copy link
Contributor

poush commented Feb 17, 2018

I was checking out the dataset,
10030_0_chrome
10030_0_firefox

Since the content is same irrespective if scrollbar is visible or not, we could simply scale the larger image to the size of smaller one, once we removed the scroll bar. But seeing these images, the firefox has complete page while chrome has only first screen with scroll bar. So should we need to crop the firefox images as well depending upon the chrome's view ?

@marco-c
Copy link
Owner Author

marco-c commented Feb 18, 2018

Since the content is same irrespective if scrollbar is visible or not, we could simply scale the larger image to the size of smaller one, once we removed the scroll bar.

Instead of scaling, it would be more precise if we could get the same screenshot sizes directly. If we can't do that, I guess scaling would be an acceptable fallback solution.

But seeing these images, the firefox has complete page while chrome has only first screen with scroll bar. So should we need to crop the firefox images as well depending upon the chrome's view ?

This happens sometimes, but I think it's a problem of the screenshotting. We simply need to crop the image to the usual size in those cases.

@marco-c
Copy link
Owner Author

marco-c commented Apr 11, 2018

Some solutions to remove the scrollbars at the source are described here: https://stackoverflow.com/questions/9449562/how-to-remove-scrollbar-in-chromedriver-how-to-change-http-agent. I think the --hide-scrollbars one doesn't work anymore, as the flag has been removed. The second solution might work, but I wonder if it could cause other issues.

Another possible solution is to use mobile emulation for Chromium: https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation.

The last possible solution I see is to cut the scrollbar from the screenshots.

@marco-c
Copy link
Owner Author

marco-c commented Apr 11, 2018

It looks like --hide-scrollbars was added back (only when in headless mode): chromium/chromium@d71fc50.

@marco-c
Copy link
Owner Author

marco-c commented Apr 11, 2018

We should now make sure the screenshots are the same in size. Maybe we need to collect them in a VM or something like that to make sure everyone is collecting the sime size. Or maybe we can find another way to ensure it.

@marco-c
Copy link
Owner Author

marco-c commented Dec 7, 2018

#184 might fix this.

marxmit7 pushed a commit to marxmit7/autowebcompat that referenced this issue Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants