As part of my test base class, I have something like this:
seleniumJupiter.getConfig().setDefaultBrowser(BROWSER.getStringValue());
seleniumJupiter.getConfig().setScreenshotAtTheEndOfTests("whenfailure");
SeleniumJupiter.getConfig().takeScreenshotAsBase64AndPng();
and potentially 10-20 more config parameters. Could I somehow overwrite the whole selenium-jupiter.properties file and change some of the properties and other left default?
You can maintain your own copy of
selenium-jupiter.propertiesin your project classpath, changing the values you need, and leaving the default values for the others. Then, you have two options to configure Selenium-Jupiter to use that properties:Using a JVM property:
-Dsel.jup.properties=/my-sel-jup.propertiesUsing an environmental variable:
SEL_JUP_PROPERTIES=/my-sel-jup.properties