Need Help with Browser Automation Library for Non-Incognito Mode

I am currently facing a challenge with automating a web application using a browser automation library. According to my company’s policy, this application cannot be automated in “incognito” mode. Could anyone assist me by suggesting which specific keyword or method I should use to ensure that the automation runs in a standard mode, non-private browser window? Your assistance would be greatly appreciated. Thank you!

Regards,
-kranti

@krantikumara I think you need to use this keyword to open a browser. See also BrowserType | Playwright.

1 Like

@krantikumara The following code opens a Chrome browser with my profile settings. I you have already a Chrome browser open you have to close it first, before running this script, otherwise you will get an error.
You can see in the screenshot that I was logged into my Google account before running this script.

*** Settings ***
Library    Browser

*** Variables ***
${USER_DATA_DIR}   C:/Users/Testuser/AppData/Local/Google/Chrome/User Data

*** Test Cases ***
Open Chrome With Existing profile
    New Persistent Context  userDataDir=${USER_DATA_DIR}  browser=chromium  channel=chrome  headless=False  url=https://google.com
    Sleep  10s

Chrome browser opens after New Persistent Context keyword with existing profile and logged in account:

3 Likes

Thank you so much @falcon030 . It is working for me.

1 Like