|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openqa.selenium.remote.RemoteWebDriver
com.opera.core.systems.OperaDriver
public class OperaDriver
OperaDriver is an implementation of the WebDriver interface that allows you to drive the Opera web browser. The driver uses the Scope protocol to communicate with Opera directly from Java. The implementation is vendor-supported and developed by Opera Software and volunteers.
| Nested Class Summary | |
|---|---|
class |
OperaDriver.OperaOptions
|
static class |
OperaDriver.OperaTimeouts
|
class |
OperaDriver.OperaUtils
Interface for accessing the browser's meta- and utility information. |
static class |
OperaDriver.PrivateData
Different types of data stored by Opera. |
| 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 | |
|---|---|
protected Set<Integer> |
objectIds
|
protected OperaRunner |
runner
|
protected OperaSettings |
settings
|
| Constructor Summary | |
|---|---|
OperaDriver()
Constructor that starts Opera with the default set of capabilities. |
|
OperaDriver(org.openqa.selenium.Capabilities capabilities)
Starts Opera with the given set of desired capabilities. |
|
OperaDriver(OperaProfile profile)
Starts Opera with the given profile. |
|
OperaDriver(OperaSettings s)
Starts Opera with the given settings. |
|
| Method Summary | ||
|---|---|---|
void |
close()
|
|
Object |
executeAsyncScript(String script,
Object... args)
|
|
Object |
executeScript(String script,
Object... args)
|
|
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by)
|
|
protected org.openqa.selenium.WebElement |
findElement(String by,
String using)
|
|
protected org.openqa.selenium.WebElement |
findElement(String by,
String using,
OperaWebElement el)
Find a single element using the selenium atoms. |
|
org.openqa.selenium.WebElement |
findElementByName(String using)
|
|
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by)
|
|
protected List<org.openqa.selenium.WebElement> |
findElements(String by,
String using)
|
|
protected List<org.openqa.selenium.WebElement> |
findElements(String by,
String using,
OperaWebElement el)
|
|
List<org.openqa.selenium.WebElement> |
findElementsByName(String using)
|
|
void |
get(String url)
|
|
int |
get(String url,
long timeout)
|
|
org.openqa.selenium.Capabilities |
getCapabilities()
|
|
String |
getCurrentUrl()
|
|
protected IOperaExec |
getExecService()
|
|
org.openqa.selenium.Keyboard |
getKeyboard()
|
|
org.openqa.selenium.Mouse |
getMouse()
|
|
Set<String> |
getOperaActionList()
Deprecated. |
|
String |
getPageSource()
Get the source of the last loaded page. |
|
protected ScopeServices |
getScopeServices()
|
|
|
getScreenshotAs(org.openqa.selenium.OutputType<X> target)
|
|
protected IEcmaScriptDebugger |
getScriptDebugger()
|
|
protected Map<String,String> |
getServicesList()
|
|
String |
getTitle()
|
|
int |
getWindowCount()
|
|
String |
getWindowHandle()
|
|
Set<String> |
getWindowHandles()
|
|
protected
|
implicitlyWaitFor(Callable<X> condition)
Implicitly wait for an element to become visible. |
|
protected void |
init()
Initialize required Scope services. |
|
List<String> |
listFrames()
Gets a list of frames. |
|
OperaDriver.OperaOptions |
manage()
|
|
org.openqa.selenium.WebDriver.Navigation |
navigate()
|
|
void |
operaAction(String using,
String... params)
Deprecated. |
|
OperaScopePreferences |
preferences()
Returns an interface for manipulating the preferences in the currently attached Opera programmatically. |
|
protected List<org.openqa.selenium.WebElement> |
processElements(Integer id)
|
|
void |
quit()
|
|
ScreenShotReply |
saveScreenshot(long timeout,
String... hashes)
Takes a screenshot of the whole screen, including areas outside of the Opera browser window. |
|
String |
selftest(List<String> modules,
long timeout)
Executes selftests for the given module. |
|
protected void |
setUseOperaIdle(boolean enabled)
Enable or disable idle functionality during runtime. |
|
org.openqa.selenium.WebDriver.TargetLocator |
switchTo()
|
|
OperaDriver.OperaUtils |
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. |
|
protected void |
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 |
| Field Detail |
|---|
protected final OperaSettings settings
protected OperaRunner runner
protected Set<Integer> objectIds
| Constructor Detail |
|---|
public OperaDriver()
public OperaDriver(OperaProfile profile)
profile - the profile to start Opera withpublic OperaDriver(org.openqa.selenium.Capabilities capabilities)
capabilities - a DesiredCapabilities object containing various settings for the
driver and the browserpublic OperaDriver(OperaSettings s)
s - Opera specific settings| Method Detail |
|---|
protected void init()
protected Map<String,String> getServicesList()
public org.openqa.selenium.Capabilities getCapabilities()
getCapabilities in interface org.openqa.selenium.HasCapabilitiesgetCapabilities in class org.openqa.selenium.remote.RemoteWebDriverpublic void quit()
quit in interface org.openqa.selenium.WebDriverquit in class org.openqa.selenium.remote.RemoteWebDriverpublic void get(String url)
get in interface org.openqa.selenium.WebDriverget in class org.openqa.selenium.remote.RemoteWebDriver
public int get(String url,
long timeout)
public String getCurrentUrl()
getCurrentUrl in interface org.openqa.selenium.WebDrivergetCurrentUrl in class org.openqa.selenium.remote.RemoteWebDriverpublic void close()
close in interface org.openqa.selenium.WebDriverclose in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebDriverfindElement in class org.openqa.selenium.remote.RemoteWebDriver
protected org.openqa.selenium.WebElement findElement(String by,
String using)
findElement in class org.openqa.selenium.remote.RemoteWebDriver
protected org.openqa.selenium.WebElement findElement(String by,
String using,
OperaWebElement el)
by - how to find the element, strings defined in RemoteWebDriverusing - the value to use to find the elementel - the element to search within
public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebDriverfindElements in class org.openqa.selenium.remote.RemoteWebDriver
protected List<org.openqa.selenium.WebElement> findElements(String by,
String using)
findElements in class org.openqa.selenium.remote.RemoteWebDriver
protected List<org.openqa.selenium.WebElement> findElements(String by,
String using,
OperaWebElement el)
public String getPageSource()
getPageSource in interface org.openqa.selenium.WebDrivergetPageSource in class org.openqa.selenium.remote.RemoteWebDriverpublic String getTitle()
getTitle in interface org.openqa.selenium.WebDrivergetTitle in class org.openqa.selenium.remote.RemoteWebDriverpublic String getWindowHandle()
getWindowHandle in interface org.openqa.selenium.WebDrivergetWindowHandle in class org.openqa.selenium.remote.RemoteWebDriverpublic Set<String> getWindowHandles()
getWindowHandles in interface org.openqa.selenium.WebDrivergetWindowHandles in class org.openqa.selenium.remote.RemoteWebDriverpublic int getWindowCount()
public org.openqa.selenium.WebDriver.TargetLocator switchTo()
switchTo in interface org.openqa.selenium.WebDriverswitchTo in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementByName(String using)
findElementByName in interface org.openqa.selenium.internal.FindsByNamefindElementByName in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsByName(String using)
findElementsByName in interface org.openqa.selenium.internal.FindsByNamefindElementsByName in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebDriver.Navigation navigate()
navigate in interface org.openqa.selenium.WebDrivernavigate in class org.openqa.selenium.remote.RemoteWebDriverpublic OperaDriver.OperaOptions manage()
manage in interface org.openqa.selenium.WebDrivermanage in class org.openqa.selenium.remote.RemoteWebDriver
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target)
throws org.openqa.selenium.WebDriverException
getScreenshotAs in interface org.openqa.selenium.TakesScreenshotorg.openqa.selenium.WebDriverException
public Object executeScript(String script,
Object... args)
executeScript in interface org.openqa.selenium.JavascriptExecutorexecuteScript in class org.openqa.selenium.remote.RemoteWebDriver
public Object executeAsyncScript(String script,
Object... args)
executeAsyncScript in interface org.openqa.selenium.JavascriptExecutorexecuteAsyncScript in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.Keyboard getKeyboard()
getKeyboard in interface org.openqa.selenium.HasInputDevicesgetKeyboard in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.Mouse getMouse()
getMouse in interface org.openqa.selenium.HasInputDevicesgetMouse in class org.openqa.selenium.remote.RemoteWebDriverpublic List<String> listFrames()
public ScreenShotReply saveScreenshot(long timeout,
String... hashes)
timeout - the number of milliseconds to wait before taking the screenshothashes - A previous screenshot MD5 hash. If it matches the hash of this screenshot then
no image data is returned.
public OperaScopePreferences preferences()
opera:config.
public OperaDriver.OperaUtils utils()
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.
public String selftest(List<String> modules,
long timeout)
modules - the list of modules to run selftests fortimeout - the time out before aborting the operation
@Deprecated
public void operaAction(String using,
String... params)
getOperaActionList().
using - the action to perform.params - parameters to pass to the action call@Deprecated public Set<String> getOperaActionList()
protected IEcmaScriptDebugger getScriptDebugger()
protected IOperaExec getExecService()
protected ScopeServices getScopeServices()
protected List<org.openqa.selenium.WebElement> processElements(Integer id)
protected void waitForLoadToComplete()
throws ResponseNotReceivedException
ResponseNotReceivedExceptionprotected <X> X implicitlyWaitFor(Callable<X> condition)
OperaIntervals.POLL_INTERVAL until OperaIntervals.IMPLICIT_WAIT is reached for callable condition to be true.
X - computes a result, or throws an exception if unable to do socondition - a callable implementation
protected void setUseOperaIdle(boolean enabled)
enabled - true if idle should be switched on, false if it should be switched off
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||