Hi @Dave_Evers , I think I got it all figured out. This seems to be exactly what I was looking for.
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()
Dimension regularChromeWindowSize = new Dimension(970, 1100) // Adjust width and height as needed
Point regularChromeWindowPosition = new Point(0, 0) // Adjust x and y coordinates as needed
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")
Dimension incognitoWindowSize = new Dimension(970, 1100) // Adjust width and height as needed
Point incognitoWindowPosition = new Point(955, 0) // Adjust x and y coordinates as needed
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)
// Switch back to the regular Chrome window
DriverFactory.changeWebDriver(regularChromeDriver)
// Perform actions in the regular Chrome window and observe data update
// Close the windows
regularChromeDriver.quit()
incognitoDriver.quit()
Please share this out if there are those needing some help with this. This works like a charm. ![]()