Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/fix-await-element-before-execute.md

This file was deleted.

12 changes: 12 additions & 0 deletions packages/image-comparison-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @wdio/image-comparison-core

## 1.2.1

### Patch Changes

- d5afb54: ## #1129 Fix `TypeError: element.getBoundingClientRect is not a function` when a `ChainablePromiseElement` is passed to `checkElement`

When `checkElement` (or `saveElement`) was called with a `ChainablePromiseElement`, the lazy promise-based element reference that WebdriverIO's `$()` returns, the element was passed directly as an argument to `browser.execute()` without being awaited first. `browser.execute()` serializes its arguments for transfer to the browser context and cannot handle a pending Promise, so it arrived in the browser as a plain empty object `{}` instead of a WebElement reference. This caused `element.getBoundingClientRect is not a function` because the browser-side `scrollElementIntoView` script received `{}` rather than a DOM element.

# Committers: 1

- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))

## 1.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/image-comparison-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wdio/image-comparison-core",
"version": "1.2.0",
"version": "1.2.1",
"author": "Wim Selles - wswebcreation",
"description": "Image comparison core module for @wdio/visual-service - WebdriverIO visual testing framework",
"keywords": [
Expand Down
13 changes: 13 additions & 0 deletions packages/visual-service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @wdio/visual-service

## 9.2.1

### Patch Changes
- d5afb54: ## #1129 Fix `TypeError: element.getBoundingClientRect is not a function` when a `ChainablePromiseElement` is passed to `checkElement`

Comment thread
wswebcreation marked this conversation as resolved.
When `checkElement` (or `saveElement`) was called with a `ChainablePromiseElement`, the lazy promise-based element reference that WebdriverIO's `$()` returns, the element was passed directly as an argument to `browser.execute()` without being awaited first. `browser.execute()` serializes its arguments for transfer to the browser context and cannot handle a pending Promise, so it arrived in the browser as a plain empty object `{}` instead of a WebElement reference. This caused `element.getBoundingClientRect is not a function` because the browser-side `scrollElementIntoView` script received `{}` rather than a DOM element.

# Committers: 1

- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
- Updated dependencies [d5afb54]
Comment thread
wswebcreation marked this conversation as resolved.
- @wdio/[email protected]

## 9.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/visual-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@wdio/visual-service",
"author": "Wim Selles - wswebcreation",
"description": "Image comparison / visual regression testing for WebdriverIO",
"version": "9.2.0",
"version": "9.2.1",
"license": "MIT",
"homepage": "https://webdriver.io/docs/visual-testing",
"repository": {
Expand Down
Loading