Step implementations

Webdriver Substeps Library

Substeps for web applications

This library of step implementations builds upon the Selenium Webdriver Java API for testing web applications

Using Webdriver-Substeps

For full instructions on how to setup a Substeps project refer to the main Substeps documentation.

If you are using Maven, to include the Webdriver-Substeps dependancy, simply include the following in your POM:

If you’re not using Maven, add the Webdriver-Substeps JARs to your project classpath.

With the appropriate dependencies setup, Substeps can then be composed of the step implementations listed.

To run the Webdriver tests using Chrome, you will also need to install ChromeDriver.

Environment specific settings

It is likely you will need to tailor the execution of tests slightly for various environments, for example in a continuous integration server environment, using the HTMLUnit driver probably makes the most sense, for developers and test authors the visual feedback of Firefox or Chrome is more preferable.

Webdriver-Substeps uses the following properties defined in the environment.properties used by Substeps. Please read the relevant documentation on envirnoment specific properties further details on this mechanism.

Property Description
base.url Used as the prefix for NavigateTo <url> instructions. Vary this for targetting at different environments use a relative or absolute path to use the file: protocol
driver.type HTMLUNIT, FIREFOX, CHROME
default.webdriver.timeout.secs The default value in seconds that webdriver will wait for a given condition
visual.webdriver.close.on.fail true by default, if set to false, when using Chrome or Firefox and an error occurs, the browser window is retained to aide debugging
webdriver.shutdown true by default, override if you wish to keep the browswer windows open. Beware, this will consume lots of resources!
htmlunit.disable.javascript false by default, set to true to disable JavaScript with HTMLUnit

Email Substeps library

Rapid email delivery verification

This library of step implementations is to support testing systems that send and receive email by implementing commonly required features such as verifying an email has expected recipients, or subject, contains required text etc.

Installation

The library is a standard Java JAR, and can be used simply by including on the classpath. The simplest way to achieve this with a Maven project is to include the required dependency:

Usage

To be completed…

Configuration

The following configuration parameters are used by the test email server, and can be configured by overriding the default values in your Substeps configuration.

Name Default Description
email.smtp.enabled true
email.smtp.port 3025
email.smtp.bindAddress null
email.smtps.enabled true
email.smtps.port 30465
email.smtps.bindAddress null
email.pop3.enabled true
email.pop3.port 30110
email.pop3.bindAddress null
email.pop3s.enabled true
email.pop3s.port 30995
email.pop3s.bindAddress null
email.imap.enabled true
email.imap.port 30143
email.imap.bindAddress null
email.imaps.enabled true
email.imaps.port 30993
email.imaps.bindAddress null