Click or drag to resize

TargetClient Methods

Version 106.0.290

The TargetClient type exposes the following members.

Methods
  NameDescription
Public methodActivateTargetAsync
Activates (focuses) the target.
Public methodAttachToBrowserTargetAsync
Attaches to the browser target, only uses flat sessionId mode.
Public methodAttachToTargetAsync
Attaches to the target with given id.
Public methodAutoAttachRelatedAsync
Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. The specified target is also auto-attached. This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target.
Public methodCloseTargetAsync
Closes the target. If the target is a page that gets closed too.
Public methodCreateBrowserContextAsync
Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.
Public methodCreateTargetAsync
Creates a new page.
Public methodDetachFromTargetAsync
Detaches session with given id.
Public methodDisposeBrowserContextAsync
Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks.
Protected methodEnumToString(Enum) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(ContentEncoding) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(CSPViolationType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(DisabledImageType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(PermissionType) (Inherited from DevToolsDomainBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExposeDevToolsProtocolAsync
Inject object to the target's main frame that provides a communication channel with browser target. Injected object will be available as `window[bindingName]`. The object has the follwing API: - `binding.send(json)` - a method to send messages over the remote debugging protocol - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetBrowserContextsAsync
Returns all browser contexts created with `Target.createBrowserContext` method.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetTargetInfoAsync
Returns information about a target.
Public methodGetTargetsAsync
Retrieves a list of available targets.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetAutoAttachAsync
Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by `autoAttachRelated` from the list of targets to watch for creation of related targets.
Public methodSetDiscoverTargetsAsync
Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.
Public methodSetRemoteLocationsAsync
Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`.
Protected methodToBase64String (Inherited from DevToolsDomainBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also