public class QAFExtendedWebDriver extends org.openqa.selenium.remote.RemoteWebDriver implements QAFWebDriver, QAFWebDriverCommandListener
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.Whenorg.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 | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
QAFExtendedWebDriver() |
QAFExtendedWebDriver(org.openqa.selenium.remote.CommandExecutor cmdExecutor,
org.openqa.selenium.Capabilities capabilities,
WebDriverCommandLogger reporter) |
QAFExtendedWebDriver(java.net.URL url,
org.openqa.selenium.Capabilities capabilities) |
QAFExtendedWebDriver(java.net.URL url,
org.openqa.selenium.Capabilities capabilities,
WebDriverCommandLogger reporter) |
QAFExtendedWebDriver(org.openqa.selenium.WebDriver driver) |
QAFExtendedWebDriver(org.openqa.selenium.WebDriver driver,
WebDriverCommandLogger reporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCommand(QAFExtendedWebDriver driver,
CommandTracker commandTracker) |
void |
assertCurrentUrl(StringMatcher text,
long... timeout) |
void |
assertNoOfWindows(int count,
long... timeout) |
void |
assertTitle(StringMatcher text,
long... timeout) |
void |
beforeCommand(QAFExtendedWebDriver driver,
CommandTracker commandTracker)
This can be used as intercepter.
|
void |
beforeInitialize(org.openqa.selenium.Capabilities desiredCapabilities)
Here you can specify additional desired capabilities for the driver.
|
QAFExtendedWebElement |
createElement(org.openqa.selenium.By by) |
QAFExtendedWebElement |
createElement(java.lang.String locator) |
protected org.openqa.selenium.remote.Response |
execute(org.openqa.selenium.remote.CommandPayload payload) |
protected org.openqa.selenium.remote.Response |
execute(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters) |
java.lang.Object |
executeAsyncScript(java.lang.String script,
java.lang.Object... args) |
java.lang.Object |
executeScript(java.lang.String script,
java.lang.Object... args) |
protected org.openqa.selenium.remote.Response |
executeWitoutLog(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters) |
<T> T |
extractScreenShot(org.openqa.selenium.WebDriverException e,
org.openqa.selenium.OutputType<T> target) |
QAFExtendedWebElement |
findElement(org.openqa.selenium.By by) |
QAFWebElement |
findElement(java.lang.String locator) |
QAFExtendedWebElement |
findElementByCustomStretegy(java.lang.String stetegy,
java.lang.String loc) |
QAFExtendedWebElement |
findElementBySizzleCss(java.lang.String using)
Under evaluation only
|
java.util.List<QAFWebElement> |
findElements(java.lang.String loc) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByCustomStretegy(java.lang.String stetegy,
java.lang.String loc) |
java.util.List<QAFExtendedWebElement> |
findElementsBySizzleCss(java.lang.String using)
Under evaluation only
|
org.openqa.selenium.Alert |
getAlert() |
org.openqa.selenium.Capabilities |
getCapabilities() |
<T> T |
getCapabilityImpl()
This method is useful to extract underlying driver specific interface
implementation from the driver object.
|
java.util.List<QAFWebElement> |
getElements(org.openqa.selenium.By by) |
protected WebDriverCommandLogger |
getReporter() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> target) |
org.openqa.selenium.interactions.TouchScreen |
getTouchScreen() |
org.openqa.selenium.WebDriver |
getUnderLayingDriver() |
void |
load(QAFExtendedWebElement... elements) |
void |
onFailure(QAFExtendedWebDriver driver,
CommandTracker commandTracker)
This can be used to propagate exception.
|
void |
onInitializationFailure(org.openqa.selenium.Capabilities desiredCapabilities,
java.lang.Throwable t) |
void |
onInitialize(QAFExtendedWebDriver driver)
this method will be called when new driver instance is created
|
void |
registerListeners(QAFWebDriverCommandListener listener) |
protected void |
report(java.lang.String op,
boolean outcome,
java.lang.Object... args) |
void |
setReporter(WebDriverCommandLogger reporter) |
void |
stop() |
java.lang.String |
takeScreenShot() |
void |
updateSessionId() |
boolean |
verifyCurrentUrl(StringMatcher text,
long... timeout) |
boolean |
verifyNoOfWindows(int count,
long... timeout) |
boolean |
verifyTitle(StringMatcher text,
long... timeout) |
void |
waitForAjax(JsToolkit toolkit,
long... timeout) |
void |
waitForAjax(long... timeout) |
void |
waitForAllElementPresent(QAFWebElement... elements) |
void |
waitForAllElementVisible(QAFWebElement... elements) |
void |
waitForAnyElementPresent(QAFWebElement... elements) |
void |
waitForAnyElementVisible(QAFWebElement... elements) |
void |
waitForCurrentUrl(StringMatcher matcher,
long... timeout) |
void |
waitForNoOfWindows(int count,
long... timeout) |
void |
waitForWindowTitle(StringMatcher titlematcher,
long... timeout) |
close, execute, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, get, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getKeyboard, getMouse, getPageSource, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, quit, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, startClient, startClient, startSession, stopClient, stopClient, switchTo, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetKeyboard, getMousepublic QAFExtendedWebDriver(java.net.URL url,
org.openqa.selenium.Capabilities capabilities)
public QAFExtendedWebDriver(org.openqa.selenium.WebDriver driver)
public QAFExtendedWebDriver(java.net.URL url,
org.openqa.selenium.Capabilities capabilities,
WebDriverCommandLogger reporter)
public QAFExtendedWebDriver(org.openqa.selenium.remote.CommandExecutor cmdExecutor,
org.openqa.selenium.Capabilities capabilities,
WebDriverCommandLogger reporter)
public QAFExtendedWebDriver()
public QAFExtendedWebDriver(org.openqa.selenium.WebDriver driver,
WebDriverCommandLogger reporter)
public org.openqa.selenium.Capabilities getCapabilities()
getCapabilities in interface org.openqa.selenium.HasCapabilitiesgetCapabilities in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebDriver getUnderLayingDriver()
protected WebDriverCommandLogger getReporter()
public void setReporter(WebDriverCommandLogger reporter)
public QAFExtendedWebElement findElement(org.openqa.selenium.By by)
findElement in interface QAFWebDriverfindElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebDriverfindElement in class org.openqa.selenium.remote.RemoteWebDriverpublic QAFWebElement findElement(java.lang.String locator)
findElement in interface QAFWebDriverlocator - - selenium 1 type locator for example "id=eleid", "name=eleName"
etc...public java.util.List<QAFWebElement> findElements(java.lang.String loc)
findElements in interface QAFWebDriverpublic QAFExtendedWebElement createElement(org.openqa.selenium.By by)
public QAFExtendedWebElement createElement(java.lang.String locator)
public java.util.List<QAFWebElement> getElements(org.openqa.selenium.By by)
getElements in interface QAFWebDriverpublic void load(QAFExtendedWebElement... elements)
protected org.openqa.selenium.remote.Response execute(org.openqa.selenium.remote.CommandPayload payload)
protected org.openqa.selenium.remote.Response execute(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters)
execute in class org.openqa.selenium.remote.RemoteWebDriverprotected org.openqa.selenium.remote.Response executeWitoutLog(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters)
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target)
throws org.openqa.selenium.WebDriverException
getScreenshotAs in interface org.openqa.selenium.TakesScreenshotgetScreenshotAs in class org.openqa.selenium.remote.RemoteWebDriverorg.openqa.selenium.WebDriverExceptionpublic <T> T extractScreenShot(org.openqa.selenium.WebDriverException e,
org.openqa.selenium.OutputType<T> target)
public org.openqa.selenium.Alert getAlert()
public void afterCommand(QAFExtendedWebDriver driver, CommandTracker commandTracker)
afterCommand in interface QAFWebDriverCommandListenerpublic void updateSessionId()
public void beforeCommand(QAFExtendedWebDriver driver, CommandTracker commandTracker)
QAFWebDriverCommandListenerCommandTracker.setResponce(Response)beforeCommand in interface QAFWebDriverCommandListenerpublic void onFailure(QAFExtendedWebDriver driver, CommandTracker commandTracker)
QAFWebDriverCommandListenerCommandTracker.getStage()onFailure in interface QAFWebDriverCommandListenerpublic void onInitialize(QAFExtendedWebDriver driver)
QAFWebDriverCommandListeneronInitialize in interface QAFWebDriverCommandListenerpublic void onInitializationFailure(org.openqa.selenium.Capabilities desiredCapabilities,
java.lang.Throwable t)
onInitializationFailure in interface QAFWebDriverCommandListenerpublic void registerListeners(QAFWebDriverCommandListener listener)
public QAFExtendedWebElement findElementBySizzleCss(java.lang.String using)
using - public java.util.List<QAFExtendedWebElement> findElementsBySizzleCss(java.lang.String using)
using - public org.openqa.selenium.interactions.TouchScreen getTouchScreen()
getTouchScreen in interface QAFWebDriverpublic java.lang.String takeScreenShot()
takeScreenShot in interface UiDriverpublic void waitForAjax(JsToolkit toolkit, long... timeout)
waitForAjax in interface QAFWebDriverpublic void waitForAjax(long... timeout)
waitForAjax in interface QAFWebDriverpublic void waitForAnyElementPresent(QAFWebElement... elements)
waitForAnyElementPresent in interface QAFWebDriverpublic void waitForAllElementPresent(QAFWebElement... elements)
waitForAllElementPresent in interface QAFWebDriverpublic void waitForAnyElementVisible(QAFWebElement... elements)
waitForAnyElementVisible in interface QAFWebDriverpublic void waitForAllElementVisible(QAFWebElement... elements)
waitForAllElementVisible in interface QAFWebDriverpublic void waitForWindowTitle(StringMatcher titlematcher, long... timeout)
waitForWindowTitle in interface QAFWebDriverpublic void waitForCurrentUrl(StringMatcher matcher, long... timeout)
waitForCurrentUrl in interface QAFWebDriverpublic void waitForNoOfWindows(int count,
long... timeout)
waitForNoOfWindows in interface QAFWebDriverpublic boolean verifyTitle(StringMatcher text, long... timeout)
verifyTitle in interface QAFWebDriverpublic boolean verifyCurrentUrl(StringMatcher text, long... timeout)
verifyCurrentUrl in interface QAFWebDriverpublic boolean verifyNoOfWindows(int count,
long... timeout)
verifyNoOfWindows in interface QAFWebDriverpublic void assertTitle(StringMatcher text, long... timeout)
assertTitle in interface QAFWebDriverpublic void assertCurrentUrl(StringMatcher text, long... timeout)
assertCurrentUrl in interface QAFWebDriverpublic void assertNoOfWindows(int count,
long... timeout)
protected void report(java.lang.String op,
boolean outcome,
java.lang.Object... args)
public void beforeInitialize(org.openqa.selenium.Capabilities desiredCapabilities)
QAFWebDriverCommandListenerbeforeInitialize in interface QAFWebDriverCommandListenerpublic <T> T getCapabilityImpl()
Rotatable rotatable = driver.getCapabilityImpl();
rotatable.rotate(ScreenOrientation.LANDSCAPE);
public QAFExtendedWebElement findElementByCustomStretegy(java.lang.String stetegy, java.lang.String loc)
findElementByCustomStretegy in interface FindsByCustomStretegypublic java.util.List<org.openqa.selenium.WebElement> findElementsByCustomStretegy(java.lang.String stetegy,
java.lang.String loc)
findElementsByCustomStretegy in interface FindsByCustomStretegypublic java.lang.Object executeScript(java.lang.String script,
java.lang.Object... args)
executeScript in interface org.openqa.selenium.JavascriptExecutorexecuteScript in class org.openqa.selenium.remote.RemoteWebDriverpublic java.lang.Object executeAsyncScript(java.lang.String script,
java.lang.Object... args)
executeAsyncScript in interface org.openqa.selenium.JavascriptExecutorexecuteAsyncScript in class org.openqa.selenium.remote.RemoteWebDriverCopyright © 2000 Infostretch Corp.