-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser v2: Async APIs #428
Labels
async
supports async (promises)
epic
feature
A new feature
playwright
Issue relating to Playwright compatibility
Comments
inancgumus
added
feature
A new feature
playwright
Issue relating to Playwright compatibility
next
Might be eligible for the next planning (not guaranteed!)
labels
Jul 4, 2022
This was referenced Jul 5, 2022
Merged
mstoykov
added a commit
that referenced
this issue
Oct 12, 2022
mstoykov
added a commit
that referenced
this issue
Oct 13, 2022
Updates #428 Co-authored-by: Ivan Mirić <ivan.miric@grafana.com>
mstoykov
added a commit
that referenced
this issue
Oct 13, 2022
mstoykov
added a commit
that referenced
this issue
Oct 13, 2022
8 tasks
inancgumus
removed
the
next
Might be eligible for the next planning (not guaranteed!)
label
Sep 22, 2023
This was referenced May 6, 2024
This was referenced May 28, 2024
It's worth noting that the browser module already has APIs (as of
Even though we have these, the changes we are making will still affect all users and their scripts since APIs such as |
7 tasks
3 tasks
5 tasks
This was referenced Jun 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
async
supports async (promises)
epic
feature
A new feature
playwright
Issue relating to Playwright compatibility
Migrate to Async
Nice to have
check
helper jslib.k6.io#125Migration is complete - Document the changes
Done Done
Click
#439WaitForNavigation
#440Tap
#1251goto
#583What
This issue has been repurposed to initiate and follow the progress of migrating most of the browser APIs to async (promise based).
A recent example is this issue where
touchscreen.tap
was migrated to async:From:
To:
Why
How
We have detailed exactly which APIs will most likely need to be migrated across in the comment within this issue. For most of the APIs we can take a look at the comment and migrate the APIs that are listed there. It's worth noting that it's still best to double check whether the API needs to be migrated especially ones which k6 browser implements but aren't provided by Playwright, for example
page.throttleCPU
.NOT Implemented In PW
If an API is not implemented in PW, then you should be able to answer yes to one of the questions in the list below to determine whether it should be async or not, for example
browser.context
is not in PW, and it doesn't do any IO or long running tasks, therefore it can stay as a synchronous API.Implemented in PW
Is the API in the list in this comment and is implemented in PW?
If the answer is yes, then it can be migrated to async.
Goja, docs and type defs
Initially we're only interested in moving the API to async, and not worrying about goja, doc and type definitions updates. Doc and type definition updates will be deferred to after the implementation work and before the release. We're hoping that the goja refactoring/abstraction work can also be shifted to a later point, but we may find that some APIs will also need goja to be refactored out of them to prevent panics and race conditions.
The text was updated successfully, but these errors were encountered: