Skip to end of metadata
Go to start of metadata

Graphene integrates with Arquillian Drone to simplify process of instantiation of browser session.
So Drone takes care of WebDriver instance creation and configuration and then it delegates this session to Graphene.

Configuration

Graphene shares the configuration with Drone WebDriver, so you can refer to Drone.

In general, configuration is driven by arquillian.xml and can be overriden by System properties.

Browser Instantiation

You can ask Drone to instantiate any specific implementation of WebDriver like FirefoxDriver, ChromeDriver or HtmlUnitDriver, e.g.:

But it is recommended to use WebDriver interface and use arquillian.xml to choose appropriate browser instance:

For more configuration options, refer to Drone and browser driver implementations.

Drone Reusable Session

In order to speed up development, Drone comes with Reusable Remote WebDriver Session feature.

This feature make sure that Drone does not close the browser session on the end of each test,
and it stores the session handle in the pernament storage.

Thus after running first test, browser session is still open and next tests can reuse it.

Speed Up Development

Since browser session does not have to be opened repeatedly, Drone saves this time
and repeating a test leads into huge time savings.

This enables browser automated tests development as close to unit tests execution time as possible.

Improved Browser Debugging

Since session is not closed at the end of test, you can tweak anything in browser setup you want including setup of browser debuggers (Firebug, Chrome Dev Tools).

You can for example:

  • open debugger and watch network usage
  • insert breakpoints to scripts
  • watch browser console

Note: it is tempting to use this feature also to speed up test execution - this is not recommended, since then tests can influence each other.

Using Selenium Server

This feature is available only when using remote WebDriver session. So you need to download appropriate version of Selenium Server and start the server:

Now Drone can connect to this server and share the session-id across several tests.

Turn on Reusable Browser Session session

You can turn on Reusable Browser Session by following entry:

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.