I have spent a while for the solution but couldn't find anything for my specific problem. I am automating a task with Selenium and need to log in a system. If I do it manually, the system will keep the user logged if a new browser tab or window is opened, but with Selenium, this doesn't happen if it is the second run of the program. It will open a new tab and won't even navigate to the url on the code. Is there any way to make the browser reuse the user session from the previous Selenium run? I'm using Java for the automation.
Apologies, but I wasn't very clear. I looked for a way to use the opened browser before asking this question, as the question marked as a duplicate of mine asks, but as it doesn't seem feasible I asked about another approach. The thing is an opened browser is called session, but I mean a session when a user is logged in a system and opens a new browser tab or window and can navigate to the same system without logging in again. As I mentioned, on the second run of a Selenium Java program it won't navigate to the same system url nor use the same user session.