Class WebDriverController

java.lang.Object
org.mycore.iview.tests.controller.WebDriverController
Direct Known Subclasses:
ImageViewerController, SideBarController, ToolBarController

public class WebDriverController extends Object
Author:
Sebastian Röher (basti890)
  • 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

      public void clickElementByXpath(String xpath)
      clicks the first element specified by xPath
      Parameters:
      xpath -
    • dragAndDropByXpath

      public void 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 vertical
      Parameters:
      xPath -
      offsetX -
      offsetY -
    • assertAttributeByXpath

      public boolean assertAttributeByXpath(String xPath, String attribute, boolean assertion)
      compares the Elements attribute-value to the assertion
      Parameters:
      attribute -
      assertion -
      xPath -
      Returns:
      true if the attribute has assertion as value
    • assertAttributeByXpath

      public boolean assertAttributeByXpath(String xPath, String attribute, String assertion)
      compares the Elements attribute-value to the assertion
      Parameters:
      attribute -
      assertion -
      xPath -
      Returns:
      true if the attribute has assertion as value
    • assertElementByAttributePresent

      public boolean assertElementByAttributePresent(String attribute, String value)
      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