Is it possible to have two browsers with different sessions in one test case?

I need to profiles signed-in in one website where they can communicate each other in one test case. Is it possible to do it?
I could managed it with open a new incognito window but it uses robotframework which doesnt work on headless executing.

You can use the “open browser” 2 times in your code.

it doesnt work. It closes the browser than open a new one.

Magyar Zoltán said:

it doesnt work. It closes the browser than open a new one.

Your code should look like this,

Open browser

Navigate to URL

Check that the “close browser” part is not present.

Open browser

Navigate to URL

there’s no close browser part.
In the log it says: “A browser is already opened. Closing browser and opening a new one”