Package org.openqa.selenium.htmlunit
Class HtmlUnitTargetLocator
- java.lang.Object
-
- org.openqa.selenium.htmlunit.HtmlUnitTargetLocator
-
- All Implemented Interfaces:
org.openqa.selenium.WebDriver.TargetLocator
public class HtmlUnitTargetLocator extends Object implements org.openqa.selenium.WebDriver.TargetLocator
Provides target–location functionality forHtmlUnitDriver, allowing navigation to frames, windows, alerts, and other browser contexts.This implementation backs the
WebDriver.TargetLocatorinterface for HtmlUnit-based drivers.- Author:
- Martin Bartoš, Ronald Brill
-
-
Constructor Summary
Constructors Constructor Description HtmlUnitTargetLocator(HtmlUnitDriver driver)Creates a newHtmlUnitTargetLocatorbound to the specifiedHtmlUnitDriver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openqa.selenium.WebElementactiveElement()org.openqa.selenium.Alertalert()org.openqa.selenium.WebDriverdefaultContent()org.openqa.selenium.WebDriverframe(int index)org.openqa.selenium.WebDriverframe(String nameOrId)org.openqa.selenium.WebDriverframe(org.openqa.selenium.WebElement frameElement)org.openqa.selenium.WebDrivernewWindow(org.openqa.selenium.WindowType typeHint)org.openqa.selenium.WebDriverparentFrame()org.openqa.selenium.WebDriverwindow(String windowId)
-
-
-
Constructor Detail
-
HtmlUnitTargetLocator
public HtmlUnitTargetLocator(HtmlUnitDriver driver)
Creates a newHtmlUnitTargetLocatorbound to the specifiedHtmlUnitDriver.- Parameters:
driver- the driver instance for which this target locator will perform context switching; must not benull
-
-
Method Detail
-
newWindow
public org.openqa.selenium.WebDriver newWindow(org.openqa.selenium.WindowType typeHint)
- Specified by:
newWindowin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
frame
public org.openqa.selenium.WebDriver frame(int index)
- Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
frame
public org.openqa.selenium.WebDriver frame(String nameOrId)
- Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
frame
public org.openqa.selenium.WebDriver frame(org.openqa.selenium.WebElement frameElement)
- Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
parentFrame
public org.openqa.selenium.WebDriver parentFrame()
- Specified by:
parentFramein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
window
public org.openqa.selenium.WebDriver window(String windowId)
- Specified by:
windowin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
defaultContent
public org.openqa.selenium.WebDriver defaultContent()
- Specified by:
defaultContentin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
activeElement
public org.openqa.selenium.WebElement activeElement()
- Specified by:
activeElementin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
alert
public org.openqa.selenium.Alert alert()
- Specified by:
alertin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
-