Chrome headless not redirecting
I have told chrome headless to visit a page which issues a redirect, but the redirect is never happening. It just sits on the page... Is there some special command that I need to tell it to follow the redirect chain down?
I too am experiencing this issue.
me too
I am also experiencing a similar glitch when trying to run chrome headless using the splinter browser variable.
For example, here is the code I use before a scenario is run to initialize the browser:
def before_scenario(context, scenario): serv_args = [ "--ignore-ssl-errors=yes"] #chrome or phantomjs, set in environment variables logging.info("RUNNING: " + scenario.name) print("Browser Test starting.\n") if os.environ['browser'] == 'firefox': context.browser = Browser(os.environ['browser']) elif os.environ['browser'] == 'chrome': context.browser = Browser(os.environ['browser'], service_args=serv_args) else: context.browser = Browser(os.environ['browser'], service_args=serv_args)
When I do not include the headless=True tag the page redirects fine
As soon as I include the headless=True argument in my browser setup Chrome is unable to redirect and it the screenshot is just a plain white screen.
def before_scenario(context, scenario): serv_args = [ "--ignore-ssl-errors=yes"] #chrome or phantomjs, set in environment variables logging.info("RUNNING: " + scenario.name) print("Browser Test starting.\n") if os.environ['browser'] == 'firefox': context.browser = Browser(os.environ['browser']) elif os.environ['browser'] == 'chrome': context.browser = Browser(os.environ['browser'], headless=True,service_args=serv_args) else: context.browser = Browser(os.environ['browser'], service_args=serv_args)
same for selenium and chrome webdriver
I have the same issue too
defect on chrome driver, i believe root the same https://bugs.chromium.org/p/chromedriver/issues/detail?id=2440#c2
so, have anyone solved this problem? Same bug confused me ...
I used xvfb instead of chrome --headless as a workaround.
I used a workaround to change the user-agent: chromeOptions.addArguments("--user-agent=Chrome/77"); This solved my issue, for now!
I used a workaround to change the user-agent: chromeOptions.addArguments("--user-agent=Chrome/77"); This solved my issue, for now!
It works, huge thanks!
Closing, since this is a chromedriver issue and not a splinter issue.