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

Prepare Page for async migration part #2 #1345

Merged
merged 17 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
56 changes: 28 additions & 28 deletions browser/mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,31 +293,31 @@ type browserContextAPI interface {

// pageAPI is the interface of a single browser tab.
type pageAPI interface {
BringToFront()
Check(selector string, opts goja.Value)
BringToFront() error
Check(selector string, opts goja.Value) error
Click(selector string, opts goja.Value) error
Close(opts goja.Value) error
Content() string
Content() (string, error)
Context() *common.BrowserContext
Dblclick(selector string, opts goja.Value)
Dblclick(selector string, opts goja.Value) error
DispatchEvent(selector string, typ string, eventInit goja.Value, opts goja.Value)
EmulateMedia(opts goja.Value)
EmulateVisionDeficiency(typ string)
EmulateMedia(opts goja.Value) error
EmulateVisionDeficiency(typ string) error
Evaluate(pageFunc goja.Value, arg ...goja.Value) (any, error)
EvaluateHandle(pageFunc goja.Value, arg ...goja.Value) (common.JSHandleAPI, error)
Fill(selector string, value string, opts goja.Value)
Focus(selector string, opts goja.Value)
Fill(selector string, value string, opts goja.Value) error
Focus(selector string, opts goja.Value) error
Frames() []*common.Frame
GetAttribute(selector string, name string, opts goja.Value) goja.Value
GetAttribute(selector string, name string, opts goja.Value) (any, error)
GetKeyboard() *common.Keyboard
GetMouse() *common.Mouse
GetTouchscreen() *common.Touchscreen
Goto(url string, opts goja.Value) (*common.Response, error)
Hover(selector string, opts goja.Value)
InnerHTML(selector string, opts goja.Value) string
InnerText(selector string, opts goja.Value) string
InputValue(selector string, opts goja.Value) string
IsChecked(selector string, opts goja.Value) bool
Hover(selector string, opts goja.Value) error
InnerHTML(selector string, opts goja.Value) (string, error)
InnerText(selector string, opts goja.Value) (string, error)
InputValue(selector string, opts goja.Value) (string, error)
IsChecked(selector string, opts goja.Value) (bool, error)
IsClosed() bool
IsDisabled(selector string, opts goja.Value) bool
IsEditable(selector string, opts goja.Value) bool
Expand All @@ -339,14 +339,14 @@ type pageAPI interface {
SetDefaultTimeout(timeout int64)
SetExtraHTTPHeaders(headers map[string]string)
SetInputFiles(selector string, files goja.Value, opts goja.Value)
SetViewportSize(viewportSize goja.Value)
SetViewportSize(viewportSize goja.Value) error
Tap(selector string, opts goja.Value) error
TextContent(selector string, opts goja.Value) string
ThrottleCPU(common.CPUProfile) error
ThrottleNetwork(common.NetworkProfile) error
Title() (string, error)
Type(selector string, text string, opts goja.Value)
Uncheck(selector string, opts goja.Value)
Uncheck(selector string, opts goja.Value) error
URL() (string, error)
ViewportSize() map[string]float64
WaitForFunction(fn, opts goja.Value, args ...goja.Value) (any, error)
Expand All @@ -367,26 +367,26 @@ type consoleMessageAPI interface {

// frameAPI is the interface of a CDP target frame.
type frameAPI interface {
Check(selector string, opts goja.Value)
Check(selector string, opts goja.Value) error
ChildFrames() []*common.Frame
Click(selector string, opts goja.Value) error
Content() string
Dblclick(selector string, opts goja.Value)
Content() (string, error)
Dblclick(selector string, opts goja.Value) error
DispatchEvent(selector string, typ string, eventInit goja.Value, opts goja.Value)
// EvaluateWithContext for internal use only
EvaluateWithContext(ctx context.Context, pageFunc goja.Value, args ...goja.Value) (any, error)
Evaluate(pageFunc goja.Value, args ...goja.Value) (any, error)
EvaluateHandle(pageFunc goja.Value, args ...goja.Value) (common.JSHandleAPI, error)
Fill(selector string, value string, opts goja.Value)
Focus(selector string, opts goja.Value)
Fill(selector string, value string, opts goja.Value) error
Focus(selector string, opts goja.Value) error
FrameElement() (*common.ElementHandle, error)
GetAttribute(selector string, name string, opts goja.Value) goja.Value
GetAttribute(selector string, name string, opts goja.Value) (any, error)
Goto(url string, opts goja.Value) (*common.Response, error)
Hover(selector string, opts goja.Value)
InnerHTML(selector string, opts goja.Value) string
InnerText(selector string, opts goja.Value) string
InputValue(selector string, opts goja.Value) string
IsChecked(selector string, opts goja.Value) bool
Hover(selector string, opts goja.Value) error
InnerHTML(selector string, opts goja.Value) (string, error)
InnerText(selector string, opts goja.Value) (string, error)
InputValue(selector string, opts goja.Value) (string, error)
IsChecked(selector string, opts goja.Value) (bool, error)
IsDetached() bool
IsDisabled(selector string, opts goja.Value) bool
IsEditable(selector string, opts goja.Value) bool
Expand All @@ -409,7 +409,7 @@ type frameAPI interface {
TextContent(selector string, opts goja.Value) string
Title() string
Type(selector string, text string, opts goja.Value)
Uncheck(selector string, opts goja.Value)
Uncheck(selector string, opts goja.Value) error
URL() string
WaitForFunction(pageFunc, opts goja.Value, args ...goja.Value) (any, error)
WaitForLoadState(state string, opts goja.Value)
Expand Down
Loading
Loading