com.opera.core.systems.testing.drivers
Class TestOperaDriver

java.lang.Object
  extended by org.openqa.selenium.remote.RemoteWebDriver
      extended by com.opera.core.systems.OperaDriver
          extended by com.opera.core.systems.testing.drivers.TestOperaDriver
All Implemented Interfaces:
org.openqa.selenium.HasCapabilities, org.openqa.selenium.HasInputDevices, org.openqa.selenium.internal.FindsByClassName, org.openqa.selenium.internal.FindsByCssSelector, org.openqa.selenium.internal.FindsById, org.openqa.selenium.internal.FindsByLinkText, org.openqa.selenium.internal.FindsByName, org.openqa.selenium.internal.FindsByTagName, org.openqa.selenium.internal.FindsByXPath, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebDriver

public class TestOperaDriver
extends OperaDriver

Provides access to the OperaRunner, so we can detect crashes.


Nested Class Summary
static class TestOperaDriver.ClosingStrategy
           
 class TestOperaDriver.TestOperaUtils
           
 
Nested classes/interfaces inherited from class com.opera.core.systems.OperaDriver
OperaDriver.OperaOptions, OperaDriver.OperaTimeouts, OperaDriver.OperaUtils, OperaDriver.PrivateData
 
Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When
 
Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
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
 
Field Summary
 
Fields inherited from class com.opera.core.systems.OperaDriver
objectIds, runner, settings
 
Constructor Summary
TestOperaDriver(org.openqa.selenium.Capabilities capabilities)
          Creates a new TestOperaDriver with the given capabilities.
TestOperaDriver(OperaSettings settings)
          Creates a new TestOperaDriver with the given settings.
 
Method Summary
 void closeAll()
          Closes all windows except the control window using the TestOperaDriver.ClosingStrategy.SWITCH_TO strategy.
 void closeAll(TestOperaDriver.ClosingStrategy strategy)
          Allows you to specifying the strategy for closing all windows (apart from the control window).
 org.openqa.selenium.Capabilities getCapabilities()
          Return the currently used set of capabilities.
 String getControlWindow()
          Get the window handle of the initial control window, that is, the first window that was opened.
static org.openqa.selenium.Capabilities getDefaultCapabilities()
           
 IOperaExec getExecService()
           
 OperaRunner getRunner()
          Provides access to OperaRunner which is used for monitoring the Opera process.
 ScopeServices getServices()
           
 OperaSettings getSettings()
           
 boolean isRunning()
           
 TestOperaDriver.TestOperaUtils utils()
          Gets the OperaDriver.OperaUtils interface which is used for accessing the browser's meta- and utility information, such as the operating system it's running on, its user agent string, &c.
 
Methods inherited from class com.opera.core.systems.OperaDriver
close, executeAsyncScript, executeScript, findElement, findElement, findElement, findElementByName, findElements, findElements, findElements, findElementsByName, get, get, getCurrentUrl, getKeyboard, getMouse, getOperaActionList, getPageSource, getScopeServices, getScreenshotAs, getScriptDebugger, getServicesList, getTitle, getWindowCount, getWindowHandle, getWindowHandles, implicitlyWaitFor, init, listFrames, manage, navigate, operaAction, preferences, processElements, quit, saveScreenshot, selftest, setUseOperaIdle, switchTo, waitForLoadToComplete
 
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver
execute, execute, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, getCommandExecutor, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getSessionId, log, setCommandExecutor, setElementConverter, setFileDetector, setFoundBy, setLogLevel, setSessionId, startClient, startSession, stopClient, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestOperaDriver

public TestOperaDriver(org.openqa.selenium.Capabilities capabilities)
Creates a new TestOperaDriver with the given capabilities.

Parameters:
capabilities - the set of capabilities to use

TestOperaDriver

public TestOperaDriver(OperaSettings settings)
Creates a new TestOperaDriver with the given settings.

Parameters:
settings - the settings to use
Method Detail

getRunner

public OperaRunner getRunner()
Provides access to OperaRunner which is used for monitoring the Opera process.

Returns:
instance of runner control interface for this driver instance

getSettings

public OperaSettings getSettings()

getCapabilities

public org.openqa.selenium.Capabilities getCapabilities()
Return the currently used set of capabilities.

Specified by:
getCapabilities in interface org.openqa.selenium.HasCapabilities
Overrides:
getCapabilities in class OperaDriver
Returns:
currently used capabilities

isRunning

public boolean isRunning()

getServices

public ScopeServices getServices()

getExecService

public IOperaExec getExecService()
Overrides:
getExecService in class OperaDriver

getControlWindow

public String getControlWindow()
Get the window handle of the initial control window, that is, the first window that was opened.

Returns:
window handle of control window

closeAll

public void closeAll()
Closes all windows except the control window using the TestOperaDriver.ClosingStrategy.SWITCH_TO strategy.


closeAll

public void closeAll(TestOperaDriver.ClosingStrategy strategy)
Allows you to specifying the strategy for closing all windows (apart from the control window). Windows can either be closed using a OperaDriver.switchTo() and OperaDriver.close() call, or by sending the action "Close all pages". The latter method does not guarantee that all windows are in fact closed. This method is failsafe, meaning that if there are no windows open it will not do anything.

Parameters:
strategy - the strategy to use for closing windows; either TestOperaDriver.ClosingStrategy.SWITCH_TO or TestOperaDriver.ClosingStrategy.ACTION

utils

public TestOperaDriver.TestOperaUtils utils()
Description copied from class: OperaDriver
Gets the OperaDriver.OperaUtils interface which is used for accessing the browser's meta- and utility information, such as the operating system it's running on, its user agent string, &c.

Overrides:
utils in class OperaDriver
Returns:
utility methods for Opera

getDefaultCapabilities

public static org.openqa.selenium.Capabilities getDefaultCapabilities()


Copyright © 2012. All Rights Reserved.