getBrowserContexts method

Future<List<BrowserContextID>> getBrowserContexts()

Returns all browser contexts created with Target.createBrowserContext method. Returns: An array of browser context ids.

Implementation

Future<List<browser.BrowserContextID>> getBrowserContexts() async {
  var result = await _client.send('Target.getBrowserContexts');
  return (result['browserContextIds'] as List)
      .map((e) => browser.BrowserContextID.fromJson(e as String))
      .toList();
}