Highlighted Features

jQuery Selectors

Graphene gets its own @FindBy annotation and ByJQuery selector in order to fully support jQuery selectors. (read more)

Injecting Selenium Resources

The interesting Selenium APIs (HTML5, Mobile, etc.) can be injected to the test or page fragments directly. (read more)

Fluent API for Waiting

Waiting conditions can now be defined in a nice fluent API. (read more)

Injecting List of Page Fragments

It’s possible to inject a list of page fragments with @FindBy List<PageFragment>.

Page Fragment Enrichment

Any Arquillian resource available through @ArquillianResource can be injected into page fragments.

Important Bug Fixes

XHR Request Guards

guardXhr wasn’t waiting for the XHR request to fully complete. So we have improved it and now it not only waits for AJAX callback to completely finish, but it will wait for any asynchronous processing caused by that callback to finish.

Protecting against Stale Elements

You are now completely protected against StaleElementReferenceException when using page fragments and elements injected by @FindBy, because operations on those elements are evaluated lazily (at the time of usage) and they are re-evaluated when they get stale.

Refined Page Fragments

Page Fragments have received a lot of bug fixes and improvements.

jQuery Selectors

This feature injects a jQuery script to a tested page and allows Graphene to find elements using the jQuery Selectors syntax:

@FindBy(jquery = ":button:visible")
WebElement firstVisibleButton;

Note that Graphene injects jQuery in non-conflict way, so it does not affect your tested application.

Injecting Selenium Resources

Graphene leverages a long list of advanced Selenium features and their APIs to take full control of your browser:

You can inject those using @ArquillianResource annotation:

@ArquillianResource
BrowserConnection connection;

@Test
public void test() {
    connection.setOnline(false);
}

Fluent API for Waiting

The Alpha2 API allowed you to define a wait like this:

waitAjax().until(element(button).isVisible());

In order to fully support code-completion, we have decided to deprecate this API in favor of a fluent API:

waitAjax().until().element(button).is().visible();

Roadmap

This release is a significant milestone on the way to Beta1.


blog comments powered by Disqus