--same-tab
What does --same-tab do?
Indicates that the URL in the command line should open in the active tab instead of a new tab. In case of multiple URLS given as arguments, the first one will replace the active tab.
Usage
CLILaunch Chrome with --same-tab using CLI
chrome --same-tabPuppeteerLaunch Chrome with --same-tab using Puppeteer
const browser = await puppeteer.launch({
args: ['--same-tab']
});PlaywrightLaunch Chrome with --same-tab using Playwright
const browser = await chromium.launch({
args: ['--same-tab']
});SeleniumLaunch Chrome with --same-tab using Selenium
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--same-tab')
driver = webdriver.Chrome(options=options)