Package allurium.primitives
Class Tab
java.lang.Object
allurium.primitives.UIElement
allurium.primitives.Tab
- All Implemented Interfaces:
AlluriumElement,ListComponent,WebElementMeta
Represents a `Tab` element in the UI, extending
UIElement.
This class encapsulates the behavior and attributes of a tab component in a user interface, commonly used for navigation or organizing content into sections.
Features:
- Encapsulates behavior and attributes of a `Tab` element.
- Provides multiple constructors for flexible initialization using:
- Selenide locators as strings
- Selenium
Bylocators SelenideElementinstances
- Includes static factory methods for convenient creation of `Tab` instances.
Purpose:
- Standardizes interaction with tab elements in the UI.
- Simplifies the creation and management of tab components in tests.
Constructors:
Tab()- Default constructor.Tab(String)- Creates a `Tab` using a Selenide locator string.Tab(String, String)- Creates a `Tab` using a Selenide locator string and a name.Tab(By)- Creates a `Tab` using a SeleniumBylocator.Tab(By, String)- Creates a `Tab` using a SeleniumBylocator and a name.Tab(SelenideElement)- Creates a `Tab` using aSelenideElement.Tab(SelenideElement, String)- Creates a `Tab` using aSelenideElementand a name.
Static Factory Methods:
$tab(By)- Creates a `Tab` using a SeleniumBylocator.$tab(By, String)- Creates a `Tab` using a SeleniumBylocator and a name.$tab(SelenideElement)- Creates a `Tab` using aSelenideElement.$tab(SelenideElement, String)- Creates a `Tab` using aSelenideElementand a name.$tab(String)- Creates a `Tab` using a Selenide locator string.$tab(String, String)- Creates a `Tab` using a Selenide locator string and a name._$tab(String)- Creates a `Tab` using an XPath expression.
Usage Example:
// Creating a tab using a Selenide locator
Tab tab = $tab(".tab-class");
// Creating a tab with a custom name
Tab namedTab = $tab(By.cssSelector(".tab-class"), "Settings Tab");
-
Field Summary
Fields inherited from class allurium.primitives.UIElement
assignNameMethod, description, id, parent, root, stepsConsoleLoggingEnabled, stepsReportLoggingEnabled, uiElementName, uiElementType -
Constructor Summary
ConstructorsConstructorDescriptionTab()Default constructor.Tab(com.codeborne.selenide.SelenideElement selenideElement) Constructor that initializes a `Tab` using aSelenideElement.Constructor that initializes a `Tab` using aSelenideElementand a name.Constructor that initializes a `Tab` using a Selenide locator string.Constructor that initializes a `Tab` using a Selenide locator string and a name.Tab(org.openqa.selenium.By locator) Constructor that initializes a `Tab` using a SeleniumBylocator.Constructor that initializes a `Tab` using a SeleniumBylocator and a name. -
Method Summary
Methods 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, getHeight, getId, getStepText, getUiElementName, getWidth, hover, hover, hover, isDisplayed, logStep, logStepToReport, logStepToReport, scrollTo, scrollTo, scrollTo, setRoot, 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.AlluriumElement
getRootMethods inherited from interface allurium.interfaces.WebElementMeta
getDescription, getMetaKeys, getParent, setAssignNameMethod, setDescription, setParent, setUiElementName
-
Constructor Details
-
Tab
public Tab()Default constructor. Initializes the element type as "tab". -
Tab
Constructor that initializes a `Tab` using a Selenide locator string.- Parameters:
selenideLocator- the Selenide locator as a string
-
Tab
Constructor that initializes a `Tab` using a Selenide locator string and a name.- Parameters:
selenideLocator- the Selenide locator as a stringname- the name of the tab
-
Tab
public Tab(org.openqa.selenium.By locator) Constructor that initializes a `Tab` using a SeleniumBylocator.- Parameters:
locator- the Selenium locator for the tab
-
Tab
Constructor that initializes a `Tab` using a SeleniumBylocator and a name.- Parameters:
locator- the Selenium locator for the tabname- the name of the tab
-
Tab
public Tab(com.codeborne.selenide.SelenideElement selenideElement) Constructor that initializes a `Tab` using aSelenideElement.- Parameters:
selenideElement- the Selenide element representing the tab
-
Tab
Constructor that initializes a `Tab` using aSelenideElementand a name.- Parameters:
selenideElement- the Selenide element representing the tabname- the name of the tab
-
-
Method Details
-
$tab
-
$tab
-
$tab
-
$tab
-
$tab
-
$tab
-
_$tab
-