LeanFT for Selenium is a solution that extends the Selenium API, increasing productivity and enabling you to create more robust and more maintainable Selenium tests.
LeanFT for Selenium includes the following:
A Java code library that extends the WebDriver API with additional locators and utilities. Using this library, you can create more robust or generic identifications for your objects, and use built-in utilities rather than implementing them at your end from scratch.
An IDE plugin (for Eclipse and IntelliJ IDEA) that provides you with:
IDE project templates for Selenium projects. Using these templates you can create projects that are ready for Selenium automation.
An Object Identification Center. A powerful spying tool that enables you to efficiently build robust WebDriver-based object identifications, validate them, and generate the identification code easily. With that, the test creation time and its robustness dramatically improve.
- LeanFT for Selenium is supported on Windows, Linux, and Mac environments.
- LeanFT for Selenium supports running your tests with Selenium Grid.
- LeanFT for Selenium is currently supported at technology preview level.
Log into the LeanFT machine as administrator.
Install the browsers that you will be working with in their default installation locations. For supported browsers for Selenium, see the LeanFT Product Availability Matrix.
Download and extract the Selenium WebDriver drivers relevant for your browsers. See the Selenium website.
- For supported WebDriver drivers, see the LeanFT Product Availability Matrix.
- Firefox requires a WebDriver driver from version 48 and later.
Add the location of the WebDriver drivers to the system environment Path variable.
For example, if your browser driver is located in C:\WebDrivers, add C:\WebDrivers to the Path variable.
Maven-based projects: You must, once-off, install the LeanFT JARs to your Maven repository (your organization's or local).
The JARs are located in:
- Windows: <LeanFTInstallation>\Selenium SDK\Java\
- Linux: <LeanFTInstallation>/selenium-sdk/Java/
- Mac: <LeanFTInstallation>/Selenium SDK/Java/
JAR Maven build artifact identity (GAV) com.hpe.lft.selenium.jar
Add the following switch to the command:
Non-Maven based projects: Download the Selenium JAR files to the LeanFT machine.
Tip: This can be the Selenium standalone JAR, or the collection of the Selenium Java binding JAR files.
For details, see Selenium's documentation.
Create a Selenium project
In your IDE:
Create a new Selenium project using the New Project wizard. For details, see Create a LeanFT testing project.
- Select Selenium.
- For non-Maven-based projects, provide the path to the Selenium JAR files.
The project is created with all the required LeanFT and Selenium libraries.
Implement your test as you would any other Selenium test:
Use the Selenium SDK and the LeanFT Selenium SDK (Java)
The SDK includes an extended set of locators that can:
- Identify elements by their visible text
- Identify input elements by their type
- Identify elements by attributes and styles
- Provide a regular expression as a locator's value
- Identify elements by a combination of locators
To identify (spy) objects in your application and easily generate a description code for this element to be used in your test.