package
2.0.0+incompatible
Repository: https://github.com/grafana/xk6-browser.git
Documentation: pkg.go.dev

# Packages

Package js provides JavaScript code that the browser module evaluates on the browser.

# Functions

GetBrowserOptions returns the browser options attached to the context.
GetDevices returns predefined emulation settings for many end-user devices.
No description provided by the author
GetIterationID returns the iteration identifier attached to the context.
GetNetworkProfiles returns NetworkProfiles which are ready to be used to throttle the network with page.throttleNetwork.
GetTracer returns the tracer attached to the context, or nil if not found.
No description provided by the author
NewBaseEventEmitter creates a new instance of a base event emitter.
NewBrowser creates a new browser, connects to it, then returns it.
NewBrowserContext creates a new browser context.
NewBrowserContextOptions creates a default set of browser context options.
NewConnection creates a new browser.
NewCredentials return a new Credentials.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewElementHandleDispatchEventOptions returns a new ElementHandleDispatchEventOptions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewElementHandleSetInputFilesOptions creates a new ElementHandleSetInputFilesOption.
No description provided by the author
No description provided by the author
No description provided by the author
NewEmulatedSize creates and returns a new EmulatedSize.
NewExecutionContext creates a new JS execution context.
NewFrame creates a new HTML document frame.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewFrameDispatchEventOptions returns a new FrameDispatchEventOptions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewFrameIsHiddenOptions creates and returns a new instance of FrameIsHiddenOptions.
NewFrameIsVisibleOptions creates and returns a new instance of FrameIsVisibleOptions.
NewFrameManager creates a new HTML document frame manager.
No description provided by the author
No description provided by the author
NewFrameSession initializes and returns a new FrameSession.
No description provided by the author
NewFrameSetInputFilesOptions creates a new FrameSetInputFilesOptions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewGeolocation creates a new instance of Geolocation.
NewGrantPermissionsOptions returns a new GrantPermissionsOptions.
No description provided by the author
NewHTTPResponse creates a new HTTP response.
NewJSHandle creates a new JS handle referencing a remote object.
NewKeyboard returns a new keyboard with a "us" layout.
No description provided by the author
NewLocalBrowserOptions returns a new BrowserOptions for a browser launched in the local machine.
NewLocalBrowserProcess starts a local browser process and returns a new BrowserProcess instance to interact with it.
NewLocator creates and returns a new locator.
NewMouse creates a new mouse.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewNetworkManager creates a new network manager.
NewNetworkProfile creates a non-throttled network profile.
NewPage creates a new browser page context.
No description provided by the author
No description provided by the author
No description provided by the author
NewRemoteBrowserOptions returns a new BrowserOptions for a browser running in a remote machine.
NewRemoteBrowserProcess returns a new BrowserProcess instance which references a remote browser process.
NewRequest creates a new HTTP request.
No description provided by the author
NewSession creates a new session.
NewTimeoutSettings creates a new timeout settings object.
NewTouchscreen returns a new TouchScreen.
NewWaitForEventOptions created a new instance of WaitForEventOptions with a default timeout.
NewWorker creates a new page viewport.
TraceAPICall is a helper method that retrieves the Tracer from the given ctx and calls its TraceAPICall implementation.
TraceEvent is a helper method that retrieves the Tracer from the given ctx and calls its TraceEvent implementation.
TraceNavigation is a helper method that retrieves the Tracer from the given ctx and calls its TraceNavigation implementation.
TrimQuotes removes surrounding single or double quotes from s.
WithBrowserOptions adds the browser options to the context.
No description provided by the author
WithIterationID adds an identifier for the current iteration to the context.
WithTracer adds the given tracer to the context.

# Constants

BlankPage represents a blank page.
No description provided by the author
No description provided by the author
Valid color schemes.
Valid color schemes.
Valid color schemes.
CookieSameSiteLax sets the cookie to be sent along with "same-site" requests, and with "cross-site" top-level navigations.
CookieSameSiteNone sets the cookie to be sent in all contexts, i.e potentially insecure third-party requests.
CookieSameSiteStrict sets the cookie to be sent only in a first-party context and not be sent along with requests initiated by third party websites.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Valid DOM element states.
Valid DOM element states.
Valid DOM element states.
Valid DOM element states.
Error types.
Error types.
Error types.
Error types.
Error types.
Error types.
Error types.
Error types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Valid image format options.
Valid image format options.
LifecycleEventDOMContentLoad is emitted when the DOMContentLoaded event is fired.
LifecycleEventLoad is emitted when the page load event is fired.
LifecycleEventNetworkIdle is emitted when there are no more than 2 network connections for at least 500 ms.
No description provided by the author
MediaTypePrint represents the print media type.
MediaTypeScreen represents the screen media type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PollingInterval is the interval polling type.
PollingMutation is the mutation polling type.
PollingRaf is the requestAnimationFrame polling type.
Valid reduce-motion options.
Valid reduce-motion options.
ScrollPositionCenter scrolls an element at the center of its parent.
ScrollPositionEnd scrolls an element at the end of its parent.
ScrollPositionNearest scrolls an element at the nearest position of its parent.
ScrollPositionStart scrolls an element at the top of its parent.
No description provided by the author

