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() |
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, waitForElementChecked, waitForElementEditable, waitForElementPresent, waitForElementPresent, waitForElementPresent, waitForElementToBeVisible, waitForElementToDisappear, waitForPopup, waitForPopUp, waitForSeconds, waitForTextPresent, waitForTextPresent, waitForTextToDisappearpublic PageObject()
throws Exception
Exceptionpublic PageObject(HtmlElement pageIdentifierElement) throws Exception
pageIdentifierElement - Exceptionpublic PageObject(HtmlElement pageIdentifierElement, String url) throws Exception
url - Exceptionpublic void assertCookiePresent(String name)
protected void assertCurrentPage(boolean log)
throws NotCurrentPageException
assertCurrentPage in class BasePageNotCurrentPageExceptionpublic 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 BasePagepublic final void close()
throws NotCurrentPageException
NotCurrentPageExceptionpublic 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 IPagepublic final int getElementCount(HtmlElement element) throws CustomSeleniumTestsException
CustomSeleniumTestsExceptionpublic String getHtmlFilePath()
public String getHtmlSavedToPath()
getHtmlSavedToPath in interface IPagepublic String getHtmlSource()
getHtmlSource in interface IPagepublic String getImageFilePath()
public String getJSErrors()
getJSErrors in interface IPagepublic String getLocation()
getLocation in interface IPagepublic 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
NotCurrentPageExceptionpublic 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 BasePagepublic final void selectFrame(String locator)
public final void selectWindow()
throws NotCurrentPageException
NotCurrentPageExceptionpublic final void selectWindow(int index)
throws NotCurrentPageException
NotCurrentPageExceptionpublic final void selectNewWindow()
throws NotCurrentPageException
NotCurrentPageExceptionprotected 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 © 2015. All rights reserved.