sadati boina
sadati boina

Reputation: 635

Serenity test error element not available in headless mode

The scenario is:

I have serenity tests that i launch with chromedriver that work When i launch the tests without headless option the tests are "passed" while with the headless mode the tests are failed with error: net.serenitybdd.core.exceptions.SerenityManagedException: The following error occurred: Timed out after 5 seconds. Element not available

here the line command that launch the test : mvn clean verify -Dwebdriver.driver=chrome

And the serenity.properties:

Upvotes: 0

Views: 3805

Answers (1)

sadati boina
sadati boina

Reputation: 635

The solution is to add in chrome.switches --window-size=1920,1080;

  • chrome.switches=--window-size=1920,1080;--headless;

Upvotes: 2

Related Questions