Abstract
Abstract
connectedWhether Puppeteer is connected to this browser.
Abstract
debugExperimental
Get debug information from Puppeteer.
Abstract
browserGets a list of open BrowserContext | browser contexts.
In a newly-created browser, this will return a single instance of BrowserContext.
Abstract
closeAbstract
createAbstract
defaultAbstract
disconnectDisconnects Puppeteer from this browser, but leaves the process running.
Emit an event and call any associated listeners.
true
if there are any listeners, false
if there are not.
Whether Puppeteer is connected to this browser.
Use Browser.connected.
Abstract
newCreates a new page in the default browser context.
Remove an event listener from firing.
this
to enable you to chain method calls.
Bind an event listener to fire when an event occurs.
this
to enable you to chain method calls.
Like on
but the listener will only be fired once and then it will be removed.
this
to enable you to chain method calls.
Gets a list of all open pages inside this Browser.
If there ar multiple BrowserContext | browser contexts, this returns all pages in all BrowserContext | browser contexts.
Non-visible pages, such as "background_page"
,
will not be listed here. You can find them using Target.page.
Abstract
processGets the associated ChildProcess.
null
if this instance was connected to via
Puppeteer.connect.
Abstract
targetGets the Target | target associated with the default browser context).
Abstract
targetsAbstract
userGets this browser's original user agent.
Pages can override the user agent with Page.setUserAgent.
Abstract
versionGets a string representing this browser's name and version.
For headless browser, this is similar to "HeadlessChrome/61.0.3153.0"
. For
non-headless or new-headless, this is similar to "Chrome/61.0.3153.0"
. For
Firefox, it is similar to "Firefox/116.0a1"
.
The format of Browser.version might change with future releases of browsers.
Waits until a Target | target matching the given predicate
appears and returns it.
This will look all open BrowserContext | browser contexts.
Optional
options: WaitForTargetOptionsAbstract
wsGets the WebSocket URL to connect to this browser.
This is usually used with Puppeteer.connect.
You can find the debugger URL (webSocketDebuggerUrl
) from
http://HOST:PORT/json/version
.
See browser endpoint for more information.
Browser represents a browser instance that is either:
Browser EventEmitter.emit | emits various events which are documented in the BrowserEvent enum.
Example: Using a {@link Browser} to create a {@link Page}:
Example: Disconnecting from and reconnecting to a {@link Browser}: