Serenity-core: Chrome headless browser testing - jbehave serenity

Created on 24 Oct 2017  路  3Comments  路  Source: serenity-bdd/serenity-core

Hi

I am trying to run chrome headless testing by using selenium java. Here I am passing the details in serenity. Properties . It is not working

Can you please provide solution

question

Most helpful comment

No need for a custom driver source, just add the following to your serenity.properties file:

chrome.switches=--headless
serenity.browser.width=1400
serenity.browser.height=800

(see https://johnfergusonsmart.com/configuring-chromedriver-easily-with-serenity-bdd/)

All 3 comments

I have created class as below
Public class googlechromeDriver implements driversource{
@override
Public Webdriver newDriver(){
return(Webdriver) getRemoteEebdriver();
}
Private Webdriver getRemoteWebdriver(){
ChromeOptions opt= new ChromeOptions();
opt.addArguments("--headless");
opt.addArguments(window-size=1400,800);
Webdriver dr= new ChromeDriver(opt);
return dr;

I am passing driver as chrome from serenity.properties and then overriding with above class . It's not working

No need for a custom driver source, just add the following to your serenity.properties file:

chrome.switches=--headless
serenity.browser.width=1400
serenity.browser.height=800

(see https://johnfergusonsmart.com/configuring-chromedriver-easily-with-serenity-bdd/)

Presuming answered.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dineshbalajibingo picture dineshbalajibingo  路  5Comments

scormaq picture scormaq  路  3Comments

rjrussell77 picture rjrussell77  路  4Comments

dan0935 picture dan0935  路  5Comments

knludi picture knludi  路  4Comments