Page 1 of 1
Headless Chrome working, headless FF not yet
Posted: Mon Sep 25, 2017 9:12 pm
by krstcs
So, I now have headless Chrome working with a custom WebDriver config as a Ranorex endpoint.
Code: Select all
{
"browserName": "chrome",
"chromeOptions": {
"args" : ["headless"]
}
}
Add the above config to your WD endpoint and when it is active Chrome will start in headless mode, as long as you have Chrome 59 (on *nix) or 60+ (on Windows).
However, the same config does not work with Firefox, even though FF does have a headless command-line option. Does anyone know the config for running FF headless through the WD endpoints in Ranorex?
Re: Headless Chrome working, headless FF not yet
Posted: Wed Oct 11, 2017 11:27 am
by owyndwight
Try: "--headless"
The code i use for headless firefox testing with selenium is:
FirefoxOptions options = new FirefoxOptions();
options.addArguments("--headless");
driver = new FirefoxDriver(options);
Re: Headless Chrome working, headless FF not yet
Posted: Wed Oct 11, 2017 1:47 pm
by krstcs
Yeah, I found that about 2 days after I posted. However, FF 60 is required for this, which I also didn't have. I forgot to update the post.
I'll try it again when I get a chance.
Re: Headless Chrome working, headless FF not yet
Posted: Thu Jun 28, 2018 5:02 pm
by csolanki
Hey,
I am trying the same
{
"browserName": "chrome",
"chromeOptions": {
"args" : ["headless"]
}
}
Error is : Please enter a valid JSON capabilities.
Versions I am using :
Chrome : 67
Mac : 10.13.5
Ranorex 8.1.2
is there any specific reason ?
Re: Headless Chrome working, headless FF not yet
Posted: Fri Jun 29, 2018 12:54 pm
by McTurtle
Hello csolanki,
Your capabilities work for me in the exactly same format.
Can you post a screenshot of the endpoint confiscator?
Regards,
McTurtle
Re: Headless Chrome working, headless FF not yet
Posted: Thu Jul 05, 2018 12:38 pm
by csolanki
Hey,
Thanks for digging into it. I have got it fixed too.
{
"browserName": "chrome",
"chromeOptions": {
"args": ["headless", "window-size=1920,1080"]
}
}
Thank you again !!