playwright

package module
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Goto

func Goto(ctx context.Context, args ...object.Object) object.Object

Goto initializes Playwright, launches a browser, creates a page, navigates to the specified URL, calls the provided callback function with the page, and automatically handles cleanup

func Install

func Install(ctx context.Context, args ...object.Object) object.Object

Install installs the Playwright engine and browsers

func Module

func Module() *object.Module

Module creates and returns the Playwright module

func Run

func Run(ctx context.Context, args ...object.Object) object.Object

Run initializes the Playwright engine and returns a Playwright instance

Types

type Browser

type Browser struct {
	// contains filtered or unexported fields
}

func (*Browser) Close

func (b *Browser) Close() object.Object

Close closes the browser

func (*Browser) Cost

func (b *Browser) Cost() int

func (*Browser) Equals

func (b *Browser) Equals(other object.Object) object.Object

func (*Browser) GetAttr

func (b *Browser) GetAttr(name string) (object.Object, bool)

func (*Browser) Inspect

func (b *Browser) Inspect() string

func (*Browser) Interface

func (b *Browser) Interface() interface{}

func (*Browser) IsTruthy

func (b *Browser) IsTruthy() bool

func (*Browser) NewPage

func (b *Browser) NewPage() object.Object

NewPage creates a new browser page

func (*Browser) RunOperation

func (b *Browser) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Browser) SetAttr

func (b *Browser) SetAttr(name string, value object.Object) error

func (*Browser) Type

func (b *Browser) Type() object.Type

type BrowserType

type BrowserType struct {
	// contains filtered or unexported fields
}

BrowserType wraps the playwright BrowserType (like Chromium, Firefox, WebKit)

func (*BrowserType) Cost

func (b *BrowserType) Cost() int

func (*BrowserType) Equals

func (b *BrowserType) Equals(other object.Object) object.Object

func (*BrowserType) GetAttr

func (b *BrowserType) GetAttr(name string) (object.Object, bool)

func (*BrowserType) Inspect

func (b *BrowserType) Inspect() string

func (*BrowserType) Interface

func (b *BrowserType) Interface() interface{}

func (*BrowserType) IsTruthy

func (b *BrowserType) IsTruthy() bool

func (*BrowserType) Launch

func (b *BrowserType) Launch() object.Object

Launch launches a browser of this type

func (*BrowserType) RunOperation

func (b *BrowserType) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*BrowserType) SetAttr

func (b *BrowserType) SetAttr(name string, value object.Object) error

func (*BrowserType) Type

func (b *BrowserType) Type() object.Type

type Locator

type Locator struct {
	// contains filtered or unexported fields
}

Locator wraps the playwright Locator

func (*Locator) Cost

func (l *Locator) Cost() int

func (*Locator) Equals

func (l *Locator) Equals(other object.Object) object.Object

func (*Locator) GetAttr

func (l *Locator) GetAttr(name string) (object.Object, bool)

func (*Locator) Inspect

func (l *Locator) Inspect() string

func (*Locator) Interface

func (l *Locator) Interface() interface{}

func (*Locator) IsTruthy

func (l *Locator) IsTruthy() bool

func (*Locator) RunOperation

func (l *Locator) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Locator) SetAttr

func (l *Locator) SetAttr(name string, value object.Object) error

func (*Locator) Type

func (l *Locator) Type() object.Type

type LocatorArray

type LocatorArray struct {
	// contains filtered or unexported fields
}

LocatorArray wraps a slice of playwright Locators

func (*LocatorArray) Contains

func (la *LocatorArray) Contains(item object.Object) *object.Bool

func (*LocatorArray) Cost

func (la *LocatorArray) Cost() int

func (*LocatorArray) DelItem

func (la *LocatorArray) DelItem(key object.Object) *object.Error

func (*LocatorArray) Equals

func (la *LocatorArray) Equals(other object.Object) object.Object

func (*LocatorArray) GetAttr

func (la *LocatorArray) GetAttr(name string) (object.Object, bool)

func (*LocatorArray) GetItem

func (la *LocatorArray) GetItem(key object.Object) (object.Object, *object.Error)

func (*LocatorArray) GetSlice

func (la *LocatorArray) GetSlice(s object.Slice) (object.Object, *object.Error)

func (*LocatorArray) Inspect

func (la *LocatorArray) Inspect() string

func (*LocatorArray) Interface

func (la *LocatorArray) Interface() interface{}

func (*LocatorArray) IsTruthy

func (la *LocatorArray) IsTruthy() bool

func (*LocatorArray) Iter

func (la *LocatorArray) Iter() object.Iterator

func (*LocatorArray) Len

func (la *LocatorArray) Len() *object.Int

func (*LocatorArray) RunOperation

func (la *LocatorArray) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*LocatorArray) SetAttr

func (la *LocatorArray) SetAttr(name string, value object.Object) error

func (*LocatorArray) SetItem

