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 was archived by the owner on Sep 21, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
Is that possible to use screenshotMode: fullpage on ChromeDriver? #557
Trying to use Gemini via ChromeDriver for mobile emulation testing
I want to get full page screenshot
My current settings are the following:
browsers:
mobile-320:
desiredCapabilities:
browserName: chromechromeOptions:
mobileEmulation:
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4'deviceMetrics:
width: 320height: 6000pixelRatio: 1
This variant doesn't fail, though makes screenshots not 6000px high, but my available screen area high
I tried adding screenshotMode: fullpage, which doesn't have any effect.
Combining screenshotMode: fullpage with height: 568 (instead of 6000) leads to out of bounds exception.
Any idea how to make this work (and make fullscreen mobile screenshot)?
I am capturing body element (html produces the same error)
Exception I'm getting:
StateError: Can not capture the specified region of the viewport.
The region bottom bound is outside of the viewport height.
Alternatively, you can test such cases by setting "true" value to option "compositeImage" in the config file.
Element position: 0, 0; size: 320, 1611.
Viewport size: 320, 568.
Setting compositeImage: true makes header with position fixed to duplicate on multiple positions, which is not good.
Reacted by Leo Gallucci, William Lin, StasGrishaev and Alex Sivtsov
option screenshotMode is about working with page, it's not mean that you can get screenshot of the full page. To capture block that biggest than viewport sizes you should use compositeImage option
Real screen size: 1920×1080
Gemini config screen size: 320×578 (set via deviceMetrics, or windowSize, or both)
Chrome version: 52.0.2743.116 m
ChromeDriver version: 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129)
Gemini version: 4.6.0
Windows version: Windows 10 x64, version 1511, build 10586.545
I’ve exactly the same issues as @thybzi described.
I’m using gemini v4.12.0 and still get the Out of bounds exception. Seems like #592 did not fix this problem. I’ve added some console.log statements here in order to see the actual numbers, here is what I got:
As you can see safeRect.height is a negative number which probably causes the problem.
For my test case I have set screenshotMode to fullpage and compositeImage to true. I haven’t set window sizes explicitly but I’m also using the mobileEmulation feature of chromeDriver with the Apple iPhone 5 preset.
But actually I'm luvky when I get "out of bounds". I've been experiencing all kinds of issues includung various failures to "inject" (?) Gemini code into th page etc.
Activity
thybzi commentedon Aug 22, 2016
I am capturing
bodyelement (htmlproduces the same error)Exception I'm getting:
Setting
compositeImage: truemakes header with position fixed to duplicate on multiple positions, which is not good.sipayRT commentedon Aug 25, 2016
in your case you can change
position: fixedtoposition: staticwithexecuteJSto capture all body. But what state you need to check?thybzi commentedon Aug 25, 2016
I just want to capture the full page without header doubling :)
thybzi commentedon Aug 25, 2016
Thanks for
executeJShackBut the true question is in issue's title:
sipayRT commentedon Aug 25, 2016
option
screenshotModeis about working with page, it's not mean that you can get screenshot of the full page. To capture block that biggest than viewport sizes you should usecompositeImageoptionthybzi commentedon Aug 28, 2016
UPD. "Out of bounds" exception is thrown even with both
screenshotMode: fullpageandcompositeImage: trueset at the same time, if I use ChromeDriver.When using PhantomJS with the same options enabled, no such error is produced.
Reproduced on Windows 10, but if you want, I'll try to reproduce on MacOSX/Ubuntu systems, too
sipayRT commentedon Aug 29, 2016
Can you show your screen sizes and Chrome version on which I can reproduce that behavior?
thybzi commentedon Sep 8, 2016
Real screen size:
1920×1080Gemini config screen size:
320×578(set viadeviceMetrics, orwindowSize, or both)Chrome version:
52.0.2743.116 mChromeDriver version:
2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129)Gemini version:
4.6.0Windows version:
Windows 10 x64,version 1511, build 10586.545sipayRT commentedon Sep 9, 2016
#592
thybzi commentedon Sep 21, 2016
You mean it's fixed in #592?
sipayRT commentedon Sep 21, 2016
it's about
out of the boundonly. Your case with fixed header can't be fixed by geminithybzi commentedon Sep 21, 2016
Ok, I'll retest the issue with fresh version of gemini
lo1tuma commentedon Oct 6, 2016
I’ve exactly the same issues as @thybzi described.
I’m using gemini
v4.12.0and still get theOut of bounds exception. Seems like #592 did not fix this problem. I’ve added someconsole.logstatements here in order to see the actual numbers, here is what I got:As you can see
safeRect.heightis a negative number which probably causes the problem.For my test case I have set
screenshotModetofullpageandcompositeImagetotrue. I haven’t set window sizes explicitly but I’m also using themobileEmulationfeature ofchromeDriverwith theApple iPhone 5preset.I’m testing against chrome 53.0 on Windows 10 with a native screen resolution of
1440x900(via saucelabs). I’m capturing thebodyelement.sipayRT commentedon Oct 6, 2016
@lo1tuma can you provide test and page for testing to reproduce your problem?
lo1tuma commentedon Oct 6, 2016
@sipayRT sure, I pushed a reproducible test case here: https://github.com/lo1tuma/gemini-issue-557
sipayRT commentedon Oct 10, 2016
@eGavr ⬆️ tvoj lubimij "out of the bounds" :)
eGavr commentedon Oct 10, 2016
@sipayRT , кажется, что для
out of the boundsстоит завести отдельныйissue, нет?pftg commentedon Nov 8, 2016
Will be great to fix this and
out of the boundsissues. Any updates here?mchennig commentedon Dec 4, 2018
Currently having the same Problem with current versions of Chrome, Selenium and Gemini. Maybe this is related to Chromedriver Issue 294?
masi commentedon Mar 29, 2019
Having the same issues.
But actually I'm luvky when I get "out of bounds". I've been experiencing all kinds of issues includung various failures to "inject" (?) Gemini code into th page etc.