Reputation: 13
The init of my code is basically to setup Chrome, get the url and login with the credentials given in the tKinter GUI. When I almost finished the code I'v added chrome_options.add_argument('--headless')
to make the GUI work without open the brownser, because others co-workers will make use of it and not just me.
The problem is that sometimes the login part asks for a Captcha resolve, so I think that the best way to handle with It is to open just the captcha to the user resolve, close it and continue to run the code, Is that right?
I'v been searching about It and was not able to understand what I should do.
Upvotes: 0
Views: 490
Reputation: 3430
This is not a direct answer and too long for a comment.
You can achieve it by opening the browser just for the captcha for user to complete but as we know once the options are selected and assigned to the driver, they cannot be manipulated later which means changing an ongoing web browser from headless to normal is not possible.
So here is what you can do,
--headless
argument using those cookies you saved.--headless
argument and use those cookies.There might be some better approach of doing this but this will work very well if implemented correctly.
Upvotes: 1