Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 7d2e8ee

Browse files
inancgumusIvan Mirić
and
Ivan Mirić
authored
Release notes v0.3.0 (#265)
* Add checkHitTarget fix to release notes * Update #264 details * Mention the rest of v0.3.0 changes * Update mention of JS API docs * Mention k6 update along with other dependencies * Mention #299 fix * Mention #300 improvement * Remove leftover closing paren * Add 264 as a feature (#265) * Update 283 comment (#265) * Add executablePath option (#265) * Rephrase code refactors (#265) * Rephrase waitForFunction mention Resolves #265 (comment) * Mention the project roadmap as an improvement * Mention that raf is the default waitForFunction polling option Co-authored-by: Ivan Mirić <ivan.miric@grafana.com>
1 parent 6e49bc8 commit 7d2e8ee

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

release notes/v0.3.0.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
xk6-browser v0.3.0 is here! :tada:
2+
3+
This is a minor release with some important bug fixes, a couple of new features, improvements and code refactoring!
4+
5+
6+
## New features
7+
8+
- Implemented `Browser.on(event)`. ([#268](https://github.com/grafana/xk6-browser/pull/268), [#287](https://github.com/grafana/xk6-browser/pull/287))
9+
10+
`on('disconnected')` returns a `Promise` you can wait on to get notified when the WebSocket connection to the browser is closed. See [this example](https://github.com/grafana/xk6-browser/blob/v0.3.0/examples/browser_on.js) for details.
11+
12+
This is the first async method in xk6-browser, using the newly released [event loop support in k6](https://github.com/grafana/k6/pull/2228), and marks the start of our transition to async APIs. :tada:
13+
14+
- Exposed preconfigured mobile device emulation settings. ([#289](https://github.com/grafana/xk6-browser/pull/289))
15+
16+
We maintain an internal list of popular devices with their viewport size, user agent and scaling factor, which is useful to test how a web site looks and behaves on different devices. See [this example](https://github.com/grafana/xk6-browser/blob/v0.3.0/examples/device_emulation.js) for details.
17+
18+
- Made concealed elements clickable. ([#264](https://github.com/grafana/xk6-browser/pull/264))
19+
20+
We've added an automatic retry mechanism to improve the reliability of element and pointer actions. We will further improve this in future releases - hence our users' experience.
21+
22+
23+
## Bugs fixed
24+
25+
- Made concealed elements clickable. ([#264](https://github.com/grafana/xk6-browser/pull/264))
26+
27+
Previously, interacting with an element obscured by another was failing with `wait for selector did not result in any nodes`. Now we properly detect this scenario and retry the action with different scroll positions. This affects all `Element` and `Frame` `click()`, `dblclick()`, `hover()`, `check()`, `uncheck()` and `tap()` actions.
28+
29+
- Fixed `waitForSelector()` flakiness by retrying once on failure. ([#260](https://github.com/grafana/xk6-browser/pull/260))
30+
31+
- Fixed data race accessing `Frame.documentHandle` while switching execution contexts. ([#263](https://github.com/grafana/xk6-browser/pull/263))
32+
33+
- Fixed keyboard press of special keys. ([#283](https://github.com/grafana/xk6-browser/pull/283))
34+
35+
Previously pressing some keys like Backspace, Delete, ArrowLeft, and AltGraph would panic.
36+
37+
- Fixed negative metric emission in certain rare scenarios. ([#288](https://github.com/grafana/xk6-browser/pull/288))
38+
39+
- Fixed `Page.waitForFunction()`. ([#294](https://github.com/grafana/xk6-browser/pull/294))
40+
41+
`waitForFunction()` previously wasn't working. The fix is a rewrite of the feature that ensures all three polling variants work. Valid `polling` options are:
42+
* `raf` (default): run the predicate function in a [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) callback. This will run most frequently, up to 60 times a second.
43+
* `mutation`: run the predicate function on every DOM mutation.
44+
* number: run the predicate function at an interval, this many milliseconds apart.
45+
46+
Also note that this is now an async method that returns a `Promise`, so you must use `then()` to resolve it.
47+
48+
See [this example](https://github.com/grafana/xk6-browser/blob/v0.3.0/examples/waitforfunction.js) for details.
49+
50+
- Fixed `Page.innerHTML()`, `Page.innerText()` and `Page.textContent()` panic. ([#299](https://github.com/grafana/xk6-browser/pull/299))
51+
52+
- Fixed the `executablePath` option. ([#246](https://github.com/grafana/xk6-browser/pull/246))
53+
54+
Although you could fill this option out, it wasn't working before, and we were using a predefined path by default. We implemented the option code, and you can now run a Chrome browser of your choice by providing the file path.
55+
56+
57+
## Improvements
58+
59+
- Improved detection of non-clickable elements. ([#270](https://github.com/grafana/xk6-browser/pull/270))
60+
61+
We now properly detect elements obscured by another element and return an error instead of waiting. This enables the fix in [#264](https://github.com/grafana/xk6-browser/pull/264).
62+
63+
- Cleanly close the WebSocket connection when `Browser.close()` is called. ([#268](https://github.com/grafana/xk6-browser/pull/268))
64+
65+
- Added lifecycle event validation to `Page.waitForLoadState()`. ([#300](https://github.com/grafana/xk6-browser/pull/300))
66+
67+
- We have started updating our [JavaScript API documentation](https://k6.io/docs/javascript-api/xk6-browser/), which we know how important it is to serve as a reference while writing your scripts. This is an ardous task that won't be possible in a couple of weeks, but rest assured we're prioritizing it in all upcoming development cycles, and will be releasing gradual changes as they're done.
68+
69+
- We added a [project roadmap](https://github.com/grafana/xk6-browser/blob/v0.3.0/ROADMAP.md) to share our development goals with the community.
70+
71+
72+
73+
## Internals
74+
75+
- Refactored the `chromium` package to fix linter issues and improve code structure. ([#246](https://github.com/grafana/xk6-browser/pull/246))
76+
77+
- Several code refactors to improve maintainability. ([#269](https://github.com/grafana/xk6-browser/pull/269), [#293](https://github.com/grafana/xk6-browser/pull/293))
78+
79+
- All dependencies were updated to their latest versions. ([#274](https://github.com/grafana/xk6-browser/pull/274))
80+
Specifically, k6 was updated to [v0.38.0](https://github.com/grafana/k6/releases/tag/v0.38.0), which required us to fix some breaking changes ([#286](https://github.com/grafana/xk6-browser/pull/286), [#302](https://github.com/grafana/xk6-browser/pull/302)).

0 commit comments

Comments
 (0)