On August 29, 1997 a computer system Skynet became self-aware and launched nuclear missiles at Russia. So the war between humans and terminators began.
It happened .. oh, my god! - 21 years ago. And since we are still alive, we decided to release Selenide 4.14.0 at this historical day.
There is not so much changes, and they are mostly about Selenide proxy server.
We implemented BasicAuth through proxy
Test servers are often password-protected (so called BasicAuth). (I really don’t understand why it’s needed: they are in intranet anyway! But nothing to do, people do it.)
Until today, Selenide could only bypass BasicAuth by adding
username:password@ to URL.
But folks say that it doesn’t always work in some browsers.
Now we implemented BasicAuth through selenide proxy server instead of URL.
Roughly speaking, Selenide adds a http header
Authorization: Basic foobar to every request from browser to application.
This way definitely works in all browsers. So go enable proxy in your tests (see next chapter).
We added a dedicated setting to enable/disable proxy server
As you know, Selenide can run its own built-in proxy server which tracks requests between browser and application under test.
Initially, it was used only for downloading files. That’s why Selenide didn’t have any special settings for proxy -
it was be enabled just by setting
Configuration.fileDownload == PROXY.
Now proxy server is used for more different features (see previous chapter), and more is coming.
That’s why we added a dedicated setting to enable/disable proxy server:
Configuration.proxyEnabled = true | false(default value: false)
Let me explain why
false is by default.
I personally recommend to enable proxy server. It’s a good guy. It allows us features that are not possible with plain selenium.
Proxy will not work only in one case. When tests and browser are run on different machines, and the “tests machine” is
not visible from the “browser machine”. I hope it’s not the case for most of you. I don’t really understand why people
need to create barriers between test servers in intranet. But well, bloody enterprise do it, you know… :(
That’s why we put
proxyEnabled to false by default.
There are couple of settings for fine-tuning proxy server (not needed for most of you):
""(Selenide will automatically put IP or host of local machine)
0(Selenide will automatically pick a random free port on local machine)
We removed an old IE-specific hack
When running tests in IE, Selenide always added a
?timestamp=somerandomnumbers parameter to every URL.
It was a hack to force IE reload pages. It was a long time ago. At that time, it seemed that IE sometimes didn’t
reload content on click, but got it from cache.
Now I think that the reason was somewhere else, not in IE. And this hack is not really needed. So we removed it.
We got updated download statistics for Selenide. It’s awesome! We achieved 37000+ downloads per month!
What do you think?
Feel free to share your ideas how we can use proxy server. Let’s discuss it!