|
||||||||||
| 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
com.opera.core.systems.OperaDesktopDriver
public class OperaDesktopDriver
An extension of OperaDriver for testing the interface of the Opera desktop browser.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.opera.core.systems.OperaDriver |
|---|
OperaDriver.OperaUtils |
| Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver |
|---|
org.openqa.selenium.remote.RemoteWebDriver.RemoteMouse, org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions |
| 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 |
| Field Summary |
|---|
| Fields inherited from class com.opera.core.systems.OperaDriver |
|---|
actionHandler, ARGUMENTS, AUTOSTART, BINARY, capabilities, cookieManager, coreUtils, debugger, DISPLAY, exec, GUESS_BINARY_PATH, HOST, LAUNCHER, logger, LOGGING_FILE, LOGGING_LEVEL, NO_QUIT, NO_RESTART, objectIds, OPERAIDLE, operaRunner, PORT, prefs, PRODUCT, PROFILE, services, windowManager |
| Constructor Summary | |
|---|---|
OperaDesktopDriver()
|
|
OperaDesktopDriver(org.openqa.selenium.Capabilities c)
Constructor that starts Opera if it's not running. |
|
OperaDesktopDriver(OperaDriverSettings settings)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
deleteOperaPrefs()
Deletes the profile for the connected Opera instance. |
QuickWidget |
findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String widgetName)
Finds widget by name in the window specified by windowId. |
QuickWidget |
findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String widgetName,
java.lang.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,
java.lang.String parentName)
Finds widget by specified position. |
QuickWidget |
findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.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,
java.lang.String stringId,
java.lang.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,
java.lang.String text)
Finds widget with the text specified in the window with the given window id. |
QuickWidget |
findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String text,
java.lang.String parentName)
Finds widget by text and parent widget name. |
QuickWindow |
findWindowById(int windowId)
Find window by window id. |
QuickWindow |
findWindowByName(java.lang.String windowName)
Find a Window by its name. |
int |
getActiveQuickWindowID()
Gets the id of the active QuickWindow. |
java.lang.String |
getCachePreferencesPath()
|
java.lang.String |
getLargePreferencesPath()
|
java.lang.String |
getOperaPath()
Gets the path to the connected Opera instance. |
int |
getPid()
|
QuickMenu |
getQuickMenu(java.lang.String menuName)
Get a menu based on its name (Note; the menubar is also seen as a menu) |
QuickMenu |
getQuickMenu(java.lang.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(java.lang.String key,
java.lang.String menuName)
|
QuickMenuItem |
getQuickMenuItemByAction(java.lang.String action)
Get a QuickMenuItem by its action |
QuickMenuItem |
getQuickMenuItemByName(java.lang.String name)
|
QuickMenuItem |
getQuickMenuItemByName(java.lang.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,
java.lang.String menuName)
Get an item by its position (row). |
QuickMenuItem |
getQuickMenuItemByShortcut(java.lang.String shortcut)
|
QuickMenuItem |
getQuickMenuItemByStringId(java.lang.String stringId)
Get an item in a language independant way from its stringId. |
QuickMenuItem |
getQuickMenuItemBySubmenu(java.lang.String submenu)
Get a quickmenuitem by its submenuname |
QuickMenuItem |
getQuickMenuItemByText(java.lang.String text)
Get an item by its text. |
java.util.List<QuickMenuItem> |
getQuickMenuItemList()
|
java.util.List<QuickMenu> |
getQuickMenuList()
|
java.util.List<QuickWidget> |
getQuickWidgetList(int windowId)
Gets a list of all widgets in the window with the given window id. |
java.util.List<QuickWidget> |
getQuickWidgetList(java.lang.String windowName)
Gets a list of all widgets in the window with the given window name. |
QuickWindow |
getQuickWindow(java.lang.String windowName)
|
int |
getQuickWindowCount()
Gets number of open windows. |
int |
getQuickWindowID(java.lang.String windowName)
|
java.util.List<QuickWindow> |
getQuickWindowList()
Gets a list of all open QuickWindows. |
java.lang.String |
getQuickWindowName(int windowId)
Gets the name of the window from its window id. |
protected java.util.Map<java.lang.String,java.lang.String> |
getServicesList()
|
java.lang.String |
getSmallPreferencesPath()
|
java.lang.String |
getString(java.lang.String enumText,
boolean stripAmpersand)
|
boolean |
isOperaRunning()
|
void |
keyDown(java.lang.String key,
java.util.List<SystemInputProtos.ModifierPressed> modifiers)
Press Key. |
void |
keyPress(java.lang.String key,
java.util.List<SystemInputProtos.ModifierPressed> modifiers)
Press Key with modifiers held down. |
void |
keyUp(java.lang.String key,
java.util.List<SystemInputProtos.ModifierPressed> modifiers)
Release key. |
void |
operaDesktopAction(java.lang.String using,
int data,
java.lang.String dataString,
java.lang.String dataStringParam)
Executes an opera action. |
void |
pressQuickMenuItem(java.lang.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 services. |
void |
resetOperaPrefs(java.lang.String newPrefs)
resetOperaPrefs - restarts Opera after copying over newPrefs to profile, if newPrefs folder exists. |
java.lang.String |
waitForMenuClosed(java.lang.String menuName)
Waits until the menu is closed, and then returns the name of the window |
java.lang.String |
waitForMenuItemPressed(java.lang.String menuItemText)
Waits until the menu item is pressed and then returns the text of the menu item pressed |
java.lang.String |
waitForMenuShown(java.lang.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(java.lang.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(java.lang.String windowName)
Waits until the window is closed, and then returns the window id of the window. |
int |
waitForWindowLoaded(java.lang.String windowName)
Waits until the window is loaded and then returns the window id of the window. |
int |
waitForWindowShown(java.lang.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(java.lang.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. |
| 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, getSessionId, log, newRemoteWebElement, setCommandExecutor, setElementConverter, startClient, startSession, stopClient |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperaDesktopDriver()
@Deprecated public OperaDesktopDriver(OperaDriverSettings settings)
settings - settings for binary path to Opera, prefs directory, and argumentspublic OperaDesktopDriver(org.openqa.selenium.Capabilities c)
c - Settings for binary path to Opera, prefs directory, arguments and more.| Method Detail |
|---|
protected java.util.Map<java.lang.String,java.lang.String> getServicesList()
getServicesList in class OperaDriverpublic void quitDriver()
public void quitOpera()
public int getActiveQuickWindowID()
public java.util.List<QuickWidget> getQuickWidgetList(java.lang.String windowName)
windowName - name of window to list widgets inside
public java.util.List<QuickWidget> getQuickWidgetList(int windowId)
windowId - - windowId of window to get widgets in
public java.util.List<QuickWindow> getQuickWindowList()
public QuickMenu getQuickMenu(java.lang.String menuName)
menuName - (as found in standard_menu.ini)
public QuickMenu getQuickMenu(java.lang.String menuName,
int windowId)
menuName - Name of the menuwindowId - WindowId of the menu (the window it is attached to)
public java.util.List<QuickMenu> getQuickMenuList()
public java.util.List<QuickMenuItem> getQuickMenuItemList()
public int getQuickWindowID(java.lang.String windowName)
windowName - name of the window
public QuickWindow getQuickWindow(java.lang.String windowName)
windowName - name of the window
public QuickWidget findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String widgetName)
windowId - window id of parent windowwidgetName - name of widget to find
public QuickWidget findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String widgetName,
java.lang.String parentName)
windowId - id of parent windowwidgetName - name of widgetparentName - name of parent widget
public QuickWidget findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String text)
windowId - - id of parent windowtext - - text of widget
public QuickWidget findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String text,
java.lang.String parentName)
windowId - id of parent windowtext - text of widgetparentName - name of parent widget
public QuickWidget findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String stringId)
windowId - id of parent windowstringId - string id of the widget
public QuickWidget findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
java.lang.String stringId,
java.lang.String parentName)
windowId - id of parent windowstringId - stringid of the widgetparentName - name of parent widget
public 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 parent
public QuickWidget findWidgetByPosition(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
int row,
int column,
java.lang.String parentName)
windowId - id of parent windowrow - row of widget within its parentcolumn - column of widget within its parentparentName - name of parent widget
public void pressQuickMenuItem(java.lang.String menuItemText,
boolean popMenu)
menuItemText - Menu item textpublic QuickMenuItem getQuickMenuItemByAction(java.lang.String action)
name - - name of action of item (as specified in standard_menu.ini)
public QuickMenuItem getQuickMenuItemBySubmenu(java.lang.String submenu)
name - - name of submenu of item (as specified in standard_menu.ini)
public QuickMenuItem getQuickMenuItemByName(java.lang.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(java.lang.String name,
int window_id)
name - window_id -
public QuickMenuItem getQuickMenuItemByText(java.lang.String text)
text - - text of the item (as shown in UI).
public QuickMenuItem getQuickMenuItemByPosition(int row,
java.lang.String menuName)
name - - Position (row) in menu of itemmenuName - - name of menu item is in
public QuickMenuItem getQuickMenuItemByAccKey(java.lang.String key,
java.lang.String menuName)
name - - Accelerator key in menu of item (the letter that's underlined in the menu
item text)
Note: not platform independant, as it cannot be used on mac.menuName - - name of menu item is in
public QuickMenuItem getQuickMenuItemByShortcut(java.lang.String shortcut)
name - - Shortcut of item
public QuickMenuItem getQuickMenuItemByStringId(java.lang.String stringId)
stringId - StringId as found in standard_menu.ini
public QuickWindow findWindowByName(java.lang.String windowName)
windowName - name of window
public QuickWindow findWindowById(int windowId)
windowId - id of window
public java.lang.String getQuickWindowName(int windowId)
windowId - window id of window
public java.lang.String getString(java.lang.String enumText,
boolean stripAmpersand)
enumText -
public java.lang.String getOperaPath()
public java.lang.String getLargePreferencesPath()
public java.lang.String getSmallPreferencesPath()
public java.lang.String getCachePreferencesPath()
public void keyPress(java.lang.String key,
java.util.List<SystemInputProtos.ModifierPressed> modifiers)
key - key to pressmodifiers - modifiers held
public void keyUp(java.lang.String key,
java.util.List<SystemInputProtos.ModifierPressed> modifiers)
key - key to pressmodifiers - modifiers held
public void keyDown(java.lang.String key,
java.util.List<SystemInputProtos.ModifierPressed> modifiers)
key - key to pressmodifiers - modifiers heldpublic int getQuickWindowCount()
public void operaDesktopAction(java.lang.String using,
int data,
java.lang.String dataString,
java.lang.String dataStringParam)
using - - action_namedata - - data parameterdataString - - data string parameterdataStringParam - - parameter to data stringpublic void waitStart()
CommuncationException - if no connectionpublic void waitForWindowUpdated()
CommuncationException - if no connectionpublic void waitForWindowActivated()
CommuncationException - if no connectionpublic void waitForWindowClose()
CommuncationException - if no connectionpublic int waitForWindowShown(java.lang.String windowName)
windowName - - window to wait for shown event on
CommuncationException - if no connectionpublic int waitForWindowUpdated(java.lang.String windowName)
windowName - - window to wait for shown event on
CommuncationException - if no connectionpublic int waitForWindowActivated(java.lang.String windowName)
windowName - - window to wait for shown event on
CommuncationException - if no connectionpublic int waitForWindowClose(java.lang.String windowName)
windowName - - window to wait for shown event on
CommuncationException - if no connectionpublic int waitForWindowLoaded(java.lang.String windowName)
windowName - - window to wait for shown event on
CommuncationException - if no connectionpublic java.lang.String waitForMenuShown(java.lang.String menuName)
menu - - window to wait for shown event on
CommuncationException - if no connectionpublic java.lang.String waitForMenuClosed(java.lang.String menuName)
menu - - window to wait for shown event on
CommuncationException - if no connectionpublic java.lang.String waitForMenuItemPressed(java.lang.String menuItemText)
menuItemText - - window to wait for shown event on
CommuncationException - if no connectionpublic void resetOperaPrefs(java.lang.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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||