Reputation:
I want to automate an application for an upload process with selenium.Therefore I am using geckodriver. Right now I am doing the login site headless but I want to do the login by the user and then change to headless. Is there a way to do that or at least a work around?
Upvotes: 0
Views: 405
Reputation: 60654
There is no way to do that using the same browser instance... The headless flag is a setting passed to the browser on startup and there is no way to dynamically change that.
If the site uses cookie-based authentication, here is an alternate approach:
... at that point, you can navigate to an authenticated page. You should be "logged in" since you are re-using the cookies from the original browser session.
Upvotes: 2