DecoratedTargetLocator extends DecoratedChild<WebDriver.TargetLocator,DecoratedWebDriver> implements WebDriver.TargetLocator { @Override public WebDriver frame(int frameIndex) { getOriginal().frame(frameIndex); return getTopmostDecorated().getActivated(); } DecoratedTargetLocator(final WebDriver.TargetLocator targetLocator, final DecoratedWebDriver driverWrapper); @Override WebDriver frame(int frameIndex); @Override WebDriver frame(String frameName); @Override WebDriver frame(WebElement frameElement); @Override WebDriver parentFrame(); @Override WebDriver window(String windowName); @Override WebDriver defaultContent(); @Override WebElement activeElement(); @Override Alert alert();  }
@Test void testFrameByIndex() { verifyDecoratingFunction($ -> $.frame(3)); }
@Test void testFrameByString() { verifyDecoratingFunction($ -> $.frame("test")); }
@Test void testFrameByReference() { final WebElement frame = mock(WebElement.class); verifyDecoratingFunction($ -> $.frame(frame)); }