public class DomElement extends Object implements GuiElement, Serializable
Created by jordam on 2016-08-17.
| Modifier and Type | Class and Description |
|---|---|
static class |
DomElement.IdentificationType
Identification mechanisms
|
| Modifier and Type | Field and Description |
|---|---|
By |
by |
DomElement.IdentificationType |
identificationType |
String |
name |
Integer |
ordinalNumber |
List<String> |
recognitionStrings |
| Constructor and Description |
|---|
DomElement(By by)
Declares a DOM element on a web page, for use in automation.
|
DomElement(org.openqa.selenium.By seleniumBy)
Please, use the more powerful se.claremont.autotest.websupport.elementidentification.By instead.
|
DomElement(By by,
String name)
Declares a DOM element on a web page, for use in automation.
|
DomElement(PositionBasedWebElement positionBasedWebElement)
Defines a DOM element on a web page, based on its relative position with other elements on the page.
|
DomElement(String json) |
DomElement(String[] alternativeRecognitionStrings,
DomElement.IdentificationType identificationType)
Constructor for use for example with several languages.
|
DomElement(String[] alternativeRecognitionStrings,
DomElement.IdentificationType identificationType,
Integer ordinalNumber)
Constructor for use for example with several languages.
|
DomElement(String[] alternativeRecognitionStrings,
DomElement.IdentificationType identificationType,
Integer ordinalNumber,
String name)
Constructor for use for example with several languages.
|
DomElement(String[] alternativeRecognitionStrings,
DomElement.IdentificationType identificationType,
String name)
Constructor for use for example with several languages.
|
DomElement(String recognitionString,
DomElement.IdentificationType identificationType)
Declares a DOM element to be used in test execution.
|
DomElement(String recognitionString,
DomElement.IdentificationType identificationType,
Integer ordinalNumber)
Declares a DOM element to be used in test execution.
|
DomElement(String recognitionString,
DomElement.IdentificationType identificationType,
Integer ordinalNumber,
String name)
Declares a DOM element to be used in test execution.
|
DomElement(String recognitionString,
DomElement.IdentificationType identificationType,
String name)
Declares a DOM element to be used in test execution.
|
DomElement(org.openqa.selenium.WebElement webElement)
Defines a DOM element based on the given Selenium WebElement.
|
DomElement(org.openqa.selenium.WebElement webElement,
String elementName,
String elementPageName)
Defines a DOM element based on the given Selenium WebElement.
|
| Modifier and Type | Method and Description |
|---|---|
PositionBasedWebElement |
asPositionBasedWebElement(WebInteractionMethods web)
Converts a DomElement to a PositionBasedWebElement.
|
DomElement |
getDomElementFromDescendants(DomElement domElement,
WebInteractionMethods web)
Searches the descendants for the given DOM element, using the WebInteractionMethods given.
|
String |
getElementXPath(org.openqa.selenium.WebElement element)
Retrieves the xpath of the current element, in the current browser, and with the current web page structure.
|
String |
LogIdentification()
Enables unified logging formats for element references in the testCaseLog.
|
String |
toString() |
public String name
public By by
public DomElement.IdentificationType identificationType
public Integer ordinalNumber
public DomElement(By by)
by - Describes how to identify the DOM element.public DomElement(String json)
public DomElement(org.openqa.selenium.By seleniumBy)
seleniumBy - Regular Selenium By statement.public DomElement(By by, String name)
by - Describes how to identify the DOM element.name - The element name, to be used in logs.public DomElement(org.openqa.selenium.WebElement webElement)
webElement - The Selenium WebElement to use as base for this DomElement.public DomElement(org.openqa.selenium.WebElement webElement,
String elementName,
String elementPageName)
webElement - Selenium WebElement object.elementName - The name for the element, for use in logs.elementPageName - The name of the page of the element, for use in logs.public DomElement(String recognitionString, DomElement.IdentificationType identificationType, String name)
recognitionString - the recognition string that identifies the object.identificationType - what mechanism to use for identification.name - Element name, for logging.public DomElement(String recognitionString, DomElement.IdentificationType identificationType)
recognitionString - the recognition string that identifies the object.identificationType - what mechanism to use for identification.public DomElement(String[] alternativeRecognitionStrings, DomElement.IdentificationType identificationType, String name)
alternativeRecognitionStrings - An array of recognition strings for this element.identificationType - The method of identification.name - Element name, for logging.public DomElement(String[] alternativeRecognitionStrings, DomElement.IdentificationType identificationType)
alternativeRecognitionStrings - An array of recognition strings for this element.identificationType - The method of identification.public DomElement(String recognitionString, DomElement.IdentificationType identificationType, Integer ordinalNumber, String name)
recognitionString - the recognition string that identifies the object.identificationType - what mechanism to use for identification.ordinalNumber - The ordinal number of the occurrence on the web page, if multiple matches for search criteria.name - Element name, for logging.public DomElement(String recognitionString, DomElement.IdentificationType identificationType, Integer ordinalNumber)
recognitionString - the recognition string that identifies the object.identificationType - what mechanism to use for identification.ordinalNumber - The ordinal number of the occurrence on the web page, if multiple matches for search criteria.public DomElement(String[] alternativeRecognitionStrings, DomElement.IdentificationType identificationType, Integer ordinalNumber, String name)
alternativeRecognitionStrings - An array of recognition strings for this element.identificationType - The method of identification.ordinalNumber - The ordinal number of the occurrence on the web page, if multiple matches for search criteria.name - Element name, for logging.public DomElement(String[] alternativeRecognitionStrings, DomElement.IdentificationType identificationType, Integer ordinalNumber)
alternativeRecognitionStrings - An array of recognition strings for this element.identificationType - The method of identification.ordinalNumber - The ordinal number of the occurrence on the web page, if multiple matches for search criteria.public DomElement(PositionBasedWebElement positionBasedWebElement)
positionBasedWebElement - A DOM element prepared for position based identification.public DomElement getDomElementFromDescendants(DomElement domElement, WebInteractionMethods web)
domElement - The DOM element that should exist among the descendants of this element.web - WebInteractionMethods to use.public PositionBasedWebElement asPositionBasedWebElement(WebInteractionMethods web)
web - WebInteractionMethods to use.public String getElementXPath(org.openqa.selenium.WebElement element)
element - The Selenium WebElement object to find the xpath for.public String LogIdentification()
Copyright © 2019. All rights reserved.