TargetClient Methods |
The TargetClient type exposes the following members.
Name | Description | |
---|---|---|
ActivateTargetAsync |
Activates (focuses) the target.
| |
AttachToBrowserTargetAsync |
Attaches to the browser target, only uses flat sessionId mode.
| |
AttachToTargetAsync |
Attaches to the target with given id.
| |
CloseTargetAsync |
Closes the target. If the target is a page that gets closed too.
| |
CreateBrowserContextAsync |
Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than
one.
| |
CreateTargetAsync |
Creates a new page.
| |
DetachFromTargetAsync |
Detaches session with given id.
| |
DisposeBrowserContextAsync |
Deletes a BrowserContext. All the belonging pages will be closed without calling their
beforeunload hooks.
| |
EnumToString(Enum) | (Inherited from DevToolsDomainBase.) | |
EnumToString(PermissionType) | (Inherited from DevToolsDomainBase.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExposeDevToolsProtocolAsync |
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.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBrowserContextsAsync |
Returns all browser contexts created with `Target.createBrowserContext` method.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetTargetInfoAsync |
Returns information about a target.
| |
GetTargetsAsync |
Retrieves a list of available targets.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetAutoAttachAsync |
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.
| |
SetDiscoverTargetsAsync |
Controls whether to discover available targets and notify via
`targetCreated/targetInfoChanged/targetDestroyed` events.
| |
SetRemoteLocationsAsync |
Enables target discovery for the specified locations, when `setDiscoverTargets` was set to
`true`.
| |
ToBase64String | (Inherited from DevToolsDomainBase.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |