public class PageHelper extends Object
| Constructor and Description |
|---|
PageHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
acceptAlert()
accepts alert by selecting ok or cancel
|
void |
bringPageToFront()
brings current browser to front
|
void |
CloseAndReturn(String defaultWindow)
close the window And return to the defaultWindow
|
String |
currentWindow()
return the current window handle
|
void |
deleteAllCookies()
delete all cookies
|
void |
deleteCookieNamed(String name)
delete cookie named
|
String |
dimissAlert()
dismisses alert by selecting ok or cancel
|
String |
getAlertValue()
returns alert message value
|
String |
getClipboardData()
retrieves the clip board data
|
String |
getCurrentUrl()
returns the current url
|
String |
getPageSource()
gets page source
|
String |
getPageTitle()
returns the title of the page
|
void |
maximizePage()
maximizes web page
|
void |
navigateBack()
navigates back
|
void |
navigateForward()
navigate forward
|
void |
quitAllCurrentTestDrivers()
quits all drivers in the current test
|
void |
quitCurrentDriver()
quits the current web driver
|
void |
refreshPage()
reload page
|
void |
refreshPageSource()
gets page source
|
void |
setPageSize(int x,
int y)
sets page size
|
void |
switchDriver(org.openqa.selenium.WebDriver driver)
switch webdriver use for switching between different drivers
|
void |
switchIframe(EnhancedBy frame)
switches frame to frame specified
|
void |
switchToDefaultFrame()
switches to default frame
|
void |
switchToNewWindow(String defaultWindow)
switch to the new opened window
|
void |
switchToNextTab()
switch to next tab circles back to initial tab if it reaches the last tab
|
void |
switchToPreviousTab()
switch to previous tab circle back to the last tab
|
void |
switchToTab(int index)
switch to tab by index
|
static void |
switchWindowHandle(int index)
switch windows handle based on index
|
void |
swtichUrl(String url)
navigate to a different url
|
void |
verifyNumberOfTabs(int tabs)
switch to tab by index
|
void |
verifyTitle(String appTitle)
verify page title
|
public void maximizePage()
public void setPageSize(int x,
int y)
x - y - public void refreshPage()
public void switchIframe(EnhancedBy frame)
frame - public void switchToDefaultFrame()
public static void switchWindowHandle(int index)
index - public String dimissAlert()
alert - public String acceptAlert()
alert - public String getAlertValue()
public String currentWindow()
public void switchToNewWindow(String defaultWindow)
defaultWindow - public void CloseAndReturn(String defaultWindow)
defaultWindow - public void refreshPageSource()
public void verifyTitle(String appTitle)
appTitle - public void switchDriver(org.openqa.selenium.WebDriver driver)
driver - public void switchToNextTab()
public void switchToPreviousTab()
public void switchToTab(int index)
public void verifyNumberOfTabs(int tabs)
public String getPageTitle()
public String getCurrentUrl()
public String getPageSource()
public void navigateBack()
public void navigateForward()
public void deleteAllCookies()
public void deleteCookieNamed(String name)
name - public void bringPageToFront()
public void swtichUrl(String url)
url - public String getClipboardData()
public void quitCurrentDriver()
public void quitAllCurrentTestDrivers()
Copyright © 2019. All rights reserved.