← Back to Target domain

Target.getTargets

Retrieves a list of available targets.

Domain: Target stable

Parameters

NameTypeDescription
filter (optional)TargetFilterOnly targets matching filter will be reported. If filter is not specified and target discovery is currently enabled, a filter used for target discovery is used for consistency.

Returns

NameTypeDescription
targetInfosarrayThe list of targets.

Example Request

{
  "id": 1,
  "method": "Target.getTargets"
}

Example Response

{
  "id": 1,
  "result": {
    "targetInfos": []
  }
}

Usage in Node.js

const result = await send('Target.getTargets');
console.log(result);
// {"targetInfos": []}