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

#1571 use standard method WebDriver.getScreenshotAs() to get the element #1576

Merged
merged 2 commits into from
Sep 24, 2021

Conversation

asolntsev
Copy link
Member

fix fo #1571

@asolntsev asolntsev self-assigned this Sep 22, 2021
@asolntsev asolntsev linked an issue Sep 22, 2021 that may be closed by this pull request
... to get a screenshot of a single element.

 it seems to work better (than our previous home-made code) on Retina
 display.

 NB! I had to change parameter type from WebElement to SelenideElement
 because WebElement cannot be found before switching to frame, that's
 why it need to be (lazy-loaded) SelenideElement.
now we check the image more precisely:
* check the color of border (red for all divs)
* check the color of body (own color for every div)
* allow slightly varying colors in different browsers
@asolntsev asolntsev added this to the 5.25.0 milestone Sep 24, 2021
@asolntsev asolntsev merged commit 04b4dde into master Sep 24, 2021
@asolntsev asolntsev deleted the fix-element-screenshot-on-mac branch September 24, 2021 12:16
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.

Method $.screenshot() doesn't work correctly on Retina display
1 participant