Browser Session
A browser session. This is the root session created when initially connecting to the browser's debugger.
Such root session doesn't have the most useful APIs because it represents the connection to the browser target.
To interact with more interesting targets, such as pages and workers, you need to first attach to that target, which creates a child session of this session, which offers more APIs:
To create a new page/tab, use BrowserSession.newPage and then interact with it through the returned PageSession, which is a child session of the browser session and has many more APIs.
If you want to attach to an already existing target, use the BrowserSession.target domain to get information about the target, and then use BrowserSession.attachToTarget. Note that you will only get a plain ChildSession after this. Use one of the converters to convert this session to the proper type depending on the target type you want to interact with. For example, if you're attaching to a worker, use ChildSession.asWorkerSession to get a WorkerSession, which offers the relevant domains for you.
Properties
The Browser domain defines methods and events for browser managing.
A domain for letting clients substitute browser's network layer with client code.
(undocumented in the protocol definition)
Security
(undocumented in the protocol definition)
The SystemInfo domain defines methods and events for querying low-level system information.
Supports additional targets discovery and allows to attach to them.
The Tethering domain defines methods and events for browser port binding.
(undocumented in the protocol definition)
Functions
Creates a new ChildSession attached to the target with the given targetId. The new session shares the same underlying web socket connection as this BrowserSession.
Closes the underlying web socket connection, effectively closing every session based on the same web socket connection.
Creates a new page and attaches to it, then returns the new child PageSession. The underlying web socket connection of this BrowserSession is reused for the new child PageSession.
Gives access to all domains of the protocol, regardless of the type of this session.
Performs the given operation in this session and closes the web socket connection.