SeleniumLibrary Reference
Aus ExpeccoWiki
The Selenium Plugin adds an interface to the open-source Selenium web testing framework. It allows for capture/replay of web sessions. It uses an extended Firefox browser (and Selenium IDE) for capture and can use any other browser (and Selenium RC) for replay.
The Selenium Library wraps all Selenium functions as graphical building blocks in expecco. Thus, instead of using selenium in a textual and script-like fashion, these can now be modeled as a graphical diagram. Captured browser sessions can be imported as an activity diagram of the recorded interaction steps, and further reused, re-factored or parametrized in the expecco diagram editor. It is especially possible and useful, to provide input values from other sources (databases, testdata generators etc.) or to further validate the system using direct access blocks to the database or via other access paths. In addition, partial interaction sequences can be resused, parametrized, or used in loops or alternative sequences.
The full power of expecco's rich control flow options is now combined tith the Selenium testing features.
Blocks for Selenium Commands
For every selenoum command, a corresponding block is found in the Selenium Library.
There is a distinction drawn between the following command prefixes:
- Is - Commands beginning with "Is" return TRUE or FALSE. Example: "isTextPresent"
- Get - commands beginning with "Get" return a STRING containing the requested value. Example: "getTitle"
- Assertion - commands beginning with "Assert" cause an error in the negative case which lead into the abortion of the test. Example: "assertElementHeight" or "assertTextPresent"
- Verification - commands beginning with "Verify" create a log entry in the negative case. The test execution continues. Example: "verifyElementHeight"
For all Is/Get commands corresponding Assert/Verify commands are available.
Look at the Selenium Reference for the meaning of the different locators and commands.
Additional Functions (which are not available in pure Selenium)
A number of additional blocks and functions have been added to the basic set of Selenium functions. These are mostly higher level complex search operations, expecially to search for text or values in tables. Also, new combination blocks waitForElementAndXXX have been added for convenience - these combine the waitForElementPresent with another function, such as Click or Type.
Back to Online Documentation.