Package org.openqa.selenium.htmlunit
Class HtmlUnitElementFinder.FindByLinkText
- java.lang.Object
-
- org.openqa.selenium.htmlunit.HtmlUnitElementFinder.HtmlUnitElementLocator
-
- org.openqa.selenium.htmlunit.HtmlUnitElementFinder.FindByLinkText
-
- Enclosing class:
- HtmlUnitElementFinder
public static class HtmlUnitElementFinder.FindByLinkText extends HtmlUnitElementFinder.HtmlUnitElementLocator
Locator strategy for finding anchor elements (<a>) by their exact visible text.Supports searching both on the
HtmlUnitDriverpage and within aHtmlUnitWebElementcontext.
-
-
Constructor Summary
Constructors Constructor Description FindByLinkText()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<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
-
-
-
-
Method Detail
-
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
-
-