driver, webUXDriver
Constructor and Description |
---|
PageObject()
Constructor for non-entry point page.
|
PageObject(HtmlElement pageIdentifierElement)
Constructor for non-entry point page.
|
PageObject(HtmlElement pageIdentifierElement,
String url)
Base Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
assertCookiePresent(String name) |
protected void |
assertCurrentPage(boolean log) |
void |
assertHtmlSource(String text) |
void |
assertKeywordNotPresent(String text) |
void |
assertLocation(String urlPattern) |
void |
assertPageSectionPresent(WebPageSection pageSection) |
void |
assertTitle(String text) |
void |
capturePageSnapshot() |
void |
close() |
void |
dragAndDrop(HtmlElement element,
int offsetX,
int offsetY)
Drags an element a certain distance and then drops it.
|
String |
getBodyText() |
String |
getCanonicalURL() |
String |
getCookieByName(String name) |
org.openqa.selenium.WebElement |
getElement(org.openqa.selenium.By by,
String elementName) |
int |
getElementCount(HtmlElement element) |
String |
getElementSrc(org.openqa.selenium.By by,
String name) |
String |
getElementText(org.openqa.selenium.By by,
String name) |
String |
getElementUrl(org.openqa.selenium.By by,
String name) |
String |
getEval(String expression) |
String |
getHtmlFilePath() |
String |
getHtmlSavedToPath() |
String |
getHtmlSource() |
String |
getImageFilePath() |
String |
getJSErrors()
Get JS Error by JSErrorCollector which only supports Firefox browser.
|
String |
getLocation() |
String |
getPopupWindowName() |
int |
getTimeout() |
String |
getTitle() |
String |
getUrl() |
String |
getWindowHandle() |
void |
goBack() |
void |
goForward() |
boolean |
isCookiePresent(String name) |
boolean |
isFrame() |
void |
maximizeWindow() |
void |
refresh() |
void |
resizeTo(int width,
int height) |
void |
selectFrame(org.openqa.selenium.By by) |
void |
selectFrame(int index) |
void |
selectFrame(String locator) |
void |
selectNewWindow() |
void |
selectWindow() |
void |
selectWindow(int index) |
protected void |
setHtmlSavedToPath(String htmlSavedToPath) |
protected void |
setTitle(String title) |
protected void |
setUrl(String openUrl) |
void |
switchToDefaultContent() |
static void |
waitForGivenURLTermToAppear(String urlTerm,
int waitCount)
Waits for given URL term to appear when there is URL redirect
|
acceptAlert, assertAlertPresent, assertAlertText, assertAttribute, assertAttributeContains, assertAttributeMatches, assertCondition, assertConfirmationText, assertElementDisplayed, assertElementEnabled, assertElementNotEnabled, assertElementNotPresent, assertElementNotSelected, assertElementPresent, assertElementSelected, assertPromptText, assertTable, assertTableContains, assertTableMatches, assertTextNotPresent, assertTextNotPresentIgnoreCase, assertTextPresent, assertTextPresentIgnoreCase, cancelConfirmation, getAlert, getAlertText, getConfirmation, getDriver, getPrompt, isElementPresent, isTextPresent, selectWindow, switchToWindow, waitForElementChecked, waitForElementEditable, waitForElementPresent, waitForElementPresent, waitForElementPresent, waitForElementToBeVisible, waitForElementToDisappear, waitForPopup, waitForPopUp, waitForSeconds, waitForTextPresent, waitForTextPresent, waitForTextToDisappear, waitForTextToDisappear, waitForURLToChange
public PageObject() throws Exception
Exception
public PageObject(HtmlElement pageIdentifierElement) throws Exception
pageIdentifierElement
- Exception
public PageObject(HtmlElement pageIdentifierElement, String url) throws Exception
url
- Exception
public void assertCookiePresent(String name)
protected void assertCurrentPage(boolean log) throws NotCurrentPageException
assertCurrentPage
in class BasePage
NotCurrentPageException
public void assertHtmlSource(String text)
public void assertKeywordNotPresent(String text)
public void assertLocation(String urlPattern)
public void assertPageSectionPresent(WebPageSection pageSection)
public void assertTitle(String text)
public void capturePageSnapshot()
capturePageSnapshot
in class BasePage
public final void close() throws NotCurrentPageException
NotCurrentPageException
public void dragAndDrop(HtmlElement element, int offsetX, int offsetY)
element
- to dragAndDropoffsetX
- in pixels from the current location to which the element should be moved, e.g., 70offsetY
- in pixels from the current location to which the element should be moved, e.g., -300public String getBodyText()
getBodyText
in interface IPage
public final int getElementCount(HtmlElement element) throws CustomSeleniumTestsException
CustomSeleniumTestsException
public String getHtmlFilePath()
public String getHtmlSavedToPath()
getHtmlSavedToPath
in interface IPage
public String getHtmlSource()
getHtmlSource
in interface IPage
public String getImageFilePath()
public String getJSErrors()
getJSErrors
in interface IPage
public String getLocation()
getLocation
in interface IPage
public String getPopupWindowName()
public int getTimeout()
public String getUrl()
public String getCanonicalURL()
public String getWindowHandle()
public final void goBack()
public final void goForward()
public final boolean isCookiePresent(String name)
public final void maximizeWindow()
public final void refresh() throws NotCurrentPageException
NotCurrentPageException
public final void resizeTo(int width, int height)
public final void selectFrame(int index)
public final void selectFrame(org.openqa.selenium.By by)
selectFrame
in class BasePage
public final void selectFrame(String locator)
public final void selectWindow() throws NotCurrentPageException
NotCurrentPageException
public final void selectWindow(int index) throws NotCurrentPageException
NotCurrentPageException
public final void selectNewWindow() throws NotCurrentPageException
NotCurrentPageException
public static void waitForGivenURLTermToAppear(String urlTerm, int waitCount)
urlTerm
- waitCount
- protected void setHtmlSavedToPath(String htmlSavedToPath)
protected void setTitle(String title)
protected void setUrl(String openUrl)
public void switchToDefaultContent()
public org.openqa.selenium.WebElement getElement(org.openqa.selenium.By by, String elementName)
Copyright © 2016. All rights reserved.