I wanna close the first tap and leave only the blank tap
Here's a pic showing what i mean .
Here's my code
const fsExtra = require('fs-extra')
const chromeLauncher = require('lighthouse/chrome-launcher/chrome-launcher');
const CDP = require('chrome-remote-interface');
const fs = require('fs');
const windowWidth = 6200;
const windowHeight = 6060;
headless=false
const launchConfig = {
chromeFlags: [
`--window-size=${windowWidth},${windowHeight}`,
'--disable-gpu',
headless ? '--headless' : ''
]
}
async function launchChrome(headless = true) {
return await chromeLauncher.launch(launchConfig);
}
const chrome = launchChrome();
console.log(chrome)
The problem was in the launchConfig
, there's :''
after headless
and that's what cause the behavior of opening the an extra tab.
So, the solution is removing :''