Skip to content

Commit d345661

Browse files
Apply suggestion from @wswebcreation
1 parent 18657c9 commit d345661

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/visual-service/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
## 9.2.1
44

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

8+
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.
9+
10+
# Committers: 1
11+
12+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))
713
- Updated dependencies [d5afb54]
814
- @wdio/image-comparison-core@1.2.1
915

0 commit comments

Comments
 (0)