Quantcast
Channel: Selenide
Viewing all 45 articles
Browse latest View live

Released Selenide 3.9.2

$
0
0

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 was 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


Released Selenide 3.10

$
0
0

Hi!

We released Selenide 3.10!

Proxy server is disabled by default

It’s I am sad to say this, but it seems that the experiment with a proxy server has not yet succeeded.

There is a problem with the “new way” of downloading files using Selenide built-in proxy server. It works for all my projects, but some folks reported that it doesn’t work for them. I still don’t know exactly the problem and its causes. Probably those who use Selenium Grid experience this problem.

Anyway, now we reverted default downloading mechanism to HTTPGET. If you need to use proxy server, enable it via system property:

-Dselenide.fileDownload=PROXY

Or directly in your code:

Configuration.fileDownload=PROXY;

By the way, we fixed issue 393: Selenide will not even try to run proxy server until fileDownload=PROXY is set.

Added support for multiple selects

There are dropdown lists that allowing selecting multiple options (<select multiple>). Now it’s easy to select multiple options in Selenide with just one command:

select.selectOption("Margarita","Theodor Woland");// by testselect.selectOption(0,2,3);// by indexselect.selectOptionByValue("cat","woland");// by value

We also added a method for getting all selected options:

select.getSelectedOptions().shouldHave(texts("Margarita","Theodor Woland"));

См. issue 400

Now you can print report only for failed tests

As you probably know, in Selenide you can print report of all executed steps .

Now you can configure if it should be printed only for failed tests. Or only for succeeded tests. Or always.

For JUnit:

@RulepublicTestRulereport=newTextReport().onFailedTest(true).onSucceededTest(false);

For TestNG:

@Listeners(TextReport.class)publicclassGoogleTestNGTest{@BeforeMethodpublicvoidsetUp(){TextReport.onSucceededTest=false;TextReport.onFailedTest=true;}}

See. issue 408

Fixed bug with parsing http header Content-Disposition containing encoding

Now Selenide uses correct file name even if header Content-Disposition contains encoding:

Content-Disposition: filename=Prices.csv;charset=UTF-8

See. issue 398

Fixed bug 401: “Selenide swallows exception in some cases”

Never ever write catch (Throwable). Never!

See. issue 401

Method open(url) now works for URL in upper case

It’s weird, but sometimes people want to enter url in upper case. And they found that Selenide could not open such urls. Ups.

Now we fixed it: issue 407

Uncommented one old test

See. issue 379


News

Yes, you can use Selenide for testing mobile applications!



Let’s upgrade!

Andrei Solntsev

selenide.org

BDD with Selenide

$
0
0

Hi!

People often ask if they can use BDD with Selenide.

Short answer: Yes, you can!

There is plenty of BDD tools in Java and Python. You can use any of them with Selenide. Some working examples: Selenide + Cucumber: https://github.com/selenide-examples/cucumber/tree/master/src/test/resources/org/selenide/examples/cucumber

Selenide + JBehave: https://gist.github.com/mp911de/009ea539271da0633c59

Selenide + GEB: https://github.com/selenide-examples/geb-maven-tutorial/blob/master/src/test/groovy/stepdefs/IndexStepDefs.groovy

Selenide + Gauge: https://github.com/selenide-examples/GaugeSelenideExample/blob/master/specs/example.spec You can find a whole book here full of examples with Selenide, JBehave and Cucumber: https://www.amazon.com/Test-Driven-Java-Development-Viktor-Farcic/dp/1783987421?tag=viglink12630-20

P.S. I personally don’t value BDD really much. I think it’s a nice idea, but it doesn’t really work. Business stakeholders do not really write executable specifications.



Обновляйтесь!

Andrei Solntsev

selenide.org

Released Selenide 3.11

$
0
0

Good evening!

We released Selenide 3.11! This is the last release in 3.x series. The last working on Java 7 and Selenium webdriver 2.x

The following is Selenide 4.x: selenium webdriver 3.x and Java 8.

So, what we have in Selenide 3.11:

Added condition checked

Now you can write readable test for checkbox:

$("#i-agree").shouldBe(checked);

Before now, you had tow write $.shouldBe(selected) which is not pretty clear.

Checkbox should be checked.

See issue 416

Optimization of getMessage()

There is a strange behaviour in Selenium. When you get any exception from webdriver (any subclass of SeleniumException), its method getMessage() is called.

And method SeleniumException.getMessage() tries to be too smart. It tries to add IP and host name of current machine to the error message. And detecting host name can be very slow.

And it appeared that Selenide does call this method multiple times.

I believe that getMessage() should not this. It’s not its business. But all we can do is just to optimize getMessage() calls, so that Selenide would not call this method multiple times.

So we did it.

See issue 415



Waiting for Selenium 3.0…


Andrei Solntsev

selenide.org

Released Selenide 4.0

$
0
0

Hi all!

It happened, finally!

After 3-years-length waiting, Selenium Webdriver 3.0 was released.

And we released Selenide 4.0.

What changed?

Actually nothing should change for you. They just cleared some legacy garbage from selenium (that was never used by Selenide).

What is actually important that Selenide now requires Java 8.

Hurrra!!! Now QA world will finally move to Java 8 and lambdas!

Can I get more details!

Sure. Here is a list of selenium webdriver 3.0.0 changes.


News



Let’s upgrade!

Andrei Solntsev

selenide.org

Viewing all 45 articles
Browse latest View live