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
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.
Most helpful comment
No need for a custom driver source, just add the following to your serenity.properties file:
(see https://johnfergusonsmart.com/configuring-chromedriver-easily-with-serenity-bdd/)