Documentation ¶
Index ¶
- type Playwright
- func (p *Playwright) Check(selector string, opts playwright.FrameCheckOptions)
- func (p *Playwright) Click(selector string, opts playwright.PageClickOptions)
- func (p *Playwright) Connect(url string, args playwright.BrowserTypeConnectOverCDPOptions)
- func (p *Playwright) Cookies() []*playwright.BrowserContextCookiesResult
- 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) FirstContentfulPaint() uint64
- func (p *Playwright) FirstInputDelay() uint64
- func (p *Playwright) FirstPaint() uint64
- 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 playwright.BrowserTypeLaunchOptions)
- func (p *Playwright) LaunchPersistent(dir string, args playwright.BrowserTypeLaunchPersistentContextOptions)
- func (p *Playwright) NewPage()
- func (p *Playwright) PressKey(selector string, key string, opts playwright.PagePressOptions)
- func (p *Playwright) Reload()
- func (p *Playwright) Screenshot(filename string, perm fs.FileMode, opts playwright.PageScreenshotOptions)
- func (p *Playwright) SelectOptions(selector string, values playwright.SelectOptionValues, ...)
- func (p *Playwright) Sleep(time float64)
- func (p *Playwright) TimeToMinimallyInteractive() uint64
- func (p *Playwright) Type(selector string, typedString string, opts playwright.PageTypeOptions)
- func (p *Playwright) Uncheck(selector string, opts playwright.FrameUncheckOptions)
- 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 BrowserContext playwright.BrowserContext Page playwright.Page }
Playwright is the k6 extension for a playwright-go client.
func (*Playwright) Check ¶ added in v0.3.3
func (p *Playwright) Check(selector string, opts playwright.FrameCheckOptions)
Check wrapper around playwright check page function that takes in a selector and a set of options
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) Connect ¶ added in v0.2.5
func (p *Playwright) Connect(url string, args playwright.BrowserTypeConnectOverCDPOptions)
Connect attaches Playwright to an existing browser instance
func (*Playwright) Cookies ¶ added in v0.3.2
func (p *Playwright) Cookies() []*playwright.BrowserContextCookiesResult
Cookies wrapper around playwright cookies fetch function
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) FirstContentfulPaint ¶ added in v0.2.4
func (p *Playwright) FirstContentfulPaint() uint64
FirstContentfulPaint function that gathers the Real User Monitoring Metrics for First Contentful Paint of the current page
func (*Playwright) FirstInputDelay ¶ added in v0.2.4
func (p *Playwright) FirstInputDelay() uint64
FirstInputDelay function that gathers the Real User Monitoring Metrics for First Input Delay of the current page
func (*Playwright) FirstPaint ¶ added in v0.2.4
func (p *Playwright) FirstPaint() uint64
FirstPaint function that gathers the Real User Monitoring Metrics for First Paint of the current page
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 playwright.BrowserTypeLaunchOptions)
Launch starts the playwright client and launches a browser
func (*Playwright) LaunchPersistent ¶ added in v0.3.3
func (p *Playwright) LaunchPersistent(dir string, args playwright.BrowserTypeLaunchPersistentContextOptions)
LaunchPersistent starts the playwright client and launches a browser with a persistent context
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) Reload ¶ added in v0.2.4
func (p *Playwright) Reload()
Reload wrapper around playwright reload page function
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) SelectOptions ¶ added in v0.3.3
func (p *Playwright) SelectOptions(selector string, values playwright.SelectOptionValues, opts playwright.FrameSelectOptionOptions)
SelectOptions wrapper around playwright selectOptions page function that takes in a selector, values, and a set of options
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) TimeToMinimallyInteractive ¶ added in v0.2.4
func (p *Playwright) TimeToMinimallyInteractive() uint64
TimeToMinimallyInteractive function that gathers the Real User Monitoring Metrics for Time to Minimally Interactive of the current page (based on the first input)
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) Uncheck ¶ added in v0.3.3
func (p *Playwright) Uncheck(selector string, opts playwright.FrameUncheckOptions)
Uncheck wrapper around playwright uncheck page function that takes in a selector 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