abstractBrowserController <Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>
Hierarchy
- TypedEmitter<BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>>
- BrowserController
Index
Constructors
Properties
Methods
Constructors
constructor
Type parameters
- Library: CommonLibrary = CommonLibrary
- LibraryOptions: undefined | Dictionary = Parameters<Library[launch]>[0]
- LaunchResult: CommonBrowser = UnwrapPromise<ReturnType<Library[launch]>>
- NewPageOptions = Parameters<LaunchResult[newPage]>[0]
- NewPageResult = UnwrapPromise<ReturnType<LaunchResult[newPage]>>
Parameters
browserPlugin: BrowserPlugin<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>
Returns BrowserController<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>
Properties
activePages
browser
Browser representation of the underlying automation library.
browserPlugin
The BrowserPlugin
instance used to launch the browser.
id
isActive
lastPageOpenedAt
launchContext
The configuration the browser was launched with.
optionalproxyTier
The proxy tier tied to this browser controller.
undefined
if no tiered proxy is used.
optionalproxyUrl
The proxy URL used by the browser controller. This is set every time the browser controller uses proxy (even the tiered one).
undefined
if no proxy is used
totalPages
staticexternaldefaultMaxListeners
Methods
externaladdListener
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U]
Returns this
close
Gracefully closes the browser and makes sure there will be no lingering browser processes.
Emits 'browserClosed' event.
Returns Promise<void>
externalemit
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externalrest...args: Parameters<BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U]>
Returns boolean
externaleventNames
Type parameters
- U: BROWSER_CLOSED
Returns U[]
getCookies
Parameters
page: NewPageResult
Returns Promise<Cookie[]>
externalgetMaxListeners
Returns number
kill
Immediately kills the browser process.
Emits 'browserClosed' event.
Returns Promise<void>
externallistenerCount
Parameters
externaltype: BROWSER_CLOSED
Returns number
externallisteners
Type parameters
- U: BROWSER_CLOSED
Parameters
externaltype: U
Returns BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U][]
externaloff
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U]
Returns this
externalon
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U]
Returns this
externalonce
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U]
Returns this
externalprependListener
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U]
Returns this
externalprependOnceListener
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U]
Returns this
externalrawListeners
Type parameters
- U: BROWSER_CLOSED
Parameters
externaltype: U
Returns BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U][]
externalremoveAllListeners
Parameters
externaloptionalevent: BROWSER_CLOSED
Returns this
externalremoveListener
Type parameters
- U: BROWSER_CLOSED
Parameters
externalevent: U
externallistener: BrowserControllerEvents<Library, LibraryOptions, LaunchResult, NewPageOptions, NewPageResult>[U]
Returns this
setCookies
Parameters
page: NewPageResult
cookies: Cookie[]
Returns Promise<void>
externalsetMaxListeners
Parameters
externaln: number
Returns this
The
BrowserController
serves two purposes. First, it is the base class that specialized controllers likePuppeteerController
orPlaywrightController
extend. Second, it defines the public interface of the specialized classes which provide only private methods. Therefore, we do not keep documentation for the specialized classes, because it's the same for all of them.