Released Selenide 3.9.2

Blog

Released Selenide 3.9.2

Download files as you wish

Good evening!

We released Selenide 3.9.2!



You can download files differently

As you know, we changed a way of downloading files in Selenide 3.9. We got quite different feedback: some folks reported that new way works for cases where old way didn’t work, while others reported that the new way doesn’t work for cases where the old way worked.

That’s why we decided to provide users a choice.

Now you can choose how to download files.

“New” way - PROXY

This way is enabled by default.

It downloads files using selenide’s own embedded proxy server.

Pros:

  • This is better because it’s more universal: it not only works with <a href elements, but with any other elements too. Actually it doesn’t depend on web elements at all. It just intercepts all server responses containing files.

Cons:

  • If you run your own WebDriver instance (and add it to Selenide using method setWebDriver()), it knows nothing about selenide proxy server, which cannot intercept server responses. We will think how to improve this situation.

“Old” way - HTTPGET

If you need to use the “old” way, just add system property -Dselenide.fileDownload=HTTPGET. Or directly in the code:

Configuration.fileDownload = HTTPGET;

Pros:

  • It works independently from selenide proxy server.

Cons:

  • It works only with <a href elements, and can execute only GET requests.
  • It may not work if the machine that runs your tests doesn’t have access to a server from which files are downloaded.

Now you don’t have excuse not to upgrade to Selenide 3.9.2

Statistics update

Selenide download statistics for August 2016:



Andrei Solntsev

selenide.org

blog comments powered by Disqus

The project is maintained by