Documentation ¶
Index ¶
- func NewBrowserType(vu k6modules.VU) api.BrowserType
- type Browser
- type BrowserType
- func (b *BrowserType) Connect(wsEndpoint string, opts goja.Value) api.Browser
- func (b *BrowserType) ExecutablePath() (execPath string)
- func (b *BrowserType) Launch(opts goja.Value) (_ api.Browser, browserProcessID int)
- func (b *BrowserType) LaunchPersistentContext(userDataDir string, opts goja.Value) api.Browser
- func (b *BrowserType) Name() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBrowserType ¶
func NewBrowserType(vu k6modules.VU) api.BrowserType
NewBrowserType registers our custom k6 metrics, creates method mappings on the goja runtime, and returns a new Chrome browser type.
Types ¶
type BrowserType ¶
type BrowserType struct { // FIXME: This is only exported because testBrowser needs it. Contexts // shouldn't be stored on structs if we can avoid it. Ctx context.Context // contains filtered or unexported fields }
BrowserType provides methods to launch a Chrome browser instance or connect to an existing one. It's the entry point for interacting with the browser.
func (*BrowserType) ExecutablePath ¶
func (b *BrowserType) ExecutablePath() (execPath string)
ExecutablePath returns the path where the extension expects to find the browser executable.
func (*BrowserType) Launch ¶
Launch allocates a new Chrome browser process and returns a new api.Browser value, which can be used for controlling the Chrome browser.
func (*BrowserType) LaunchPersistentContext ¶
LaunchPersistentContext launches the browser with persistent storage.
func (*BrowserType) Name ¶
func (b *BrowserType) Name() string
Name returns the name of this browser type.
Click to show internal directories.
Click to hide internal directories.