public interface ExtWebDriver
extends org.openqa.selenium.WebDriver
Modifier and Type | Interface and Description |
---|---|
static class |
ExtWebDriver.StaleWindowIdListException
StaleWindowIdListException will be thrown when the stored window ids
cannot be usefully compared with the current window ids
|
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
Modifier and Type | Method and Description |
---|---|
void |
back()
Simulates browser Back button
|
void |
cancelNativeDialog()
Clicks cancel on the open confirmation dialog attached to the current
window
|
void |
closeCurrentBrowser()
Closes the browser window, but does not kill IEDriverServer.exe, use this
if you changed browsers mid-session and want to close the window.
|
void |
confirmNativeDialog()
Clicks ok on the open alert dialog OR confirmation dialog attached to the
current window
|
void |
currentWindowMaximize()
Maximizes the current browser window
|
void |
eval(String javaScript)
Executes JavaScript
|
String |
evaluateXpath(String XPath)
Evaluates an XPath in JavaScript to return a string value based on the
resulting node(s) or XPath function results
|
void |
focus()
Request focus for the active window with the current WebDriver
|
void |
forward()
Simulates browser Forward button
|
String[] |
getAllWindowIds()
Retrieves the windowHandle IDs
|
String |
getBrowserName()
Retrieves the name of the browser currently being operated by the
webdriver
|
String |
getBrowserVersion()
Retrieves the version of the browser currently being operated by the
webdriver
|
Map<String,String> |
getGeneratedHtmlSource()
Retrieves current state of the DOM in HTML format for each of the
document's frames.
|
String |
getHtmlSource()
Returns the original HTML source of the current frame
|
long |
getMaxRequestTimeout()
Gets the timeout used by default when waiting on actions
|
String |
getNativeDialogText()
Retrieves the text of the open native dialog attached to the current
window
|
String |
getSessionId()
Gets the id of the current session
|
String |
getWindowId()
Returns the current window handle ID
|
org.openqa.selenium.WebDriver |
getWrappedDriver()
Gets the underlying WebDriver instance
|
int |
getXpathCount(String XPath)
Returns the count of nodes that would be returned by an XPath expression
|
boolean |
isFocusOnClick()
Indicates the current setting for setting window focus as part of a click
action
|
boolean |
isJavascriptClickMode()
Indicates the current setting for clicking on interactive elements
|
boolean |
isJavascriptTypeMode()
Indicates the current setting for entry of text in input fields
|
void |
open(String url)
Opens the browser
|
void |
refresh()
Reloads the current URL
|
void |
selectFrame(IElement iframeElement)
Selects a new frame from within the current frame
|
void |
selectLastFrame()
Selects the previously selected frame
|
String |
selectPopupWindow()
Sets the most recently opened browser window as the active windwo for the
current WebDriver.
|
void |
selectWindow(String windowId)
Sets the active window for the current WebDriver
|
void |
setClickMode(boolean useJavaScript)
Configures the use of JavaScript for clicking on interactive elements,
rather than relying on the native WebDriver methods
|
void |
setFocusOnClick(boolean doFocus)
One of several options to determine if the focus method should actually
focus
|
void |
setMaxRequestTimeout(String timeout)
Sets the maximum timeout value for actions
|
void |
setSessionId(String id)
Sets the current session to be used for all actions on ExtWebDdriver and
Widgets
|
void |
setTypeMode(boolean useJavaScript)
Configures the use of JavaScript for entry of input fields, rather than
relying on the native WebDriver methods
|
void |
setWrappedDriver(org.openqa.selenium.WebDriver wd)
Replaces the underlying WebDriver instance
|
void |
storeCurrentWindowIds()
Stores handles for all existing windows for later comparison
|
void |
unselectFrame()
Selects the top most frame of the current window
|
void |
windowScroll(int i,
int j)
Scrolls the current browser window to specific position
|
void |
windowScrollBy(int i,
int j)
Scrolls the current browser by specific amount
|
void setWrappedDriver(org.openqa.selenium.WebDriver wd)
wd
- the new WebDriver instancevoid setTypeMode(boolean useJavaScript)
useJavaScript
- true to enable the use of JavaScript, default is falseboolean isJavascriptTypeMode()
void setClickMode(boolean useJavaScript)
useJavaScript
- true to enable the use of JavaScript, default is falseboolean isJavascriptClickMode()
void setFocusOnClick(boolean doFocus)
doFocus
- true to force focus to the window as part of the click actionfocus()
boolean isFocusOnClick()
void setMaxRequestTimeout(String timeout)
timeout
- String representation millisecondsvoid open(String url)
url
- the web address for initial navigationvoid back()
void closeCurrentBrowser()
WebDriver.close()
void forward()
void refresh()
void storeCurrentWindowIds()
selectPopupWindow()
void focus()
void selectWindow(String windowId)
windowId
- the window id stringString selectPopupWindow() throws ExtWebDriver.StaleWindowIdListException
storeCurrentWindowIds()
was called before the window
opened and that only one window has opened since.ExtWebDriver.StaleWindowIdListException
- when the difference between the stored window ids and the
current window ids is more than one windowString[] getAllWindowIds()
String getWindowId()
void currentWindowMaximize()
void windowScroll(int i, int j)
i
- Horizontal positionj
- Vertical positionvoid windowScrollBy(int i, int j)
i
- Horizontal scroll amountj
- Vertical scroll amountvoid eval(String javaScript)
javaScript
- the script to executeString getHtmlSource()
Map<String,String> getGeneratedHtmlSource()
void selectFrame(IElement iframeElement) throws Exception
iframeElement
- the object representing the iframe element to selectException
void unselectFrame()
String evaluateXpath(String XPath) throws Exception
XPath
- the XPath to evaluateException
- if the evaluation of the XPath failsvoid confirmNativeDialog() throws Exception
Exception
- if the native dialog does not existvoid cancelNativeDialog()
String getNativeDialogText()
String getBrowserName()
String getBrowserVersion()
long getMaxRequestTimeout()
org.openqa.selenium.WebDriver getWrappedDriver()
int getXpathCount(String XPath)
XPath
- the XPAth expression to countvoid setSessionId(String id)
id
- the identifier for the sessionString getSessionId()
void selectLastFrame()
Copyright © 2018. All rights reserved.