How to use the chrome-remote-interface.listTabs function in chrome-remote-interface

To help you get started, we’ve selected a few chrome-remote-interface examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevExpress / testcafe / src / browser / provider / built-in / dedicated / chrome / cdp.ts View on Github external
async function getActiveTab (cdpPort: number, browserId: string): Promise {
    const tabs = await remoteChrome.listTabs({ port: cdpPort });

    return tabs.filter(t => t.type === 'page' && t.url.includes(browserId))[0];
}