< Previous | Front page | Next >
Skip to end of metadata
Go to start of metadata

Graphene is an entry point for the common one-line operations:

Static Import of Graphene Utility Class

The main advantage of the Graphene utility class is, that it includes set of static methods, which can be used directly from your test:

This concept is much stronger when using possibilities of your IDE for code completion.

You can use Eclipse Favorites feature and include Graphene into list of utility classes - you will get suggestions for code-completion out of the box.

Waitings

Shortcut for fluent waiting API.

See the Waiting API documentation page for more information.

Request Guards

It is a shortcut for the Graphene request guards, which are powerful tools to assert that an AJAX/HTTP or no request was done.

waitForHttp() is a guard as well, even when its name does not tell it. The difference between the waitForHttp() and the guardHttp() is that the first one does ignore AJAX requests during its waiting period and the second one does not.

See the Request Guards documentation page for more information.

Creating Page Fragments dynamically

Sometimes you need a way to create a Page Fragment instance not by injecting it via @FindBy, but dynamically.

Consider a Tab Panel widget, for which you want to create a Page Fragment. You do not know in advance how many tabs it will have; and you wanna to return an initialized Page Fragment with tabs content each time an user switch to a particular tab. This method is suitable for this.

Page Object location encapsulation

You can find more information about Page Object location encapsulation in this documentation page.

Basically, you can use Graphene.goTo() method like this:

Graphene will load http://locahost:8080/register.html into your default browser.

You can specify the browser into which the page should be loaded by passing a browser qualifier as a Graphene.goTo(Class<?> pageObject, Class<?> browserQualifier) parameter.
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.