Package com.snapfix.core
Class Common
java.lang.Object
com.snapfix.core.Common
public class Common
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Common()
-
Method Summary
Modifier and Type Method Description static org.openqa.selenium.WebElement
alertMessage(java.lang.String elementId, io.appium.java_client.android.AndroidDriver driver)
static void
buttonClick(org.openqa.selenium.WebElement elm)
static java.lang.String
getSystemDate()
static java.lang.String
getSystemDateAndTime()
static java.lang.String
getSystemDateAndTimeForScreenShot()
static java.lang.String
getSystemTime()
static java.lang.String
getTimeDifference(java.lang.String fromTime, java.lang.String toTime)
static java.lang.String
getTimeDifferenceWithMiliSecond(java.lang.String fromTime, java.lang.String toTime)
static void
isDisplayElement(boolean validate, java.lang.String value, io.appium.java_client.android.AndroidDriver driver)
static void
isDisplayElementByXpath(boolean validate, java.lang.String value, io.appium.java_client.android.AndroidDriver driver)
static boolean
isElementPresentBy(java.lang.String elementId, io.appium.java_client.android.AndroidDriver driver)
static boolean
isElementPresentByName(java.lang.String elementId, io.appium.java_client.android.AndroidDriver driver)
static boolean
isElementPresentByXpath(java.lang.String elementId, io.appium.java_client.android.AndroidDriver driver)
static void
permissionCheck(java.lang.String elm, io.appium.java_client.android.AndroidDriver driver)
static void
permissionDoubleCheckboxCheck(java.lang.String elm, java.lang.String elm1, io.appium.java_client.android.AndroidDriver driver)
static java.lang.String
RandomGenerator(int count)
static java.lang.String
RandomGeneratorNumeric(int count)
static void
takeSnapShot(org.openqa.selenium.WebDriver webdriver, java.lang.String fileWithPath)
static void
verifyFirstRecord(io.appium.java_client.android.AndroidDriver driver, java.lang.String value)
static void
verifyText(org.openqa.selenium.WebElement element, java.lang.String value)
static void
waitForElement(io.appium.java_client.android.AndroidDriver driver, org.openqa.selenium.By by, int timeoutInSeconds)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Common
public Common()
-
-
Method Details
-
isElementPresentBy
public static boolean isElementPresentBy(java.lang.String elementId, io.appium.java_client.android.AndroidDriver driver) -
isElementPresentByXpath
public static boolean isElementPresentByXpath(java.lang.String elementId, io.appium.java_client.android.AndroidDriver driver) -
isElementPresentByName
public static boolean isElementPresentByName(java.lang.String elementId, io.appium.java_client.android.AndroidDriver driver) -
buttonClick
public static void buttonClick(org.openqa.selenium.WebElement elm) throws java.lang.InterruptedException- Parameters:
elm
-- Throws:
java.lang.InterruptedException
-
verifyText
public static void verifyText(org.openqa.selenium.WebElement element, java.lang.String value)- Parameters:
element
-value
-
-
alertMessage
public static org.openqa.selenium.WebElement alertMessage(java.lang.String elementId, io.appium.java_client.android.AndroidDriver driver) -
isDisplayElement
public static void isDisplayElement(boolean validate, java.lang.String value, io.appium.java_client.android.AndroidDriver driver) -
isDisplayElementByXpath
public static void isDisplayElementByXpath(boolean validate, java.lang.String value, io.appium.java_client.android.AndroidDriver driver) -
waitForElement
public static void waitForElement(io.appium.java_client.android.AndroidDriver driver, org.openqa.selenium.By by, int timeoutInSeconds) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
RandomGenerator
public static java.lang.String RandomGenerator(int count) -
RandomGeneratorNumeric
public static java.lang.String RandomGeneratorNumeric(int count) -
permissionCheck
public static void permissionCheck(java.lang.String elm, io.appium.java_client.android.AndroidDriver driver) -
permissionDoubleCheckboxCheck
public static void permissionDoubleCheckboxCheck(java.lang.String elm, java.lang.String elm1, io.appium.java_client.android.AndroidDriver driver) -
verifyFirstRecord
public static void verifyFirstRecord(io.appium.java_client.android.AndroidDriver driver, java.lang.String value) -
getSystemDate
public static java.lang.String getSystemDate()- Returns:
-
getSystemTime
public static java.lang.String getSystemTime()- Returns:
-
getSystemDateAndTime
public static java.lang.String getSystemDateAndTime() -
getSystemDateAndTimeForScreenShot
public static java.lang.String getSystemDateAndTimeForScreenShot() -
getTimeDifference
public static java.lang.String getTimeDifference(java.lang.String fromTime, java.lang.String toTime) throws java.text.ParseException- Throws:
java.text.ParseException
-
getTimeDifferenceWithMiliSecond
public static java.lang.String getTimeDifferenceWithMiliSecond(java.lang.String fromTime, java.lang.String toTime) throws java.text.ParseException- Throws:
java.text.ParseException
-
takeSnapShot
public static void takeSnapShot(org.openqa.selenium.WebDriver webdriver, java.lang.String fileWithPath) throws java.lang.Exception- Throws:
java.lang.Exception
-