Package org.openqa.selenium.htmlunit
Class HtmlUnitElementFinder.FindByClassName
java.lang.Object
org.openqa.selenium.htmlunit.HtmlUnitElementFinder.HtmlUnitElementLocator
org.openqa.selenium.htmlunit.HtmlUnitElementFinder.FindByClassName
- Enclosing class:
- HtmlUnitElementFinder
public static class HtmlUnitElementFinder.FindByClassName
extends HtmlUnitElementFinder.HtmlUnitElementLocator
Locator strategy for finding elements by their CSS class name.
This class ensures that only single class names are used. Compound class names
(containing spaces) are not permitted. Internally, the search is delegated
to HtmlUnitElementFinder.FindByCssSelector using a CSS class selector.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.openqa.selenium.WebElement>findElements(HtmlUnitDriver driver, org.openqa.selenium.By locator) Finds multiple elements on the given page using the provided locator.List<org.openqa.selenium.WebElement>findElements(HtmlUnitWebElement element, org.openqa.selenium.By locator) Finds multiple elements within a specificHtmlUnitWebElement.Methods inherited from class org.openqa.selenium.htmlunit.HtmlUnitElementFinder.HtmlUnitElementLocator
findElement, findElement, getLastPage, getRemotable, getValue
-
Constructor Details
-
FindByClassName
public FindByClassName()
-
-
Method Details
-
findElements
public List<org.openqa.selenium.WebElement> findElements(HtmlUnitDriver driver, org.openqa.selenium.By locator) Description copied from class:HtmlUnitElementFinder.HtmlUnitElementLocatorFinds multiple elements on the given page using the provided locator.- Specified by:
findElementsin classHtmlUnitElementFinder.HtmlUnitElementLocator- Parameters:
driver- the driver representing the browser/page contextlocator- the locator strategy to use- Returns:
- a list of matching
WebElementobjects
-
findElements
public List<org.openqa.selenium.WebElement> findElements(HtmlUnitWebElement element, org.openqa.selenium.By locator) Description copied from class:HtmlUnitElementFinder.HtmlUnitElementLocatorFinds multiple elements within a specificHtmlUnitWebElement.- Specified by:
findElementsin classHtmlUnitElementFinder.HtmlUnitElementLocator- Parameters:
element- the element within which to searchlocator- the locator strategy to use- Returns:
- a list of matching
WebElementobjects
-