RobotFrameWork with Browser library starts in incognito modus, but the normal modus is needed

Viewed 354

When a .robot file runs it can be started with =chromium =firefox =webkit

however it always starts in Incognito modus.

Our thought was, okay let's start is chromium and an argument which looks like this

New Browser     chromium   headless=false   arg=["--profile-directory=Persoon 1"]

But that didn't work because everytime it starts a new session so there is no Persoon 1 so to speak.

So the essence is: how can it be run in non-incognito modus? (and how come it starts with incognito modus, is that standard behaviour or some config issue?)

resources: https://robotframework-browser.org/

https://peter.sh/experiments/chromium-command-line/switches/

2 Answers

The basic policy of robotframework-browser is to perform in incognito mode.

Their goal is not to leave any browser data through incognito mode.

Therefore, to support parts such as extension installation, incognito mode cannot be used. Because of that, they try to solve the problem in the following link.

https://github.com/MarketSquare/robotframework-browser/issues/963#issuecomment-913214068

However, this part has not been corrected yet. Looks like we'll have to wait for a new version to come out.

After long research the answer is:

You can't! (It's just not possible)

Browser library incognito modus is deeply baked in somewhere deep in the code. They are working on an option to give an argument with the url so it will become possible to use the LaunchPersistent of Playwright.

Until that time this is the solution:

install SeleniumLibrary as well. For some scripts use SeleniumLibrary. Next you use the EDGE browser with 'msedgedriver.exe' Done! you solved the problem.

Related