func (la *LocatorArray) SetItem(key, value object.Object) *object.Error

func (*LocatorArray) Type

func (la *LocatorArray) Type() object.Type

type LocatorArrayIterator

type LocatorArrayIterator struct {
	// contains filtered or unexported fields
}

func (*LocatorArrayIterator) Cost

func (it *LocatorArrayIterator) Cost() int

func (*LocatorArrayIterator) Entry

func (*LocatorArrayIterator) Equals

func (it *LocatorArrayIterator) Equals(other object.Object) object.Object

func (*LocatorArrayIterator) GetAttr

func (it *LocatorArrayIterator) GetAttr(name string) (object.Object, bool)

func (*LocatorArrayIterator) Inspect

func (it *LocatorArrayIterator) Inspect() string

func (*LocatorArrayIterator) Interface

func (it *LocatorArrayIterator) Interface() interface{}

func (*LocatorArrayIterator) IsTruthy

func (it *LocatorArrayIterator) IsTruthy() bool

func (*LocatorArrayIterator) Next

func (*LocatorArrayIterator) RunOperation

func (it *LocatorArrayIterator) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*LocatorArrayIterator) SetAttr

func (it *LocatorArrayIterator) SetAttr(name string, value object.Object) error

func (*LocatorArrayIterator) Type

func (it *LocatorArrayIterator) Type() object.Type

type LocatorArrayIteratorEntry

type LocatorArrayIteratorEntry struct {
	// contains filtered or unexported fields
}

func (*LocatorArrayIteratorEntry) Cost

func (e *LocatorArrayIteratorEntry) Cost() int

func (*LocatorArrayIteratorEntry) Equals

func (*LocatorArrayIteratorEntry) GetAttr

func (e *LocatorArrayIteratorEntry) GetAttr(name string) (object.Object, bool)

func (*LocatorArrayIteratorEntry) Inspect

func (e *LocatorArrayIteratorEntry) Inspect() string

func (*LocatorArrayIteratorEntry) Interface

func (e *LocatorArrayIteratorEntry) Interface() interface{}

func (*LocatorArrayIteratorEntry) IsTruthy

func (e *LocatorArrayIteratorEntry) IsTruthy() bool

func (*LocatorArrayIteratorEntry) Key

func (*LocatorArrayIteratorEntry) Primary

func (*LocatorArrayIteratorEntry) RunOperation

func (e *LocatorArrayIteratorEntry) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*LocatorArrayIteratorEntry) SetAttr

func (e *LocatorArrayIteratorEntry) SetAttr(name string, value object.Object) error

func (*LocatorArrayIteratorEntry) Type

func (*LocatorArrayIteratorEntry) Value

type Page

type Page struct {
	// contains filtered or unexported fields
}

Page wraps the playwright Page

func (*Page) Close

func (p *Page) Close() object.Object

func (*Page) Cost

func (p *Page) Cost() int

func (*Page) Equals

func (p *Page) Equals(other object.Object) object.Object

func (*Page) GetAttr

func (p *Page) GetAttr(name string) (object.Object, bool)

func (*Page) Goto

func (p *Page) Goto(url string) object.Object

Goto navigates the page to the given URL

func (*Page) Inspect

func (p *Page) Inspect() string

func (*Page) Interface

func (p *Page) Interface() interface{}

func (*Page) IsTruthy

func (p *Page) IsTruthy() bool

func (*Page) RunOperation

func (p *Page) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*Page) SetAttr

func (p *Page) SetAttr(name string, value object.Object) error

func (*Page) Type

func (p *Page) Type() object.Type

type PlaywrightInstance

type PlaywrightInstance struct {
	// contains filtered or unexported fields
}

PlaywrightInstance wraps the playwright.Playwright instance

func (*PlaywrightInstance) Cost

func (p *PlaywrightInstance) Cost() int

func (*PlaywrightInstance) Equals

func (p *PlaywrightInstance) Equals(other object.Object) object.Object

func (*PlaywrightInstance) GetAttr

func (p *PlaywrightInstance) GetAttr(name string) (object.Object, bool)

func (*PlaywrightInstance) Inspect

func (p *PlaywrightInstance) Inspect() string

func (*PlaywrightInstance) Interface

func (p *PlaywrightInstance) Interface() interface{}

func (*PlaywrightInstance) IsTruthy

func (p *PlaywrightInstance) IsTruthy() bool

func (*PlaywrightInstance) RunOperation

func (p *PlaywrightInstance) RunOperation(opType op.BinaryOpType, right object.Object) object.Object

func (*PlaywrightInstance) SetAttr

func (p *PlaywrightInstance) SetAttr(name string, value object.Object) error

func (*PlaywrightInstance) Stop

func (p *PlaywrightInstance) Stop() object.Object

Stop stops the Playwright instance and cleans up resources

func (*PlaywrightInstance) Type

func (p *PlaywrightInstance) Type() object.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL