Package core.helpers.legacy
Class DriverLegacy
- java.lang.Object
-
- core.helpers.legacy.DriverLegacy
-
public class DriverLegacy extends Object
-
-
Constructor Summary
Constructors Constructor Description DriverLegacy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectgetByValueFromWebElement(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}))}static EnhancedBygetEnhancedElement(List<org.openqa.selenium.WebElement> targets)static EnhancedBygetEnhancedElement(org.openqa.selenium.WebElement target)uses WebElement to interact with Autonomx Helpers This also means using helpers with index is not feasibleprotected static List<String[]>getLocator(org.openqa.selenium.WebElement element)retrieves locator values from a webElementstatic List<org.openqa.selenium.By>getLocatorBy(org.openqa.selenium.WebElement element)Deprecatedstatic StringgetLocatorName(org.openqa.selenium.WebElement element)attempts to get the name of the webElement locatorstatic List<String[]>getLocators(String element)Deprecated eg.static StringgetLocatorThroughParsing(String element)Deprecated attempt to get the locator from WebElement through parsing the toString()static List<String[]>getLocatorThroughParsing2(String element)Deprecatedstatic voidsetDriver(org.openqa.selenium.WebDriver driver)set the webDriver from webDriver or mobileDriver without relying on global flagstatic voidsetDriver(org.openqa.selenium.WebDriver driver, boolean isPropertyDisabled, int timeoutSec, int implicitSec)protected static EnhancedBysetEnhancedElement(List<String[]> locators)Deprecated
-
-
-
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:
-
-