Package testzeus.base
Class PageBase
java.lang.Object
testzeus.base.PageBase
- Direct Known Subclasses:
SFPageBase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected static org.openqa.selenium.WebDriverprotected Preferences -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcaptureText(org.openqa.selenium.WebElement element) org.openqa.selenium.WebElementchainedElementLocator(org.openqa.selenium.By parentelement, org.openqa.selenium.By childelement) voidvoidvoidclickOnElementUsingJavaScript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element) voidvoidcompareDateValue(String bdate, String adate) voidvoidenterValue(org.openqa.selenium.WebElement element, String value) voidenterValueTextArea(org.openqa.selenium.WebElement element, String value) voidenterValueUsingScript(org.openqa.selenium.WebElement element, String value) voidexplicitWait(List<org.openqa.selenium.WebElement> elmt, int timeOutInSeconds) voidexplicitWait(org.openqa.selenium.WebElement elmt, int timeOutInSeconds) voidexplicitWaitClickable(org.openqa.selenium.WebElement elmt, int timeOutInSeconds) voidexplicitWaitInMinutes(org.openqa.selenium.WebElement elmt, int timeOutInMinutes) voidforceClickElement(org.openqa.selenium.WebElement element) voidgetAllOptions(org.openqa.selenium.WebElement wb) getAttrValueForElement(org.openqa.selenium.WebElement element, String attrName) org.openqa.selenium.logging.LogEntriesgetCurrentDateWithCustomFormat(String format) getInnerText(org.openqa.selenium.WebElement elmt) chargetTextOfElement(org.openqa.selenium.WebElement element) getTimeDiffMinutes(String startdatetime, String enddatetime) org.openqa.selenium.WebDriverintvoidvoidhardwait(int timeinsec) booleanimageCompare(String actImagePath, String expImagePath) voidimplicitWait(int time) booleanbooleanisElementDisplayed(org.openqa.selenium.WebElement elmt) booleanisElementDisplayedWithTimeOut(org.openqa.selenium.WebElement elmt, int timeout) booleanisElementNotDisplayed(org.openqa.selenium.WebElement elmt) voidjavascriptExecutor(String jscode) voidjavascriptScrollToElement(org.openqa.selenium.WebElement webelement) voidmaximize()voidmouseOverElement(org.openqa.selenium.WebElement element) voidopenHomepage(String homepageURL) voidopenHomepageWithElement(String homepageURL, org.openqa.selenium.WebElement homePageElement) static StringvoidpageLoadWait(int time) static StringreadJsonFile(String jsonfilename, String path_key) voidreplaceValue(String key, String... values) voidsafeClick(org.openqa.selenium.WebElement element) booleanscroll_Page(org.openqa.selenium.WebElement webelement, int scrollPoints) voidscrollByCoordinate(int horizontal, int vertical) booleanscrollPage(org.openqa.selenium.WebElement webelement, int scrollPoints) voidvoidscrollToElement(org.openqa.selenium.WebElement element) voidscrollToElementAsync(org.openqa.selenium.WebElement element) voidscrollToElementHorizontally(org.openqa.selenium.WebElement element) voidscrollToElementInView(org.openqa.selenium.WebElement element) voidvoidscrollVerticallyInsideDiv(org.openqa.selenium.WebElement element) voidselectRadio(org.openqa.selenium.WebElement element) voidselectValue(org.openqa.selenium.WebElement ele, String value) voidselectValueByIndex(org.openqa.selenium.WebElement ele, int index) voidselectValueByVisibleText(org.openqa.selenium.WebElement wb, String visibletext) voidSFClick(org.openqa.selenium.WebElement we) voidsleep(long millis) voidvoiduploadFile(String filepath, org.openqa.selenium.WebElement element) voiduploadFileToWebElement(String filepath, org.openqa.selenium.WebElement element) booleanverifyElementEnabled(org.openqa.selenium.WebElement element) booleanverifyWebElement(org.openqa.selenium.WebElement element) voidwaitAndClick(org.openqa.selenium.WebElement element) voidwaitAndforceClickElement(org.openqa.selenium.WebElement element) booleanstatic org.openqa.selenium.BywebElementToByValue(org.openqa.selenium.WebElement we)
-
Field Details
-
driver
protected static org.openqa.selenium.WebDriver driver -
default_locale
-
prefs
-
-
Constructor Details
-
PageBase
public PageBase(org.openqa.selenium.WebDriver driver)
-
-
Method Details
-
getWebDriver
public org.openqa.selenium.WebDriver getWebDriver() -
OSDetector
-
openHomepage
-
openHomepageWithElement
public void openHomepageWithElement(String homepageURL, org.openqa.selenium.WebElement homePageElement) throws Exception - Throws:
Exception
-
getCurrentWindowHandle
-
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
-
isAlertOpen
public boolean isAlertOpen() -
replaceValue
-
getTextOfElement
-
mouseOverElement
public void mouseOverElement(org.openqa.selenium.WebElement element) -
getAttrValueForElement
-
scrollToElement
public void scrollToElement(org.openqa.selenium.WebElement element) -
javascriptExecutor
-
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
-
getCurrentDateInMMDDYYYY
-
getCurrentDateInMDDYYYY
-
getCurrentDateInYYYYMMDD
-
getTomorrowateInYYYYMMDD
-
getTomorrowDateInMDYYYY
-
getTomorrowDateInMDYYYYEST
-
getCurrentDateInMMDDYY
-
getCurrentDateTimeStamp
-
getCurrentTimeStamp
-
getCurrentDateWithCustomFormat
-
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
-
getWindowsCount
public int getWindowsCount() -
acceptAlert
- Throws:
InterruptedException
-
clickControlHome
public void clickControlHome() -
clickEscapeKey
public void clickEscapeKey() -
selectValueByVisibleText
-
getAllOptions
public void getAllOptions(org.openqa.selenium.WebElement wb) -
selectValueByIndex
public void selectValueByIndex(org.openqa.selenium.WebElement ele, int index) -
selectValue
-
enterValue
-
enterValueTextArea
-
enterValueUsingScript
-
selectRadio
public void selectRadio(org.openqa.selenium.WebElement element) -
captureText
-
safeClick
public void safeClick(org.openqa.selenium.WebElement element) -
takeScreenshot
-
maximize
public void maximize() -
imageCompare
-
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
-
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
- Throws:
InterruptedException
-
SFClick
public void SFClick(org.openqa.selenium.WebElement we) -
uploadFileToWebElement
-
getNumericValueFromString
-
clickOnElementUsingJavaScript
public void clickOnElementUsingJavaScript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement element) -
disablegpu
public void disablegpu() -
uploadFile
-
getCurrentTimeEST
-
getCurrentDateESTmddyyyy
-
gethmmTimeFromString
-
getTimeDiffMinutes
- Throws:
ParseException
-
scrollPage
public boolean scrollPage(org.openqa.selenium.WebElement webelement, int scrollPoints) -
compareDateValue
- Throws:
ParseException
-
hardwait
- Throws:
InterruptedException
-
readJsonFile
-