xk6-browser icon indicating copy to clipboard operation
xk6-browser copied to clipboard

Fix fill functionality for textarea

Open bandorko opened this issue 11 months ago • 2 comments

What?

Fixes a bug, where calling fill() on textarea throws error. #1225

Why?

fill() should work for any contenteditable node. Currently it works only for <input>

Checklist

  • [x] I have performed a self-review of my code
  • [x] I have added tests for my changes
  • [ ] I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

#1225

bandorko avatar Mar 07 '24 15:03 bandorko

I would test that this works for input elements, too.

iandesj avatar Mar 08 '24 13:03 iandesj

@iandesj

Of course you can try it, if you build a custom k6 binary from the code on the branch. Fill() for <input> elements has worked so far, and it already has a test at https://github.com/grafana/xk6-browser/blob/main/tests/locator_test.go#L99-L105 If you find any scenario that fails with this implementation, I would be happy to deal with it.

bandorko avatar Mar 08 '24 14:03 bandorko

Thanks @ankur22, @inancgumus, and of course @bandorko 👏🏻

What does the process look like for getting this into the next k6 release? So I know what to expect.

iandesj avatar Mar 11 '24 15:03 iandesj

What does the process look like for getting this into the next k6 release? So I know what to expect.

It will be in the next version of k6 (v0.50.0) which should be released in the next couple of weeks 🤞

ankur22 avatar Mar 11 '24 15:03 ankur22