--Headless mode is not working in chrome version 77 - selenium-chromedriver

Previously I am working on chrome 76 version then my headless option in selenium testing is running fine when the chrome is updated with version 77, this is not working I use this for writing basic automation tests in selenium even if I mention chrome options to --headless that doesn't work for me. It directly opens the browser but if we use --headless the browser need not to open but in my case, it was opening. Please suggest me a way to get this issue resolved

Yes, right now the chrome is updated again and for the latest update to 78 version, this --headless mode is working fine. Now if I use 77 chrome driver its working for me.

Related

Headless mode in chrome 97 is not working with windows auth

I use windows auth on build agent on teamcity
chromeOptions.AddArgument("--auth-server-whitelist=*");
chromeOptions.AddArgument("--auth-negotiate-delegate-whitelist=*");
And run autotests in headless mode.
chromeOptions.AddArgument("headless");
chromeOptions.AddArgument("window-size=1920x1200");
chromeOptions.AddArgument("--no-sandbox");
Everything has been working fine until Chrome was auto-updated to 97 version. After that my windows auth just stopped working(but it still works for runs without headless mode). I installed old Chrome version on my agents and it works again. But I want to continue both - get updates to Chrome and run my autotests in headless mode.
I tried to add some extra arguments but they didn't work.
options.addArguments("--window-size=1920,1080");
options.addArguments("--disable-gpu");
options.addArguments("--disable-extensions");
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("--proxy-server='direct://'");
options.addArguments("--proxy-bypass-list=*");
options.addArguments("--start-maximized");
options.addArguments("--headless");
Any idea how to fix this issue?
The Chrome command line arguments changed from whitelist to allowlist:
https://www.ibm.com/support/pages/change-kerberos-windows-authentication-registry-settings-chrome-and-edge-sso
Making that change seems to work for me.

Chrome Headless Doesn't work

I've read about the Chrome Headless from developers.google said we can run the Google without UI. Quote from that link :
Headless Chrome is shipping in Chrome 59. It's a way to run the Chrome
browser in a headless environment. Essentially, running Chrome without
chrome! It brings all modern web platform features provided by
Chromium and the Blink rendering engine to the command line.
Why is that useful?
A headless browser is a great tool for automated testing and server
environments where you don't need a visible UI shell. For example, you
may want to run some tests against a real web page, create a PDF of
it, or just inspect how the browser renders an URL.
This is really great feature, so I do some experiment with this cool feature. The idea is to taking snapshot as the document site by do call of chrome.exe from Windows Command Prompt, as follow :
chrome --headless --disable-gpu --screenshot https://www.chromestatus.com/
After do several times and following the instruction from these site. I got nothing. I don't get any picture or screenshot with name screenshot.png as document mention it before Running with --screenshot will produce a file named screenshot.png in the current working directory.
From this document also said about version,
Caution: Headless mode is available on Mac and Linux in Chrome 59.
Windows support is coming in Chrome 60. To check what version of
Chrome you have, open chrome://version.
after do some check with suggested before, I run chrome://version on my Chrome on Windows x64 Machine and got some result :
Google Chrome 62.0.3202.94 (Official Build) (64-bit) (cohort: Stable)
Revision 4fd852a98d66564c88736c017b0a0b0478e885ad-refs/branch-heads/3202#{#789}
What wrong? What i missed?
Thanks
After do some experiments. for --screenshot will save the image on the same level as chrome.exe location and that will be mean save on Program Files.
So we need need to combine parameter names and arguments with a =
--screenshot="D:\screen.png" will work, otherwise Chrome writes to it's installation folder. Big design flaw, no software should use it's installation folder as a working directory.
Here are the complete argument :
chrome --headless --enable-logging --disable-gpu --screenshot="D:\screen.png" "https://www.chromestatus.com/"

Headless Chrome in REPL mode doesn't work - spams console with an error

When I try to run Chrome in Headless, REPL mode with:
chrome --headless --disable-gpu --enable-logging --repl
I'm getting an endless spam of
{"result":{"type":"undefined"}}
It's pretty much the same problem as described here:
Headless Chrome REPL not working
But since I'm trying to run it on Windows 7, I'm not sure if that solution applies to me
Edit:
I forgot to add, I'm using a 62.0.3202.94 Chrome version

How to choose a browser version in web component tester?

Does wct config allow for choosing a specific version of Chrome, like Chrome 34?
It seems to install chrome at the beginning every time I run wtc.
Following Polymer Documentation, it's possible to run tests choosing a browser installed on your computer. If you have Chrome 34 version and you execute test -l chrome, tests will run with this version. If you don't have Chrome 34, it's no possible.
All supported browsers to run tests are aurora, canary, chrome, firefox and ie.
Web Component Tester automatically finds all of the browsers installed
on your system and runs your tests against each one. If you wanted to
run your tests against a single browser, say Google Chrome, you could
polymer test -l chrome.

Chrome Browser 32.0.1700.76 is not working with Selenium Webdriver 2.4, what can I do?

I am trying to run tests in Chrome browser 32.0.1700.76 (latest) using Selenium 2 Webdriver with chromedriver version 2.4
Chrome starts but the string "data;" is displayed in the url bar.
Those test worked fine with a previous Chrome version (28.xxxxx) but I can't downgrade Chrome.
Can anyone suggest me how can I solve the problem?
You need to either upgrade the ChromeDriver you are using or find a way to downgrade Chrome.
The basic principle of the issue is that the ChromeDriver v2.4's support of the most recent versions of Chrome is non-existent.
You get similar issues with Firefox, an upgrade will sometimes break the tests.