Documentation ¶
Overview ¶
Package browser is the browser module's entry point, and initializer of various global types, and a translation layer between sobek and the internal business logic.
It initializes and drives the downstream components by passing the necessary concrete dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSModule ¶
type JSModule struct { Browser *sobek.Object Devices map[string]common.Device NetworkProfiles map[string]common.NetworkProfile `js:"networkProfiles"` }
JSModule exposes the properties available to the JS script.
type ModuleInstance ¶
type ModuleInstance struct {
// contains filtered or unexported fields
}
ModuleInstance represents an instance of the JS module.
func (*ModuleInstance) Exports ¶
func (mi *ModuleInstance) Exports() k6modules.Exports
Exports returns the exports of the JS module so that it can be used in test scripts.
type RootModule ¶
type RootModule struct { PidRegistry *pidRegistry // contains filtered or unexported fields }
RootModule is the global module instance that will create module instances for each VU.
func NewSync ¶ added in v1.6.0
func NewSync() *RootModule
NewSync returns a pointer to a new RootModule instance that maps the browser's business logic to the synchronous version of the module's JS API.
func (*RootModule) NewModuleInstance ¶
func (m *RootModule) NewModuleInstance(vu k6modules.VU) k6modules.Instance
NewModuleInstance implements the k6modules.Module interface to return a new instance for each VU.
Source Files ¶
- browser_context_mapping.go
- browser_mapping.go
- console_message_mapping.go
- element_handle_mapping.go
- file_persister.go
- frame_mapping.go
- helpers.go
- js_handle_mapping.go
- keyboard_mapping.go
- locator_mapping.go
- mapping.go
- metric_event_mapping.go
- module.go
- modulevu.go
- mouse_mapping.go
- page_mapping.go
- registry.go
- request_mapping.go
- response_mapping.go
- sync_browser_context_mapping.go
- sync_browser_mapping.go
- sync_console_message_mapping.go
- sync_element_handle_mapping.go
- sync_frame_mapping.go
- sync_js_handle_mapping.go
- sync_keyboard_mapping.go
- sync_locator_mapping.go
- sync_mapping.go
- sync_page_mapping.go
- sync_request_mapping.go
- sync_response_mapping.go
- sync_touchscreen_mapping.go
- sync_worker_mapping.go
- touchscreen_mapping.go
- worker_mapping.go