Open Google Chrome locally as Headless and perform some action

Ask general questions here.
Manidipta
Posts: 6
Joined: Wed Jan 30, 2019 10:36 pm

Open Google Chrome locally as Headless and perform some action

Post by Manidipta » Sun May 26, 2019 9:08 pm

Hi,
I want to open Google chrome as headless in my local system, and do some action.
can you please guide me how can i do that? Would be helpful if you share user code for that.

like in selenium, you can use below code, i am looking something for Ranorex .

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

Thanks.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Open Google Chrome locally as Headless and perform some action

Post by odklizec » Mon May 27, 2019 9:02 am

Hi,

Headless automation is only possible via Ranorex webdriver integration. So, at first, you must create a webdriver endpoint (as described here). And then you must use endpoint configuration like this:

Code: Select all

{
  "browserName": "chrome",
  "chromeOptions": {  
    "args" : ["headless"]
  }
}
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Manidipta
Posts: 6
Joined: Wed Jan 30, 2019 10:36 pm

Re: Open Google Chrome locally as Headless and perform some action

Post by Manidipta » Tue May 28, 2019 6:44 am

got it, thank you.