public class OperaDesktopDriver extends OperaDriver
OperaDriver.OperaOptions, OperaDriver.PrivateDataorg.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| Constructor and Description |
|---|
OperaDesktopDriver() |
OperaDesktopDriver(org.openqa.selenium.Capabilities capabilities)
Starts Opera with the given set of desired capabilities.
|
OperaDesktopDriver(OperaSettings settings)
Starts Opera with the given settings.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteOperaPrefs()
Deletes the profile for the connected Opera instance.
|
QuickWidget |
findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String widgetName)
Finds widget by name in the window specified by windowId.
|
QuickWidget |
findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String widgetName,
String parentName)
Finds widget by name and parent in the window with the specified window id.
|
QuickWidget |
findWidgetByPosition(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
int row,
int column)
Finds widget by specified position.
|
QuickWidget |
findWidgetByPosition(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
int row,
int column,
String parentName)
Finds widget by specified position.
|
QuickWidget |
findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String stringId)
Finds widget with the text specified by string id in the window with the given id.
|
QuickWidget |
findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String stringId,
String parentName)
Finds widget with the text specified by string id and parentName in the specified window.
|
QuickWidget |
findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String text)
Finds widget with the text specified in the window with the given window id.
|
QuickWidget |
findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String text,
String parentName)
Finds widget by text and parent widget name.
|
QuickWindow |
findWindowById(int windowId)
Find window by window id.
|
QuickWindow |
findWindowByName(String windowName)
Find a Window by its name.
|
int |
getActiveQuickWindowID()
Gets the id of the active QuickWindow.
|
String |
getCachePreferencesPath() |
String |
getLargePreferencesPath() |
String |
getOperaPath()
Gets the path to the connected Opera instance.
|
int |
getPid() |
QuickMenu |
getQuickMenu(String menuName)
Get a menu based on its name (Note; the menubar is also seen as a menu)
|
QuickMenu |
getQuickMenu(String menuName,
int windowId)
Get a menu based on its name and windowid - makes it possible to get the menubar of a specific
main window
|
QuickMenuItem |
getQuickMenuItemByAccKey(String key,
String menuName) |
QuickMenuItem |
getQuickMenuItemByAction(String action)
Get a QuickMenuItem by its action
|
QuickMenuItem |
getQuickMenuItemByName(String name) |
QuickMenuItem |
getQuickMenuItemByName(String name,
int window_id)
Get a menuitem by its name and the windowid of the window the menu it is in is in.
|
QuickMenuItem |
getQuickMenuItemByPosition(int row,
String menuName)
Get an item by its position (row).
|
QuickMenuItem |
getQuickMenuItemByShortcut(String shortcut) |
QuickMenuItem |
getQuickMenuItemByStringId(String stringId)
Get an item in a language independent way from its stringId.
|
QuickMenuItem |
getQuickMenuItemBySubmenu(String submenu)
Get a quickmenuitem by its submenuname
|
QuickMenuItem |
getQuickMenuItemByText(String text)
Get an item by its text.
|
List<QuickMenuItem> |
getQuickMenuItemList() |
List<QuickMenu> |
getQuickMenuList() |
List<QuickWidget> |
getQuickWidgetList(int windowId)
Gets a list of all widgets in the window with the given window id.
|
List<QuickWidget> |
getQuickWidgetList(String windowName)
Gets a list of all widgets in the window with the given window name.
|
QuickWindow |
getQuickWindow(String windowName) |
int |
getQuickWindowCount()
Gets number of open windows.
|
int |
getQuickWindowID(String windowName) |
List<QuickWindow> |
getQuickWindowList()
Gets a list of all open QuickWindows.
|
String |
getQuickWindowName(int windowId)
Gets the name of the window from its window id.
|
protected SortedSet<ScopeService> |
getRequiredServices()
A sorted set of required services for this OperaDriver to function.
|
String |
getSmallPreferencesPath() |
String |
getString(String enumText,
boolean stripAmpersand) |
String |
getSubstitutedString(String[] arg,
boolean stripAmpersand) |
boolean |
isOperaRunning()
Deprecated.
|
void |
keyDown(String key,
List<SystemInputProtos.ModifierPressed> modifiers)
Press Key.
|
void |
keyPress(String key,
List<SystemInputProtos.ModifierPressed> modifiers)
Press Key with modifiers held down.
|
void |
keyUp(String key,
List<SystemInputProtos.ModifierPressed> modifiers)
Release key.
|
void |
operaDesktopAction(String using,
int data,
String dataString,
String dataStringParam)
Executes an opera action.
|
void |
pressQuickMenuItem(String menuItemText,
boolean popMenu) |
void |
quitDriver()
Shuts down the driver (but not Opera)
|
void |
quitOpera()
Quits Opera, cuts the connection to free the port and shuts down the getScopeServices().
|
void |
resetOperaPrefs(String newPrefs)
resetOperaPrefs - restarts Opera after copying over newPrefs to profile, if newPrefs folder
exists.
|
String |
waitForMenuClosed(String menuName)
Waits until the menu is closed, and then returns the name of the window
|
String |
waitForMenuItemPressed(String menuItemText)
Waits until the menu item is pressed and then returns the text of the menu item pressed
|
String |
waitForMenuShown(String menuName)
Waits until the menu is shown, and then returns the name of the window
|
void |
waitForWindowActivated()
Waits for any window activated event.
|
int |
waitForWindowActivated(String windowName)
Waits until the window is activated, and then returns the window id of the window.
|
void |
waitForWindowClose()
Waits for any window close event.
|
int |
waitForWindowClose(String windowName)
Waits until the window is closed, and then returns the window id of the window.
|
int |
waitForWindowLoaded(String windowName)
Waits until the window is loaded and then returns the window id of the window.
|
int |
waitForWindowPageChanged(String windowName)
Waits until new page is shown in the window is shown, and then returns the window id of the
window
|
int |
waitForWindowShown(String windowName)
Waits until the window is shown, and then returns the window id of the window
|
void |
waitForWindowUpdated()
Waits for any window update event.
|
int |
waitForWindowUpdated(String windowName)
Waits until the window is updated, and then returns the window id of the window.
|
void |
waitStart()
Starts a process of waiting for some event.
|
assertConnected, assertConnected, captureScreen, captureScreen, captureScreen, close, executeAsyncScript, executeScript, finalize, findElement, findElement, findElement, findElementByName, findElements, findElements, findElements, findElementsByName, get, get, getCapabilities, getCurrentUrl, getDebugger, getKeyboard, getMouse, getOperaActionList, getPageSource, getScopeServices, getScreenshotAs, getTitle, getWindowCount, getWindowHandle, getWindowHandles, implicitlyWaitFor, init, listFrames, manage, navigate, operaAction, preferences, processElements, proxy, quit, selftest, selftest, selftest, setUseOperaIdle, switchTo, utils, waitForLoadToCompleteexecute, 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, startSession, stopClient, toStringpublic OperaDesktopDriver()
public OperaDesktopDriver(org.openqa.selenium.Capabilities capabilities)
capabilities - a DesiredCapabilities object containing
various settings for the driver and the browserpublic OperaDesktopDriver(OperaSettings settings)
settings - Opera specific settingsprotected SortedSet<ScopeService> getRequiredServices()
OperaDrivergetRequiredServices in class OperaDriverpublic void quitDriver()
public void quitOpera()
public int getActiveQuickWindowID()
public List<QuickWidget> getQuickWidgetList(String windowName)
windowName - name of window to list widgets insidepublic List<QuickWidget> getQuickWidgetList(int windowId)
windowId - - windowId of window to get widgets inpublic List<QuickWindow> getQuickWindowList()
public QuickMenu getQuickMenu(String menuName)
menuName - (as found in standard_menu.ini)public QuickMenu getQuickMenu(String menuName, int windowId)
menuName - Name of the menuwindowId - WindowId of the menu (the window it is attached to)public List<QuickMenu> getQuickMenuList()
public List<QuickMenuItem> getQuickMenuItemList()
public int getQuickWindowID(String windowName)
windowName - name of the windowpublic QuickWindow getQuickWindow(String windowName)
windowName - name of the windowpublic QuickWidget findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type, int windowId, String widgetName)
windowId - window id of parent windowwidgetName - name of widget to findpublic QuickWidget findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type, int windowId, String widgetName, String parentName)
windowId - id of parent windowwidgetName - name of widgetparentName - name of parent widgetpublic QuickWidget findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type, int windowId, String text)
windowId - - id of parent windowtext - - text of widgetpublic QuickWidget findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type, int windowId, String text, String parentName)
windowId - id of parent windowtext - text of widgetparentName - name of parent widgetpublic QuickWidget findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type, int windowId, String stringId)
windowId - id of parent windowstringId - string id of the widgetpublic QuickWidget findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type, int windowId, String stringId, String parentName)
windowId - id of parent windowstringId - stringid of the widgetparentName - name of parent widgetpublic QuickWidget findWidgetByPosition(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type, int windowId, int row, int column)
windowId - id of parent windowrow - row of widget within its parentcolumn - column of widget within its parentpublic QuickWidget findWidgetByPosition(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type, int windowId, int row, int column, String parentName)
windowId - id of parent windowrow - row of widget within its parentcolumn - column of widget within its parentparentName - name of parent widgetpublic void pressQuickMenuItem(String menuItemText, boolean popMenu)
menuItemText - Menu item textpublic QuickMenuItem getQuickMenuItemByAction(String action)
action - name of action of item (as specified in standard_menu.ini)public QuickMenuItem getQuickMenuItemBySubmenu(String submenu)
submenu - name of submenu of item (as specified in standard_menu.ini)public QuickMenuItem getQuickMenuItemByName(String name)
name - Name of menuitem For a command/action item, this is its action name For a
command/action item, with a parameter to its action, this is "action, parameter"
(e.g. "Open link, www.elg.no") For an item that opens a submenu, this is the
submenuname (all as found in standard_menu.ini)public QuickMenuItem getQuickMenuItemByName(String name, int window_id)
public QuickMenuItem getQuickMenuItemByText(String text)
text - - text of the item (as shown in UI).public QuickMenuItem getQuickMenuItemByPosition(int row, String menuName)
row - position (row) in menu of itemmenuName - name of menu item is inpublic QuickMenuItem getQuickMenuItemByAccKey(String key, String menuName)
key - accelerator key in menu of item (the letter that's underlined in the menu item
text) Note: not platform independent, as it cannot be used on mac.menuName - name of menu item is inpublic QuickMenuItem getQuickMenuItemByShortcut(String shortcut)
shortcut - shortcut of itempublic QuickMenuItem getQuickMenuItemByStringId(String stringId)
stringId - StringId as found in standard_menu.inipublic QuickWindow findWindowByName(String windowName)
windowName - name of windowpublic QuickWindow findWindowById(int windowId)
windowId - id of windowpublic String getQuickWindowName(int windowId)
windowId - window id of windowpublic String getString(String enumText, boolean stripAmpersand)
public String getOperaPath()
public String getLargePreferencesPath()
public String getSmallPreferencesPath()
public String getCachePreferencesPath()
public void keyPress(String key, List<SystemInputProtos.ModifierPressed> modifiers)
key - key to pressmodifiers - modifiers heldpublic void keyUp(String key, List<SystemInputProtos.ModifierPressed> modifiers)
key - key to pressmodifiers - modifiers heldpublic void keyDown(String key, List<SystemInputProtos.ModifierPressed> modifiers)
key - key to pressmodifiers - modifiers heldpublic int getQuickWindowCount()
public void operaDesktopAction(String using, int data, String dataString, String dataStringParam)
using - - action_namedata - - data parameterdataString - - data string parameterdataStringParam - - parameter to data stringpublic void waitStart()
public void waitForWindowUpdated()
public void waitForWindowActivated()
public void waitForWindowClose()
public int waitForWindowShown(String windowName)
windowName - - window to wait for shown event onpublic int waitForWindowUpdated(String windowName)
windowName - - window to wait for shown event onpublic int waitForWindowActivated(String windowName)
windowName - - window to wait for shown event onpublic int waitForWindowClose(String windowName)
windowName - - window to wait for shown event onpublic int waitForWindowPageChanged(String windowName)
windowName - - window to wait for shown event onpublic int waitForWindowLoaded(String windowName)
windowName - - window to wait for shown event onpublic String waitForMenuShown(String menuName)
menuName - window to wait for shown event onpublic String waitForMenuClosed(String menuName)
menuName - window to wait for shown event onpublic String waitForMenuItemPressed(String menuItemText)
menuItemText - - window to wait for shown event onpublic void resetOperaPrefs(String newPrefs)
newPrefs - - path to where new prefs to be copied into the prefs folders are locatedpublic void deleteOperaPrefs()
public int getPid()
public boolean isOperaRunning()
Copyright © 2012. All Rights Reserved.