GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — AllureSelenide: use Selenide.screenshot for screenshots so Photographer plugins apply by USSQA · Pull Request #1440 · allure-framework/allure-java

Conversation

@USSQA

@USSQA USSQA commented Sep 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Context

Fixes #1439

AllureSelenide.getScreenshotBytes() currently bypasses Selenide and calls ((TakesScreenshot) WebDriverRunner.getWebDriver()).getScreenshotAs(OutputType.BYTES) directly on the raw WebDriver. As a result, Selenide plugins that customize the Photographer (e.g. selenide-full-screenshot) are ignored, so screenshots attached to Allure reports don't match the screenshots Selenide itself produces elsewhere in the test suite and are not full page screenshots as users expect.

This change replaces the direct WebDriver call with Selenide.screenshot(OutputType.BYTES), which:

  • routes the screenshot through Selenide's configured Photographer, so plugins like selenide-full-screenshot apply consistently to Allure attachments
  • handles the "no WebDriver started" case internally by returning null, which is mapped to Optional.empty() via Optional.ofNullable, preserving the existing behavior of the removed WebDriverRunner.hasWebDriverStarted() guard
  • keeps the existing WebDriverException handling unchanged

No public API changes, behavior is identical for the default Photographer.

Checklist

  • Sign Allure CLA
  • Provide unit tests (covered by existing tests)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@USSQA
use Selenide.screenshot to get screenshot bytes
7bd0cc0
@baev baev added the pr:improvement Change that improves some user experience but can't be considered as a new feature label Sep 17, 2026
@baev

baev commented Sep 17, 2026

Copy link
Copy Markdown
Member

@USSQA thanks!

can you please add a test for the change?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CLAassistant

CLAassistant commented Sep 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@USSQA
test(selenide): verify screenshots are taken via Selenide Photographe…
cc72568
…r plugin

- add test with a custom Photographer registered via SPI, asserting its bytes end up in the Allure attachment
- add test that a driver without TakesScreenshot support does not break step reporting
- add TestPhotographer fixture and META-INF/services registration
@USSQA
USSQA force-pushed the main branch from a73400d to cc72568 Compare September 17, 2026 16:28
@USSQA

USSQA commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@baev done ✅

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@USSQA
Merge branch 'main' into main
12703b7
@mikashee mikashee mentioned this pull request Oct 9, 2026
AllureSelenide attaches Screenshot and Page source once per nesting level of SelenideLogger.step #1453
Open
1 task done
baev
baev approved these changes Oct 22, 2026
View reviewed changes
@USSQA

USSQA commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@baev it looks like the build checks failed because of a temporary Eclipse outage. We ran the allure-selenide tests locally and everything seems to still work fine, so should be able to just re-run those failing build checks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@USSQA

USSQA commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@baev looks like the issue happened again and is affecting other PRs aside from this one. When you get a chance could you please rerun the failed checks and babysit it for a sec in case they need to be restarted again? Would really love to get this change pushed forward. Thank you 🙏

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@baev
Merge branch 'main' into main
5f9b306
@baev

baev commented Nov 2, 2026

Copy link
Copy Markdown
Member

@USSQA

FAILURE: Build failed with an exception.
548 actionable tasks: 548 executed

* What went wrong:
Execution failed for task ':allure-selenide:spotlessJavaCheck' (registered in build file 'build.gradle.kts').
> The following files had format violations:
      src/test/java/io/qameta/allure/selenide/TestPhotographer.java
          @@ -43,4 +43,3 @@
           ················:·Optional.empty();
           ····}
           }
          -
  Run './gradlew spotlessApply' to fix all violations.
USSQA reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@USSQA
run spotlessApply on allure-selenide
9b08dd7
@USSQA

USSQA commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@baev fixed ✅

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@baev
baev merged commit 48e8810 into allure-framework:main Nov 3, 2026
5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@baev

baev commented Nov 3, 2026

Copy link
Copy Markdown
Member

@USSQA thanks!

USSQA reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@baev baev baev approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

pr:improvement Change that improves some user experience but can't be considered as a new feature

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AllureSelenide should use Selenide's screenshot implementation instead of Selenium WebDriver's implementation

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@USSQA @baev @CLAassistant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.