k6
k6 copied to clipboard
k6/html: Have a way to get the selection out of an element
Feature Description
As reported in https://community.k6.io/t/create-selection-from-element/4643 it is comment in jquery to do selection.each
and then get the selection of the element that each
will give you and continue selecting.
This is currently not possible in k6, but we do have the selection of the element as part of the element so it shouldn't be that hard.
This likely though needs some though on the API
Suggested Solution (optional)
We can just have new Element method selection()
and be done with it. But it likely won't work a lot like jquery, how important is that is different question.
We can defined $
to mean something in k6 - maybe by calling a method on k6/html
. And then use that :shrug:.
But it will be confusing as $('li')
will not really mean anything as we don't know which page to query.
Maybe it can only be difined in each
:shrug:
Already existing or connected issues / PRs (optional)
No response