# Need Help with Browser Automation Library for Non-Incognito Mode

**URL:** <https://forum.robotframework.org/t/need-help-with-browser-automation-library-for-non-incognito-mode/8168>\
**Category:** Browser\
**Created:** [13 December 2024 20:12 UTC](https://forum.robotframework.org/t/need-help-with-browser-automation-library-for-non-incognito-mode/8168 "2024-12-13T20:12:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krantikumara](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@krantikumara](https://forum.robotframework.org/u/krantikumara)\
**Post date:** [13 December 2024 20:12 UTC](https://forum.robotframework.org/t/need-help-with-browser-automation-library-for-non-incognito-mode/8168/1 "2024-12-13T20:12:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [13 December 2024 22:00 UTC](https://forum.robotframework.org/t/need-help-with-browser-automation-library-for-non-incognito-mode/8168/2 "2024-12-13T22:00:07Z")

</div>

@krantikumara I think you need to use this [keyword](https://marketsquare.github.io/robotframework-browser/Browser.html#New%20Persistent%20Context) to open a browser. See also [BrowserType | Playwright](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context).

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [14 December 2024 00:53 UTC](https://forum.robotframework.org/t/need-help-with-browser-automation-library-for-non-incognito-mode/8168/3 "2024-12-14T00:53:57Z")

</div>

@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:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/0/08fea8b9440cceea45a96ff0b74ce78c0d857cbc.png)

---

<div class="post-metadata">

**Author:** ![krantikumara](https://avatars.discourse-cdn.com/v4/letter/k/dbc845/32.png) [@krantikumara](https://forum.robotframework.org/u/krantikumara)\
**Post date:** [16 December 2024 17:24 UTC](https://forum.robotframework.org/t/need-help-with-browser-automation-library-for-non-incognito-mode/8168/4 "2024-12-16T17:24:09Z")

</div>

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