Skip to content
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

Async Page #1355

Merged
merged 48 commits into from
May 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
dcf7d6f
Async page.bringToFront
inancgumus May 28, 2024
e80f998
Async page.check
inancgumus May 28, 2024
53b7e99
Async page.close
inancgumus May 28, 2024
fe04161
Async page.content
inancgumus May 28, 2024
90a70ef
Async page.dblclick
inancgumus May 28, 2024
f50a512
Async page.dispatchEvent
inancgumus May 28, 2024
38936d7
Async page.emulateMedia
inancgumus May 28, 2024
ad52c71
Async page.emulateVisionDeficiency
inancgumus May 28, 2024
d97b286
Async page.evaluate
inancgumus May 28, 2024
fe90e26
Async page.evaluateHandle
inancgumus May 28, 2024
3c93ad5
Async page.fill
inancgumus May 28, 2024
c2cb3b3
Async page.focus
inancgumus May 28, 2024
237185e
Async page.getAttribute
inancgumus May 28, 2024
af519d0
Async page.hover
inancgumus May 28, 2024
b6f4320
Async page.innerHTML
inancgumus May 28, 2024
6838228
Async page.innerText
inancgumus May 28, 2024
671a5b8
Async page.inputValue
inancgumus May 28, 2024
1e4e1af
Async page.isChecked
inancgumus May 28, 2024
c0a163b
Async page.isDisabled
inancgumus May 28, 2024
316ab0a
Async page.isEditable
inancgumus May 28, 2024
7b8768f
Async page.isEnabled
inancgumus May 28, 2024
3f513b5
Async page.isHidden
inancgumus May 28, 2024
97556a5
Async page.isVisible
inancgumus May 28, 2024
20edcf7
Async page.opener
inancgumus May 28, 2024
216f06f
Async page.press
inancgumus May 28, 2024
8366607
Async page.reload
inancgumus May 28, 2024
5bdd8f1
Async page.screenshot
inancgumus May 28, 2024
c3ff184
Async page.selectOption
inancgumus May 28, 2024
c38f603
Async page.setContent
inancgumus May 28, 2024
34ba333
Async page.setExtraHTTPHeaders
inancgumus May 28, 2024
6b4da9a
Async page.setInputFiles
inancgumus May 28, 2024
62461eb
Async page.setViewportSize
inancgumus May 28, 2024
8148845
Async page.textContent
inancgumus May 28, 2024
895c367
Async page.throttleCPU
inancgumus May 28, 2024
78b8119
Async page.throttleNetwork
inancgumus May 28, 2024
6d9134d
Async page.title
inancgumus May 28, 2024
abb570a
Async page.type
inancgumus May 28, 2024
ee81639
Async page.uncheck
inancgumus May 28, 2024
adc3814
Async page.viewportSize
inancgumus May 28, 2024
adbd3f2
Async page.waitForLoadState
inancgumus May 28, 2024
1ee0f7b
Async page.waitForSelector
inancgumus May 28, 2024
2d617a6
Async page.waitForTimeout
inancgumus May 28, 2024
67b755b
Async page.query
inancgumus May 28, 2024
8852b68
Async page.queryAll
inancgumus May 28, 2024
eb01583
Update async page tests
inancgumus May 28, 2024
0d92117
Update JS examples for async page
inancgumus May 28, 2024
ad9e5b5
Add forgetten page err checks in tests
inancgumus May 29, 2024
7608b48
Revert "Async page.viewportSize"
inancgumus May 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions browser/page_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,12 @@ func mapPage(vu moduleVU, p *common.Page) mapping { //nolint:gocognit,cyclop
return nil, p.Uncheck(selector, opts) //nolint:wrapcheck
})
},
"url": p.URL,
"viewportSize": p.ViewportSize,
"url": p.URL,
"viewportSize": func() *goja.Promise {
inancgumus marked this conversation as resolved.
Show resolved Hide resolved
return k6ext.Promise(vu.Context(), func() (any, error) {
return p.ViewportSize(), nil
})
},
"waitForFunction": func(pageFunc, opts goja.Value, args ...goja.Value) (*goja.Promise, error) {
js, popts, pargs, err := parseWaitForFunctionArgs(
vu.Context(), p.Timeout(), pageFunc, opts, args...,
Expand Down