Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
com.microfocus.adm.leanft:leanft-selenium-java-sdk
Advanced tools
LeanFT Selenium Java SDK extends the WebDriver API with additional locators and utilities
LeanFT for Selenium Java SDK
LeanFT for Selenium Java SDK extends the Selenium WebDriver API with locators and utilities that enable creating tests that are more robust, and reduces Selenium test automation and maintenance efforts.
<dependency>
<groupId>com.microfocus.adm.leanft</groupId>
<artifactId>leanft-selenium-java-sdk</artifactId>
<version>1.0.1</version>
</dependency>
LeanFT's By class extends the original Selenium By class. To use it, import the following:
import com.hpe.leanft.selenium.By;
import com.hpe.leanft.selenium.ByEach;
import com.hpe.leanft.selenium.Utils;
The following example demonstrates locating elements by their visible text.
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com");
WebElement element = driver.findElement(By.visibleText("Google Search"));
element.click();
driver.quit();
The following example demonstrates locating elements using a regular expression.
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com");
WebElement element = driver.findElement(By.name(Pattern.compile("^btn")));
element.click();
driver.quit();
Locate an element using its HTML attributes and highlight it.
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com");
Map<String, String> attributes = new HashMap<>();
attributes.put("class", "gsfi lst-d-f");
attributes.put("id", "lst-ib");
WebElement element = driver.findElement(By.attributes(attributes));
element.click();
driver.quit();
LeanFT for Selenium API reference documentation can be found here
Finds elements based on their visible text.
Finds elements based on their visibility.
Finds elements based on their role.
Finds elements based on their type.
Finds elements based on their attributes (one or more). Attribute values can be defined using regular expressions.
Finds elements based on their computed style (one or more). Computed style values can be defined using regular expressions.
Finds elements based on the combination of locators (attributes, tags, styles etc.).
All the locators which accept a string as a value of the element's property were extended to support regular expressions, including the following Selenium native locators:
Returns a snapshot (image) of the selenium element as a Base64 string.
Highlights the selenium element in the browser.
To build the project, clone it and run the following command:
mvn clean install
FAQs
LeanFT Selenium Java SDK extends the WebDriver API with additional locators and utilities
We found that com.microfocus.adm.leanft:leanft-selenium-java-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.