Hello so i have been trying alot but i think it's impossible i need to run chrome driver using python selenium with headless on but at some point i want to turn off headless mode (in the middle of debugging for example) so i can solve the captcha or do something .. is it possible ?
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
import chromedriver_autoinstaller
link = "https://www.google.com/recaptcha/api2/demo"
WINDOW_SIZE = "1920,1080"
try :
chromedriver_autoinstaller.install()
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--incognito")
chrome_options.add_argument("--log-level=3")
chrome_options.add_argument("--headless")
chrome_options.add_argument("--window-size=%s" % WINDOW_SIZE)
driver = webdriver.Chrome(chrome_options=chrome_options)
wait = WebDriverWait(driver, 10)
driver.maximize_window()
driver.get(link)
#i want to turn off headless here so i can solve the captcha for example
print("Cpathca Solved")
#Then turn it back on again here
except :
pass