# Structs

No description provided by the author
BaseEventEmitter emits events to registered handlers.
BaseJSHandle represents a JS object in an execution context.
No description provided by the author
Browser stores a Browser context.
BrowserContext stores context information for a single independent browser session.
BrowserContextOptions stores browser context options.
BrowserOptions stores browser options.
No description provided by the author
Connection represents a WebSocket connection and the root "Browser Session".
ConsoleMessage represents a page console message.
Cookie represents a browser cookie.
CPUProfile is used in throttleCPU.
Credentials holds HTTP authentication credentials.
Device represents an end-user device (computer, tablet, phone etc.).
No description provided by the author
ElementHandle represents a HTML element JS object inside an execution context.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ElementHandleDispatchEventOptions are options for ElementHandle.dispatchEvent.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ElementHandleSetInputFilesOptions are options for ElementHandle.SetInputFiles.
No description provided by the author
No description provided by the author
No description provided by the author
EmulatedSize represents the emulated viewport and screen sizes.
Event as emitted by an EventEmiter.
ExecutionContext represents a JS execution context.
File is the descriptor of a single file.
Files is the input parameter for ElementHandle.SetInputFiles.
Frame represents a frame in an HTML document.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FrameDispatchEventOptions are options for Frame.dispatchEvent.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FrameLifecycleEvent is emitted when a frame lifecycle event occurs.
FrameManager manages all frames in a page and their life-cycles, it's a purely internal component.
No description provided by the author
No description provided by the author
FrameSession is used for managing a frame's life-cycle, or in other words its full session.
No description provided by the author
FrameSetInputFilesOptions are options for Frame.setInputFiles.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Geolocation represents a geolocation.
GrantPermissionsOptions is used by BrowserContext.GrantPermissions.
No description provided by the author
HTTPHeader is a single HTTP header.
HTTPMessageSize are the sizes in bytes of the HTTP message header and body.
Keyboard represents a keyboard input device.
No description provided by the author
Locator represent a way to find element(s) on the page at any moment.
Mouse represents a mouse input device.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NavigationEvent is emitted when we receive a Page.frameNavigated or Page.navigatedWithinDocument CDP event.
NetworkManager manages all frames in HTML document.
NetworkProfile is used in ThrottleNetwork.
NewRequestParams are input parameters for NewRequest.
Page stores Page/tab related context.
No description provided by the author
No description provided by the author
No description provided by the author
Position represents a position.
Rect represents a rectangle.
RemoteAddress contains informationa about a remote target.
Request represents a browser HTTP request.
Response represents a browser HTTP response.
Screen represents a device screen.
ScrollIntoViewOptions change the behavior of ScrollIntoView.
SecurityDetails contains informationa about the security details of a TLS connection.
SelectOption represents a select option.
No description provided by the author
No description provided by the author
Session represents a CDP session to a target.
Size represents a size.
TimeoutSettings holds information on timeout settings.
Touchscreen represents a touchscreen.
No description provided by the author
Viewport represents a page viewport.
WaitForEventOptions are the options used by the browserContext.waitForEvent API.
No description provided by the author

# Interfaces

Action is the general interface of an CDP action.
EventEmitter that all event emitters need to implement.
JSHandleAPI is the interface of an in-page JS object.
ScreenshotPersister is the type that all file persisters must implement.
Tracer defines the interface with the tracing methods used in the common package.

# Type aliases

ActionFunc is an adapter to allow regular functions to be used as an Action.
ColorScheme represents a browser color scheme.
CookieSameSite represents the cookie's 'SameSite' status.
DOMElementState represents a DOM element state.
Error is a common package error.
No description provided by the author
No description provided by the author
ImageFormat represents an image file format.
LifecycleEvent is a lifecycle event.
MediaType represents the type of media to emulate.
PollingType is the type of polling to use.
ReducedMotion represents a browser reduce-motion setting.
ScrollPosition is a parameter for scrolling an element.