Package allurium.windows
Class Iframe
java.lang.Object
allurium.primitives.UIElement
allurium.AbstractWidget
allurium.windows.Iframe
- All Implemented Interfaces:
AlluriumElement,ListComponent,WebElementMeta
Represents an `
-
Field Summary
Fields inherited from class allurium.primitives.UIElement
assignNameMethod, description, id, parent, root, stepsConsoleLoggingEnabled, stepsReportLoggingEnabled, uiElementName, uiElementType -
Constructor Summary
ConstructorsConstructorDescriptionIframe(com.codeborne.selenide.SelenideElement rootElement) Constructor that initializes the iframe using aSelenideElement.Constructor that initializes the iframe using a Selenide locator string.Iframe(org.openqa.selenium.By locator) Constructor that initializes the iframe using a SeleniumBylocator. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidSwitches the WebDriver context back to the default content.final voidSwitches the WebDriver context to the iframe.Methods inherited from class allurium.AbstractWidget
getHeight, getRoot, getWidth, setRootMethods inherited from class allurium.primitives.UIElement
_$uiElement, $uiElement, $uiElement, $uiElement, $uiElement, $uiElement, $uiElement, applyName, applyName, as, assertEmpty, assertEquals, assertExists, assertExists, assertHasCssClass, assertHasCssClass, assertHasNotCssClass, assertHasNotCssClass, assertHasNotCssClass, assertHasText, assertIsNotEmpty, assertNotExist, assertNotExist, assertNotVisible, assertNotVisible, assertNotVisible, assertText, assertVisible, assertVisible, assertVisible, assertVisible, assertVisibleInViewport, click, click, click, click, click, clickAndHold, clickAndHold, clickAndHold, contextClick, contextClick, contextClick, doubleClick, doubleClick, doubleClick, get, getAllureCompiledStep, getAttribute, getId, getStepText, getUiElementName, hover, hover, hover, isDisplayed, logStep, logStepToReport, logStepToReport, scrollTo, scrollTo, scrollTo, setRoot, text, verifyEmpty, verifyIsNotEmpty, wrappedNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface allurium.interfaces.WebElementMeta
getDescription, getMetaKeys, getParent, setAssignNameMethod, setDescription, setParent, setUiElementName
-
Constructor Details
-
Iframe
public Iframe(com.codeborne.selenide.SelenideElement rootElement) Constructor that initializes the iframe using aSelenideElement.- Parameters:
rootElement- the Selenide element representing the iframe
-
Iframe
Constructor that initializes the iframe using a Selenide locator string.- Parameters:
selenideLocator- the Selenide locator string for the iframe
-
Iframe
public Iframe(org.openqa.selenium.By locator) Constructor that initializes the iframe using a SeleniumBylocator.- Parameters:
locator- the Selenium locator for the iframe
-
-
Method Details
-
switchDriverToIframe
public final void switchDriverToIframe()Switches the WebDriver context to the iframe.This method utilizes Selenium's `switchTo().frame()` functionality to set the current context to the iframe represented by this object.
Usage Example:
Iframe iframe = new CustomIframe("#iframe-id"); iframe.switchDriverToIframe(); // Perform actions inside the iframe -
switchDriverBack
public final void switchDriverBack()Switches the WebDriver context back to the default content.This method resets the WebDriver context to the main document using Selenium's `switchTo().defaultContent()` functionality.
Usage Example:
iframe.switchDriverBack();
-