Headless Chrome working, headless FF not yet

Ask general questions here.
krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Headless Chrome working, headless FF not yet

Post by krstcs » Mon Sep 25, 2017 9:12 pm

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?
Shortcuts usually aren't...

owyndwight
Posts: 8
Joined: Thu Jul 06, 2017 3:51 pm

Re: Headless Chrome working, headless FF not yet

Post by owyndwight » Wed Oct 11, 2017 11:27 am

Try: "--headless"

The code i use for headless firefox testing with selenium is:

FirefoxOptions options = new FirefoxOptions();
options.addArguments("--headless");
driver = new FirefoxDriver(options);

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Headless Chrome working, headless FF not yet

Post by krstcs » Wed Oct 11, 2017 1:47 pm

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. :D

I'll try it again when I get a chance.
Shortcuts usually aren't...

csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Re: Headless Chrome working, headless FF not yet

Post by csolanki » Thu Jun 28, 2018 5:02 pm

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 ?
Regards,
Charu Solanki
Ranorex User

McTurtle
Posts: 297
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Headless Chrome working, headless FF not yet

Post by McTurtle » Fri Jun 29, 2018 12:54 pm

Hello csolanki,

Your capabilities work for me in the exactly same format.
Can you post a screenshot of the endpoint confiscator?

Regards,
McTurtle

csolanki
Posts: 120
Joined: Thu Mar 22, 2018 8:51 am

Re: Headless Chrome working, headless FF not yet

Post by csolanki » Thu Jul 05, 2018 12:38 pm

Hey,

Thanks for digging into it. I have got it fixed too.

{
"browserName": "chrome",
"chromeOptions": {
"args": ["headless", "window-size=1920,1080"]
}
}

Thank you again !!
Regards,
Charu Solanki
Ranorex User