serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
719 stars 516 forks source link

Unable to configure remote file download in serenity.conf #3196

Open scormaq opened 1 year ago

scormaq commented 1 year ago

With Selenium 4.9.0+ is it possible to retrieve files downloaded on remote node : https://www.selenium.dev/documentation/grid/configuration/cli_options/#enabling-managed-downloads-by-the-node

With this feature it's easy now to test file downloads in docker. To enable this feature, I have to do some setup, for example, to pass next capability:

options.setCapability("se:downloadsEnabled", true);

How to achieve this through configuring serenity.conf ? I tried to play around example, provided at https://serenity-bdd.github.io/blog/2023/02/02/index , but nothing works for me (either my option is ignored or driver fails to start with error like Illegal key values seen in w3c capabilities: ["se:downloadsEnabled"]).

_Now the only way to have downloads enabled is to ignore serenity.conf and use programmatic way to configure driver._

Paulo1661 commented 1 year ago

Hi, i notice the same thing, i tried with this property serenity.driver.capabilities=se:downloadsEnabled:true in but doesn't work either Currently as you said the only way is to set it programmaticaly public class RemoteDownloadOptionEnhancer implements BeforeAWebdriverScenario { @Override public MutableCapabilities apply(EnvironmentVariables environmentVariables, SupportedWebDriver driver, TestOutcome testOutcome, MutableCapabilities capabilities) { capabilities.setCapability("se:downloadsEnabled", true); return capabilities; } }

In the serenity.conf serenity{ extension.packages = remote_download_option_enhancer_package }