Documentation
¶
Index ¶
- type Playwright
- func (p *Playwright) Click(selector string, opts playwright.PageClickOptions)
- func (p *Playwright) DragAndDrop(sourceSelector string, targetSelector string, ...)
- func (p *Playwright) Evaluate(expression string, opts playwright.PageEvaluateOptions) interface{}
- func (p *Playwright) Fill(selector string, filledString string, opts playwright.FrameFillOptions)
- func (p *Playwright) Focus(selector string, opts playwright.PageFocusOptions)
- func (p *Playwright) Goto(url string, opts playwright.PageGotoOptions)
- func (p *Playwright) Kill()
- func (p *Playwright) Launch(args []string)
- func (p *Playwright) LaunchCustomBrowser(args []string, browserPath string, driver string)
- func (p *Playwright) NewPage()
- func (p *Playwright) PressKey(selector string, key string, opts playwright.PagePressOptions)
- func (p *Playwright) Screenshot(filename string, perm fs.FileMode, opts playwright.PageScreenshotOptions)
- func (p *Playwright) Sleep(time float64)
- func (p *Playwright) Type(selector string, typedString string, opts playwright.PageTypeOptions)
- func (p *Playwright) WaitForSelector(selector string, opts playwright.PageWaitForSelectorOptions)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Playwright ¶
type Playwright struct { Self *playwright.Playwright Browser playwright.Browser Page playwright.Page }
Playwright is the k6 extension for a playwright-go client.
func (*Playwright) Click ¶
func (p *Playwright) Click(selector string, opts playwright.PageClickOptions)
Click wrapper around playwright click page function that takes in a selector and a set of options
func (*Playwright) DragAndDrop ¶
func (p *Playwright) DragAndDrop(sourceSelector string, targetSelector string, opts playwright.FrameDragAndDropOptions)
DragAndDrop wrapper around playwright draganddrop page function that takes in two selectors(source and target) and a set of options
func (*Playwright) Evaluate ¶
func (p *Playwright) Evaluate(expression string, opts playwright.PageEvaluateOptions) interface{}
Evaluate wrapper around playwright evaluate page function that takes in an expresion and a set of options and evaluates the expression/function returning the resulting information.
func (*Playwright) Fill ¶
func (p *Playwright) Fill(selector string, filledString string, opts playwright.FrameFillOptions)
Fill wrapper around playwright fill page function that takes in a selector, text, and a set of options
func (*Playwright) Focus ¶
func (p *Playwright) Focus(selector string, opts playwright.PageFocusOptions)
Focus wrapper around playwright focus page function that takes in a selector and a set of options
func (*Playwright) Goto ¶
func (p *Playwright) Goto(url string, opts playwright.PageGotoOptions)
Goto wrapper around playwright goto page function that takes in a url and a set of options
func (*Playwright) Kill ¶
func (p *Playwright) Kill()
Kill closes browser instance and stops puppeteer client
func (*Playwright) Launch ¶
func (p *Playwright) Launch(args []string)
Launch starts the playwright client and launches a browser
func (*Playwright) LaunchCustomBrowser ¶ added in v0.2.1
func (p *Playwright) LaunchCustomBrowser(args []string, browserPath string, driver string)
func (*Playwright) NewPage ¶
func (p *Playwright) NewPage()
NewPage opens a new page within the browser
func (*Playwright) PressKey ¶
func (p *Playwright) PressKey(selector string, key string, opts playwright.PagePressOptions)
PressKey wrapper around playwright Press page function that takes in a selector, key, and a set of options
func (*Playwright) Screenshot ¶
func (p *Playwright) Screenshot(filename string, perm fs.FileMode, opts playwright.PageScreenshotOptions)
Screenshot wrapper around playwright screenshot page function that attempts to take and save a png image of the current screen.
func (*Playwright) Sleep ¶
func (p *Playwright) Sleep(time float64)
Sleep wrapper around playwright waitForTimeout page function that sleeps for the given `timeout` in milliseconds
func (*Playwright) Type ¶
func (p *Playwright) Type(selector string, typedString string, opts playwright.PageTypeOptions)
Type wrapper around playwright type page function that takes in a selector, string, and a set of options
func (*Playwright) WaitForSelector ¶
func (p *Playwright) WaitForSelector(selector string, opts playwright.PageWaitForSelectorOptions)
WaitForSelector wrapper around playwright waitForSelector page function that takes in a selector and a set of options