# How to open multiple Chrome browser tabs using Incognito

**URL:** <https://forum.katalon.com/t/how-to-open-multiple-chrome-browser-tabs-using-incognito/127534>\
**Category:** Tips and Tricks\
**Tags:** incognito\
**Created:** [April 10, 2024, 3:18pm UTC](https://forum.katalon.com/t/how-to-open-multiple-chrome-browser-tabs-using-incognito/127534 "2024-04-10T15:18:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Evers](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dave_evers/32/435_2.png) [@Dave\_Evers](https://forum.katalon.com/u/Dave_Evers)\
**Post date:** [April 10, 2024, 3:18pm UTC](https://forum.katalon.com/t/how-to-open-multiple-chrome-browser-tabs-using-incognito/127534/1 "2024-04-10T15:18:44Z")

</div>

Copy the following into any new test case and execute.

```auto
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.Dimension
import org.openqa.selenium.Point
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

//Open the first window (regular Chrome)
WebUI.openBrowser('https://www.google.com')
WebDriver regularChromeDriver = DriverFactory.getWebDriver()
// Adjust width and height as needed
Dimension regularChromeWindowSize = new Dimension(970, 1100)

// Adjust x and y coordinates as needed
Point regularChromeWindowPosition = new Point(0, 0)
regularChromeDriver.manage().window().setSize(regularChromeWindowSize)
regularChromeDriver.manage().window().setPosition(regularChromeWindowPosition)
//Store the original window handle
String originalWindowHandle = regularChromeDriver.getWindowHandle()

//Open the second window (Incognito mode)
ChromeOptions options = new ChromeOptions()
options.addArguments('--incognito')
WebDriver incognitoDriver = new ChromeDriver(options)
incognitoDriver.get('https://www.google.com')
// Adjust width and height as needed
Dimension incognitoWindowSize = new Dimension(970, 1100)
// Adjust x and y coordinates as needed
Point incognitoWindowPosition = new Point(955, 0)
incognitoDriver.manage().window().setSize(incognitoWindowSize)
incognitoDriver.manage().window().setPosition(incognitoWindowPosition)

//Switch to the Incognito window
DriverFactory.changeWebDriver(incognitoDriver)
//Perform actions in the Incognito window (e.g., enter data)
WebUI.delay(5)

//Switch back to the regular Chrome window
DriverFactory.changeWebDriver(regularChromeDriver)
//Perform actions in the regular Chrome window and observe data update
WebUI.delay(5)

//Close the windows
regularChromeDriver.quit()
incognitoDriver.quit()

```

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [April 11, 2024, 2:19am UTC](https://forum.katalon.com/t/how-to-open-multiple-chrome-browser-tabs-using-incognito/127534/2 "2024-04-11T02:19:45Z")

</div>

Hi @Dave_Evers ,

Thank you so much for sharing this tip. We appreciate your contribution
