Class ObjectUtils

java.lang.Object
com.anhtester.utils.ObjectUtils

public class ObjectUtils extends Object
  • Constructor Details

    • ObjectUtils

      public ObjectUtils()
  • Method Details

    • getByFromWebElement

      public static org.openqa.selenium.By getByFromWebElement(org.openqa.selenium.WebElement element)
    • getByLocatorFromString

      public static org.openqa.selenium.By getByLocatorFromString(String locatorToString)
    • getByLocatorFromConfig

      public static org.openqa.selenium.By getByLocatorFromConfig(String elementName)
    • getXpathValue

      public static String getXpathValue(String elementName)
    • getXpathDynamic

      public static String getXpathDynamic(String xpath, Object... value)
      Receives a wildcard string, replace the wildcard with the value and return to the caller
      Parameters:
      xpath - Xpath with wildcard string
      value - multi value to be replaced in place of wildcard VD: ObjectUtils.getXpathDynamic("//button[normalize-space()='%s']//div[%d]//span[%d]", "Login", 2, 10);
      Returns:
      dynamic xpath string