Package testzeus.base

Class PageBase

java.lang.Object
testzeus.base.PageBase
Direct Known Subclasses:
SFPageBase

public class PageBase extends Object
  • Field Details

    • driver

      protected static org.openqa.selenium.WebDriver driver
    • default_locale

      protected String default_locale
    • prefs

      protected Preferences prefs
  • Constructor Details

    • PageBase

      public PageBase(org.openqa.selenium.WebDriver driver)
  • Method Details

    • getWebDriver

      public org.openqa.selenium.WebDriver getWebDriver()
    • OSDetector

      public static String OSDetector()
    • openHomepage

      public void openHomepage(String homepageURL)
    • openHomepageWithElement

      public void openHomepageWithElement(String homepageURL, org.openqa.selenium.WebElement homePageElement) throws Exception
      Throws:
      Exception
    • getCurrentWindowHandle

      public String getCurrentWindowHandle()
    • getCurrentURL

      public String getCurrentURL()
    • forceClickElement

      public void forceClickElement(org.openqa.selenium.WebElement element)
    • verifyWebElement

      public boolean verifyWebElement(org.openqa.selenium.WebElement element)
    • waitAndClick

      public void waitAndClick(org.openqa.selenium.WebElement element)
    • verifyElementEnabled

      public boolean verifyElementEnabled(org.openqa.selenium.WebElement element)
    • refreshPage

      public void refreshPage()
    • closeCurrentBrowser

      public void closeCurrentBrowser()
    • handleIEError

      public void handleIEError()
    • sleep

      public void sleep(long millis)
    • explicitWait

      public void explicitWait(org.openqa.selenium.WebElement elmt, int timeOutInSeconds)
    • explicitWaitInMinutes

      public void explicitWaitInMinutes(org.openqa.selenium.WebElement elmt, int timeOutInMinutes)
    • explicitWaitClickable

      public void explicitWaitClickable(org.openqa.selenium.WebElement elmt, int timeOutInSeconds)
    • explicitWait

      public void explicitWait(List<org.openqa.selenium.WebElement> elmt, int timeOutInSeconds)
    • isAlertOpen

      public boolean isAlertOpen()
    • replaceValue

      public String replaceValue(String key, String... values)
    • getTextOfElement

      public String getTextOfElement(org.openqa.selenium.WebElement element)
    • mouseOverElement

      public void mouseOverElement(org.openqa.selenium.WebElement element)
    • getAttrValueForElement

      public String getAttrValueForElement(org.openqa.selenium.WebElement element, String attrName)
    • scrollToElement

      public void scrollToElement(org.openqa.selenium.WebElement element)
    • javascriptExecutor

      public void javascriptExecutor(String jscode)
    • scrollByCoordinate

      public void scrollByCoordinate(int horizontal, int vertical)
    • scrollToElementAsync

      public void scrollToElementAsync(org.openqa.selenium.WebElement element)
    • scrollToElementInView

      public void scrollToElementInView(org.openqa.selenium.WebElement element)
    • scrollToElementHorizontally

      public void scrollToElementHorizontally(org.openqa.selenium.WebElement element)
    • scrollVerticallyInsideDiv

      public void scrollVerticallyInsideDiv(org.openqa.selenium.WebElement element)
    • scroll_Page

      public boolean scroll_Page(org.openqa.selenium.WebElement webelement, int scrollPoints)
    • javascriptScrollToElement

      public void javascriptScrollToElement(org.openqa.selenium.WebElement webelement)
    • scrollToHeader

      public void scrollToHeader()
    • scrollToBottom

      public void scrollToBottom()
    • switchToNewWindow

      public void switchToNewWindow()
    • getCurrentDate

      public String getCurrentDate()
    • getCurrentDateInMMDDYYYY

      public String getCurrentDateInMMDDYYYY()
    • getCurrentDateInMDDYYYY

      public String getCurrentDateInMDDYYYY()
    • getCurrentDateInYYYYMMDD

      public String getCurrentDateInYYYYMMDD()
    • getTomorrowateInYYYYMMDD

      public String getTomorrowateInYYYYMMDD()
    • getTomorrowDateInMDYYYY

      public String getTomorrowDateInMDYYYY()
    • getTomorrowDateInMDYYYYEST

      public String getTomorrowDateInMDYYYYEST()
    • getCurrentDateInMMDDYY

      public String getCurrentDateInMMDDYY()
    • getCurrentDateTimeStamp

      public String getCurrentDateTimeStamp()
    • getCurrentTimeStamp

      public String getCurrentTimeStamp()
    • getCurrentDateWithCustomFormat

      public String getCurrentDateWithCustomFormat(String format)
    • isElementDisplayed

      public boolean isElementDisplayed(org.openqa.selenium.WebElement elmt)
    • isElementNotDisplayed

      public boolean isElementNotDisplayed(org.openqa.selenium.WebElement elmt)
    • isElementDisplayedWithTimeOut

      public boolean isElementDisplayedWithTimeOut(org.openqa.selenium.WebElement elmt, int timeout)
    • getInnerText

      public String getInnerText(org.openqa.selenium.WebElement elmt)
    • getWindowsCount

      public int getWindowsCount()
    • acceptAlert

      public void acceptAlert() throws InterruptedException
      Throws:
      InterruptedException
    • clickControlHome

      public void clickControlHome()
    • clickEscapeKey

      public void clickEscapeKey()
    • selectValueByVisibleText

      public void selectValueByVisibleText(org.openqa.selenium.WebElement wb, String visibletext)
    • getAllOptions

      public void getAllOptions(org.openqa.selenium.WebElement wb)
    • selectValueByIndex

      public void selectValueByIndex(org.openqa.selenium.WebElement ele, int index)
    • selectValue

      public void selectValue(org.openqa.selenium.WebElement ele, String value)
    • enterValue

      public void enterValue(org.openqa.selenium.WebElement element, String value)
    • enterValueTextArea

      public void enterValueTextArea(org.openqa.selenium.WebElement element, String value)
    • enterValueUsingScript

      public void enterValueUsingScript(org.openqa.selenium.WebElement element, String value)
    • selectRadio

      public void selectRadio(org.openqa.selenium.WebElement element)
    • captureText

      public String captureText(org.openqa.selenium.WebElement element)
    • safeClick

      public void safeClick(org.openqa.selenium.WebElement element)
    • takeScreenshot

      public File takeScreenshot()
    • maximize

      public void maximize()
    • imageCompare

      public boolean imageCompare(String actImagePath, String expImagePath)
    • pageLoadWait

      public void pageLoadWait(int time)
    • waitAndforceClickElement

      public void waitAndforceClickElement(org.openqa.selenium.WebElement element)
    • getConsoleLogEntriesChromeBrowser

      public org.openqa.selenium.logging.LogEntries getConsoleLogEntriesChromeBrowser()
    • waitForJSandJQueryToLoad

      public boolean waitForJSandJQueryToLoad()
    • implicitWait

      public void implicitWait(int time)
    • getCurrentDateESTmdyyyy

      public String getCurrentDateESTmdyyyy()
    • webElementToByValue

      public static org.openqa.selenium.By webElementToByValue(org.openqa.selenium.WebElement we)
    • chainedElementLocator

      public org.openqa.selenium.WebElement chainedElementLocator(org.openqa.selenium.By parentelement, org.openqa.selenium.By childelement)
    • browserback

      public void browserback() throws InterruptedException
      Throws:
      InterruptedException
    • SFClick

      public void SFClick(org.openqa.selenium.WebElement we)
    • uploadFileToWebElement

      public void uploadFileToWebElement(String filepath, org.openqa.selenium.WebElement element)
    • getNumericValueFromString

      public char getNumericValueFromString(String text)
    • clickOnElementUsingJavaScript

      public void clickOnElementUsingJavaScript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element)
    • disablegpu

      public void disablegpu()
    • uploadFile

      public void uploadFile(String filepath, org.openqa.selenium.WebElement element)
    • getCurrentTimeEST

      public String getCurrentTimeEST()
    • getCurrentDateESTmddyyyy

      public String getCurrentDateESTmddyyyy()
    • gethmmTimeFromString

      public LocalTime gethmmTimeFromString(String str)
    • getTimeDiffMinutes

      public String getTimeDiffMinutes(String startdatetime, String enddatetime) throws ParseException
      Throws:
      ParseException
    • scrollPage

      public boolean scrollPage(org.openqa.selenium.WebElement webelement, int scrollPoints)
    • compareDateValue

      public void compareDateValue(String bdate, String adate) throws ParseException
      Throws:
      ParseException
    • hardwait

      public void hardwait(int timeinsec) throws InterruptedException
      Throws:
      InterruptedException
    • readJsonFile

      public static String readJsonFile(String jsonfilename, String path_key)