Class WebDriverController
java.lang.Object
org.mycore.iview.tests.controller.WebDriverController
- Direct Known Subclasses:
ImageViewerController
,SideBarController
,ToolBarController
- Author:
- Sebastian Röher (basti890)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
assertAttributeByXpath
(String xPath, String attribute, boolean assertion) compares the Elements attribute-value to the assertionboolean
assertAttributeByXpath
(String xPath, String attribute, String assertion) compares the Elements attribute-value to the assertionboolean
assertElementByAttributePresent
(String attribute, String value) checks if there is any Element in the dom got with the attribute that contains the valuevoid
clickElementByXpath
(String xpath) clicks the first element specified by xPathvoid
dragAndDropByXpath
(String xPath, int offsetX, int offsetY) clicks on the first element specified by the xPath and drags it offestX pixels horizontal and offsetY pixels verticalorg.openqa.selenium.WebDriver
void
setDriver
(org.openqa.selenium.WebDriver driver)
-
Constructor Details
-
WebDriverController
public WebDriverController(org.openqa.selenium.WebDriver driver) - Parameters:
driver
-
-
-
Method Details
-
getDriver
public org.openqa.selenium.WebDriver getDriver() -
setDriver
public void setDriver(org.openqa.selenium.WebDriver driver) -
clickElementByXpath
clicks the first element specified by xPath- Parameters:
xpath
-
-
dragAndDropByXpath
clicks on the first element specified by the xPath and drags it offestX pixels horizontal and offsetY pixels vertical- Parameters:
xPath
-offsetX
-offsetY
-
-
assertAttributeByXpath
compares the Elements attribute-value to the assertion- Parameters:
attribute
-assertion
-xPath
-- Returns:
- true if the attribute has assertion as value
-
assertAttributeByXpath
compares the Elements attribute-value to the assertion- Parameters:
attribute
-assertion
-xPath
-- Returns:
- true if the attribute has assertion as value
-
assertElementByAttributePresent
checks if there is any Element in the dom got with the attribute that contains the value- Parameters:
attribute
-value
-- Returns:
- true if an element is found
-