Open thybzi opened 8 years ago
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.
in your case you can change position: fixed
to position: static
with executeJS
to capture all body. But what state you need to check?
I just want to capture the full page without header doubling :)
Thanks for executeJS
hack
But the true question is in issue's title:
Is that possible to use screenshotMode: fullpage on ChromeDriver?
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
UPD. "Out of bounds" exception is thrown even with both screenshotMode: fullpage
and compositeImage: true
set 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
"Out of bounds" exception is thrown even with both screenshotMode: fullpage and compositeImage: true set at the same time, if I use ChromeDriver.
Can you show your screen sizes and Chrome version on which I can reproduce that behavior?
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
You mean it's fixed in #592?
it's about out of the bound
only. Your case with fixed header can't be fixed by gemini
Ok, I'll retest the issue with fresh version of gemini
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:
safeRect.left 0
safeRect.top 1136
safeRect.width 320
safeRect.height -304
imageSize.height 832
imageSize.width 1440
rect.width 320
rect.height 568
rect.top 1136
rect.left 0
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.
"desiredCapabilities": {
"chromeOptions": { "mobileEmulation": { "deviceName": "Apple iPhone 5" } }
}
I’m testing against chrome 53.0 on Windows 10 with a native screen resolution of 1440x900
(via saucelabs). I’m capturing the body
element.
@lo1tuma can you provide test and page for testing to reproduce your problem?
@sipayRT sure, I pushed a reproducible test case here: https://github.com/lo1tuma/gemini-issue-557
@eGavr ⬆️ tvoj lubimij "out of the bounds" :)
@sipayRT , кажется, что для out of the bounds
стоит завести отдельный issue
, нет?
Will be great to fix this and out of the bounds
issues. Any updates here?
Currently having the same Problem with current versions of Chrome, Selenium and Gemini. Maybe this is related to Chromedriver Issue 294?
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.
Trying to use Gemini via ChromeDriver for mobile emulation testing I want to get full page screenshot
My current settings are the following:
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
withheight: 568
(instead of 6000) leads toout of bounds
exception.Any idea how to make this work (and make fullscreen mobile screenshot)?