Preventing Chromium window from coming to foreground when connecting through CDP

74 views Asked by At

I am connecting to a local Chromium process through CDP.

const browser = await playwright.chromium.connectOverCDP(cdpUrl);
const defaultContext = browser.contexts()[0];
const page = await defaultContext.newPage();

The page creation brings the Chromium window to the foreground. Is it possible to prevent this ?

I have tried looking up for documentation related to this but wasn't able to find any useful information.

0

There are 0 answers