Skip to content

Releases: webdriverio/visual-testing

webdriver-image-comparison@8.0.0

18 Apr 05:23
7f78351
Compare
Choose a tag to compare

Major Changes

  • 42956e4: ## 💥 BREAKING CHANGES

    🔍 Viewport Screenshot Logic Reworked for Mobile Web & Hybrid Apps

    What was the problem?

    Screenshots for mobile devices were inconsistent due to platform differences. iOS captures the entire device screen (including status and address bars), while Android (using ChromeDriver) only captures the webview, unless the capability "appium:nativeWebScreenshot": true is used.

    What changed?

    We’ve reimplemented the logic to correctly handle both platforms by default.
    This fix addresses [#747](https://github.com/webdriverio/visual-testing/pull/747).

    💡 Credit to Benjamin Karran (@ebekebe) for pointing us in the right direction to improve this logic!

    What’s the advantage?

    ✅ More accurate full-page and element screenshots on both Android and iOS.
    ⚠️ But this change may break your current baselines, especially on Android and iOS.


    🍏 iOS Element Screenshot Strategy Changed

    What was the problem?

    iOS element screenshots were previously cut from full-device screenshots, which could lead to misalignment or off-by-a-few-pixels issues.

    What changed?

    We now use the element screenshot endpoint directly.

    What’s the advantage?

    ✅ More accurate iOS element screenshots.
    ⚠️ But again, this may affect your existing baselines.


    🖥️ New Full-Page Screenshot Strategy for Desktop Web

    What was the problem?

    The "previous" scroll-and-stitch method simulated user interaction by scrolling the page, waiting, taking a screenshot, and repeating until the entire page was captured.
    This works well for lazy-loaded content, but it is slow and unstable on other pages.

    What changed?

    We now use WebDriver BiDi’s [[browsingContext.captureScreenshot](https://webdriver.io/docs/api/webdriverBidi#browsingcontextcapturescreenshot)] to capture full-page screenshots in one go. This is the new default strategy for desktop web browsers.

    📌 Mobile platforms (iOS/Android) still use the scroll-and-stitch approach for now.

    What’s the advantage?

    ✅ Execution time reduced by 50%+
    ✅ Logic is greatly simplified
    ✅ More consistent and stable results on static or non-lazy pages
    📸 Example

    Still want the old scroll-and-stitch behavior or need fullpage screenshots for pages who have lazy-loading?

    Use the userBasedFullPageScreenshot option to simulate user-like scrolling. This remains the better choice for pages with lazy-loading:

    // wdio.conf.ts
    services: [
      [
        "visual",
        {
          userBasedFullPageScreenshot: true,
        },
      ],
    ];

    Or per test:

    await expect(browser).toMatchFullPageSnapshot("homepage", {
      userBasedFullPageScreenshot: true,
    });

    💅 Polish

    ⚠️ Deprecated Root-Level Compare Options

    What was the problem?

    Compare options were allowed at the root level of the service config, making them harder to group or discover.

    What changed?

    You now get a warning if you still use root-level keys. Please move them under the compareOptions property instead.

    Example warning:

    WARN The following root-level compare options are deprecated and should be moved under 'compareOptions':
      - blockOutStatusBar
      - ignoreColors
    In the next major version, these options will be removed from the root level.
    

    📘 See: [compareOptions docs](https://webdriver.io/docs/visual-testing/service-options#compare-options)


    🐛 Bug Fixes


    🔧 Other

    • 🆙 Updated dependencies
    • 🧪 Improved test coverage
    • 📸 Refreshed image baselines

    Committers: 1

@wdio/visual-service@7.0.0

18 Apr 05:23
7f78351
Compare
Choose a tag to compare

Major Changes

  • 42956e4: ## 💥 BREAKING CHANGES

    🔍 Viewport Screenshot Logic Reworked for Mobile Web & Hybrid Apps

    What was the problem?

    Screenshots for mobile devices were inconsistent due to platform differences. iOS captures the entire device screen (including status and address bars), while Android (using ChromeDriver) only captures the webview, unless the capability "appium:nativeWebScreenshot": true is used.

    What changed?

    We’ve reimplemented the logic to correctly handle both platforms by default.
    This fix addresses [#747](https://github.com/webdriverio/visual-testing/pull/747).

    💡 Credit to Benjamin Karran (@ebekebe) for pointing us in the right direction to improve this logic!

    What’s the advantage?

    ✅ More accurate full-page and element screenshots on both Android and iOS.
    ⚠️ But this change may break your current baselines, especially on Android and iOS.


    🍏 iOS Element Screenshot Strategy Changed

    What was the problem?

    iOS element screenshots were previously cut from full-device screenshots, which could lead to misalignment or off-by-a-few-pixels issues.

    What changed?

    We now use the element screenshot endpoint directly.

    What’s the advantage?

    ✅ More accurate iOS element screenshots.
    ⚠️ But again, this may affect your existing baselines.


    🖥️ New Full-Page Screenshot Strategy for Desktop Web

    What was the problem?

    The "previous" scroll-and-stitch method simulated user interaction by scrolling the page, waiting, taking a screenshot, and repeating until the entire page was captured.
    This works well for lazy-loaded content, but it is slow and unstable on other pages.

    What changed?

    We now use WebDriver BiDi’s [[browsingContext.captureScreenshot](https://webdriver.io/docs/api/webdriverBidi#browsingcontextcapturescreenshot)] to capture full-page screenshots in one go. This is the new default strategy for desktop web browsers.

    📌 Mobile platforms (iOS/Android) still use the scroll-and-stitch approach for now.

    What’s the advantage?

    ✅ Execution time reduced by 50%+
    ✅ Logic is greatly simplified
    ✅ More consistent and stable results on static or non-lazy pages
    📸 Example

    Still want the old scroll-and-stitch behavior or need fullpage screenshots for pages who have lazy-loading?

    Use the userBasedFullPageScreenshot option to simulate user-like scrolling. This remains the better choice for pages with lazy-loading:

    // wdio.conf.ts
    services: [
      [
        "visual",
        {
          userBasedFullPageScreenshot: true,
        },
      ],
    ];

    Or per test:

    await expect(browser).toMatchFullPageSnapshot("homepage", {
      userBasedFullPageScreenshot: true,
    });

    💅 Polish

    ⚠️ Deprecated Root-Level Compare Options

    What was the problem?

    Compare options were allowed at the root level of the service config, making them harder to group or discover.

    What changed?

    You now get a warning if you still use root-level keys. Please move them under the compareOptions property instead.

    Example warning:

    WARN The following root-level compare options are deprecated and should be moved under 'compareOptions':
      - blockOutStatusBar
      - ignoreColors
    In the next major version, these options will be removed from the root level.
    

    📘 See: [compareOptions docs](https://webdriver.io/docs/visual-testing/service-options#compare-options)


    🐛 Bug Fixes


    🔧 Other

    • 🆙 Updated dependencies
    • 🧪 Improved test coverage
    • 📸 Refreshed image baselines

    Committers: 1

Patch Changes

  • Updated dependencies [42956e4]
    • webdriver-image-comparison@8.0.0

@wdio/visual-reporter@0.4.10

18 Apr 05:23
7f78351
Compare
Choose a tag to compare

Patch Changes

@wdio/ocr-service@2.2.6

18 Apr 05:23
7f78351
Compare
Choose a tag to compare

Patch Changes

@wdio/visual-reporter@0.4.9

15 Apr 15:00
80f65d2
Compare
Choose a tag to compare

Patch Changes

Committers: 1

webdriver-image-comparison@7.4.0

31 Mar 16:04
6ff70b1
Compare
Choose a tag to compare

Minor Changes

  • 7f859aa: Add additionalSearchParams to the Storybook Runner API
  • 307fbec: Add getStoriesBaselinePath to Storybook Runner API, enabling custom file paths (e.g. files with a flat hierarchy in the baselines folder)

Committers: 2

@wdio/visual-service@6.4.0

31 Mar 16:04
6ff70b1
Compare
Choose a tag to compare

Minor Changes

  • 7f859aa: Add additionalSearchParams to the Storybook Runner API
  • 307fbec: Add getStoriesBaselinePath to Storybook Runner API, enabling custom file paths (e.g. files with a flat hierarchy in the baselines folder)

Patch Changes

  • 3d232d1: Fix compareOptions not passed from config to the storybook runner tests
  • Updated dependencies [7f859aa]
  • Updated dependencies [307fbec]
    • webdriver-image-comparison@7.4.0

Committers: 2

@wdio/visual-service@6.3.3

16 Mar 05:59
88ad4f1
Compare
Choose a tag to compare

Patch Changes

  • 77bc764: Removed unused node-fetch dependency

Committers: 1

@wdio/visual-reporter@0.4.8

09 Mar 06:31
6a98880
Compare
Choose a tag to compare

Patch Changes

Committers: 1

webdriver-image-comparison@7.3.2

17 Feb 07:03
98e32dc
Compare
Choose a tag to compare

Patch Changes

Committers: 1