Graphene 2.0.0.Alpha3 Released

The Arquillian team is proud to announce the 2.0.0.Alpha3 release of the Graphene component!

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.

What is Arquillian?

Arquillian is open source software that empowers you to test JVM-based applications more effectively. Created to defend the software galaxy from bugs, Arquillian brings your test to the runtime so you can focus on testing your application's behavior rather than managing the runtime. Using Arquillian, you can develop a comprehensive suite of tests from the convenience of your IDE and run them in any IDE, build tool or continuous integration environment.

Release details

Component Graphene
Version 2.0.0.Alpha3 view tag
Release date 2013-01-08
Released by Lukas Fryc
Compiled against

Published artifacts org.jboss.arquillian.graphene

  • org.jboss.arquillian.graphene » graphene-parent pom
  • org.jboss.arquillian.graphene » graphene-selenium-parent pom
  • org.jboss.arquillian.graphene » graphene-selenium-api jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-impl jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-drone jar pom
  • org.jboss.arquillian.graphene » graphene-selenium pom
  • org.jboss.arquillian.graphene » graphene-webdriver-parent pom
  • org.jboss.arquillian.graphene » graphene-webdriver-impl jar pom
  • org.jboss.arquillian.graphene » graphene-webdriver-drone jar pom
  • org.jboss.arquillian.graphene » graphene-webdriver pom
  • org.jboss.arquillian.graphene » graphene-webdriver-spi jar pom
  • org.jboss.arquillian.graphene » arquillian-graphene pom
  • org.jboss.arquillian.graphene » graphene-component-api jar pom

Release notes and resolved issues 39

Q1/13: Page Fragment enrichment; jQuery locators

Bug
  • ARQGRA-184 - Using driver in test listener causes NullPointerException
  • ARQGRA-198 - TestFactoryClass fails on NPE
  • ARQGRA-201 - Guards are not working with AndroidDriver
  • ARQGRA-202 - Page Fragments: injected web elements are not found relatively to root element
  • ARQGRA-232 - Enriched WebElement cannot be converted to JSON without manual unwrapping
  • ARQGRA-233 - Graphene does not guard against StaleElementException
  • ARQGRA-240 - Move Grapgene's FindBy from SPI to API
  • ARQGRA-241 - Double quotes in jquery fails
  • ARQGRA-242 - Dependency cleanup: remove Guava, commons-* and replace JBoss Logging with JUL
  • ARQGRA-245 - Returning a value from Function<T,V> in WebDriverwait cannot be compiled with JDK7
  • ARQGRA-246 - ByJQuery.jquerySelector with findElemens behaves differently than By
  • ARQGRA-249 - Negation in fluent API is not compilable
Component Upgrade
Enhancement
  • ARQGRA-195 - Page Fragment Enricher fail with no context to where
  • ARQGRA-200 - Enhance Graphene's guards to wait until page fully updates
  • ARQGRA-211 - Enhance guards to wait for request
  • ARQGRA-228 - Waiting conditions improvements - string matchers, no-parameter until()
  • ARQGRA-229 - Support for JavaScript interfaces defined as abstract classes
  • ARQGRA-230 - Override a toString method in BooleanConditionWrapper
  • ARQGRA-234 - Sizzle locators: make injected jQuery noConflict
Feature Request
  • ARQGRA-84 - Support Sizzle locators with Selenium 2
  • ARQGRA-165 - Test enricher or resource provider for JSInterfaceFactory
  • ARQGRA-166 - Enrichment of page abstractions with Graphene configuration
  • ARQGRA-189 - Support @Page in Page objects
  • ARQGRA-190 - Support initializing Page Objects declared with generic types
  • ARQGRA-191 - Support @Drone and @ArquillianResource in Page objects
  • ARQGRA-192 - Support enriching also List<WebElement> fields annotated with @FindBy
  • ARQGRA-204 - Support innitialization of Page Fragments nested in other Page Fragments
  • ARQGRA-214 - Support for enriching by Page Objects and Page Fragments declared as nested classes
  • ARQGRA-215 - Enable injection of List<Page Fragment>
  • ARQGRA-216 - Support protection from StaleElementReferenceException
  • ARQGRA-227 - Support for injecting common Selenium resources: JavaScriptExecutor, Actions, Capabilities, etc.
  • ARQGRA-239 - CGLib usage interferes with test execution, leading to Security exception
  • ARQGRA-244 - Type parameters should be uppercase
Task
  • ARQGRA-193 - Make Graphene 2 Configuration be compatible with Drone configuration
  • ARQGRA-207 - Page Fragments: support initialization of Page Fragments which are without @Root field
  • ARQGRA-219 - Refactor whole Enricher related code

Thanks to the following list of contributors: Jan PapouĊĦek, Lukas Fryc, Juraj Huska, Karel Piwko