Class DriverLegacy


  • public class DriverLegacy
    extends Object
    • Constructor Detail

      • DriverLegacy

        public DriverLegacy()
    • Method Detail

      • getEnhancedElement

        public static EnhancedBy getEnhancedElement​(org.openqa.selenium.WebElement target)
        uses WebElement to interact with Autonomx Helpers This also means using helpers with index is not feasible
        Parameters:
        target -
        Returns:
      • getEnhancedElement

        public static EnhancedBy getEnhancedElement​(List<org.openqa.selenium.WebElement> targets)
      • getLocator

        protected static List<String[]> getLocator​(org.openqa.selenium.WebElement element)
        retrieves locator values from a webElement
        Parameters:
        element -
        Returns:
      • getLocatorName

        public static String getLocatorName​(org.openqa.selenium.WebElement element)
        attempts to get the name of the webElement locator
        Parameters:
        element -
        Returns:
      • getLocatorBy

        public static List<org.openqa.selenium.By> getLocatorBy​(org.openqa.selenium.WebElement element)
        Deprecated
        Parameters:
        element -
        Returns:
      • getByValueFromWebElement

        public static Object getByValueFromWebElement​(org.openqa.selenium.WebElement element)
        Deprecated returns the by value string from the web element, containing by value and locator value as object example: By.all({By.id: email2,By.id: email,By.id: email3}) or By.chained({By.all({By.all({By.id: email2,By.id: email,By.id: email3}))}
        Parameters:
        element -
        Returns:
      • getLocatorThroughParsing

        public static String getLocatorThroughParsing​(String element)
        Deprecated attempt to get the locator from WebElement through parsing the toString()
        Parameters:
        element -
        Returns:
      • getLocatorThroughParsing2

        public static List<String[]> getLocatorThroughParsing2​(String element)
        Deprecated
        Parameters:
        element -
        Returns:
      • getLocators

        public static List<String[]> getLocators​(String element)
        Deprecated eg. "By.xpath: //android.widget.Button[contains(@text,, 'Continue')],AppiumBy.id: com.telus.mywifi:id/button_continue"
        Parameters:
        element -
        Returns:
      • setDriver

        public static void setDriver​(org.openqa.selenium.WebDriver driver)
        set the webDriver from webDriver or mobileDriver without relying on global flag
      • setDriver

        public static void setDriver​(org.openqa.selenium.WebDriver driver,
                                     boolean isPropertyDisabled,
                                     int timeoutSec,
                                     int implicitSec)
      • setEnhancedElement

        protected static EnhancedBy setEnhancedElement​(List<String[]> locators)
        Deprecated
        Parameters:
        locators -
        Returns: