You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
I’m noticing that seems a bit weird is that the actual dimensions of snapped screenshots that I’m seeing don’t seem to match the dimensions that I specify in my Huxleyfile.
For example;
screensize=1024x768 will reliably result in an image of 1009x663 being written to disk, as will screensize=320x768 result in 305x663.
Seems fair to assume that the browser chrome is being deducted from the viewport area given the consistent 15px & 105px reduction in image size.
I’m assuming that this is a bug? Kinda seems weird behaviour, also is inconsistent to what other tools (phantomjs, for example) do—which is return an image of the same size as specified by screensize.
PS: Really loving Huxley, thanks for open-sourcing it! 💃
The text was updated successfully, but these errors were encountered:
This is not a bug. It's how selenium interprets the dimensions being passed. I guess huxley could track the chrome dimensions and pass the correct values to selenium... Btw, I get 662 instead of 663.
Specifying dimensions for screenshots using selenium firefoxdriver
for desktop view, driver.manage().window().setSize(new Dimension(1200, 1200));
for tablet view, driver.manage().window().setSize(new Dimension(600, 600));
for mobile view, driver.manage().window().setSize(new Dimension(300, 300));
if web page actual dimension 1614 by 1697 then screenshot dimension
for desktop view 1437 by 2770
for tablet view 701 by 3695
for mobile view 696 by 5082
width of screenshot decreasing while height increasing but screenshot dimension not match with specified dimension
Hey there,
I’m noticing that seems a bit weird is that the actual dimensions of snapped screenshots that I’m seeing don’t seem to match the dimensions that I specify in my
Huxleyfile
.For example;
screensize=1024x768
will reliably result in an image of1009x663
being written to disk, as willscreensize=320x768
result in305x663
.Seems fair to assume that the browser chrome is being deducted from the viewport area given the consistent
15px
&105px
reduction in image size.I’m assuming that this is a bug? Kinda seems weird behaviour, also is inconsistent to what other tools (phantomjs, for example) do—which is return an image of the same size as specified by
screensize
.PS: Really loving Huxley, thanks for open-sourcing it! 💃
The text was updated successfully, but these errors were encountered: