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

Cache elementScreenshotSupport per browser #1264

Merged
merged 2 commits into from
Jun 8, 2020

Conversation

alvarezguille
Copy link
Member

Fixes #1261

@alvarezguille alvarezguille requested a review from Artur- June 5, 2020 12:36
@Artur-
Copy link
Member

Artur- commented Jun 5, 2020

How is this tested?

@alvarezguille
Copy link
Member Author

Tests are already failing for IE and FF in the build for all browsers
image
image

org.openqa.selenium.UnsupportedCommandException: GET /session/XXXXXXXX-XXXX-XXXX-XXXX-XXXX72480538/element/0/screenshot
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'WIN-R1JBAO1CNPS', ip: '10.100.16.13', os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_91'
Driver info: driver.version: unknown
Command duration or timeout: 0 milliseconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.getScreenshotAs(RemoteWebElement.java:392)
at com.vaadin.testbench.TestBenchElement.getScreenshotAs(TestBenchElement.java:392)
at com.vaadin.testbench.commands.ScreenshotComparator.getScreenshot(ScreenshotComparator.java:97)
at com.vaadin.testbench.commands.ScreenshotComparator.compareScreen(ScreenshotComparator.java:42)
at com.vaadin.testbench.TestBenchElement.compareScreen(TestBenchElement.java:459)
at com.vaadin.tests.elements.ElementScreenCompareIT.elementCompareScreen(ElementScreenCompareIT.java:43)

@alvarezguille alvarezguille merged commit 0f3f20e into master Jun 8, 2020
@alvarezguille alvarezguille deleted the cache-element-screenshot-support branch June 8, 2020 10:24
alvarezguille added a commit that referenced this pull request Jun 8, 2020
* Cache elementScreenshotSupport per browser
* Make browsersWithoutElementScreenshot threadsafe

Fixes #1261
alvarezguille added a commit that referenced this pull request Jun 8, 2020
* Cache elementScreenshotSupport per browser
* Make browsersWithoutElementScreenshot threadsafe

Fixes #1261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScreenshotComparator#supportsElementScreenshots shouldn't be static
2 participants