From befe03c886db2f681f0f12040dd3d3f7f1d82eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0nan=C3=A7=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 13 Sep 2024 16:36:52 -0400 Subject: [PATCH] Add setChecked to release notes --- release notes/v0.54.0.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/release notes/v0.54.0.md b/release notes/v0.54.0.md index 73239fd7b3d..8576d27279a 100644 --- a/release notes/v0.54.0.md +++ b/release notes/v0.54.0.md @@ -165,6 +165,17 @@ const huge = BigInt(9007199254740991); Note: that prior k6 version v0.54, Golang's type `math/big.Int` mapped to another type, so it might be a breaking change for some extensions or users. +### New `setChecked` method for the browser module [`#3914`](https://github.com/grafana/xk6-browser/pull/1403) + +Previously, users could check or uncheck checkbox and radio button elements using the [`check`](https://grafana.com/docs/k6/latest/javascript-api/k6-browser/page/check/) and [`uncheck`](https://grafana.com/docs/k6/latest/javascript-api/k6-browser/page/uncheck/) methods. Now, we've added a `setChecked` method that allows users to set either the checked or unchecked state of a checkbox or radio button with a single method and a boolean argument. + +```javascript +await page.setChecked('#checkbox', true); // check the checkbox +await page.setChecked('#checkbox', false); // uncheck the checkbox +``` + +[Page](https://grafana.com/docs/k6/next/javascript-api/k6-browser/page/setchecked/), [Frame](https://grafana.com/docs/k6/next/javascript-api/k6-browser/frame/), [ElementHandle](https://grafana.com/docs/k6/next/javascript-api/k6-browser/elementhandle/), and [Locator](https://grafana.com/docs/k6/next/javascript-api/k6-browser/locator/) now support the new `setChecked` method. + ## UX improvements and enhancements - [#3898](https://github.com/grafana/k6/pull/3898) adds `SetupTimeout` option validation. Thank you, @tsukasaI!