|
||||||||||
| 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.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 | |
|---|---|
OperaDesktopDriver()
|
|
OperaDesktopDriver(org.openqa.selenium.Capabilities c)
Constructor that starts Opera if it's not running. |
|
| Method Summary | |
|---|---|
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 independant 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 Map<String,String> |
getServicesList()
|
String |
getSmallPreferencesPath()
|
String |
getString(String enumText,
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 |
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. |
| Methods inherited from class com.opera.core.systems.OperaDriver |
|---|
close, executeAsyncScript, executeScript, findElement, findElement, findElement, findElementByName, findElements, findElements, findElements, findElementsByName, get, get, getCapabilities, getCurrentUrl, getExecService, getKeyboard, getMouse, getOperaActionList, getPageSource, getScopeServices, getScreenshotAs, getScriptDebugger, getTitle, getWindowCount, getWindowHandle, getWindowHandles, implicitlyWaitFor, init, listFrames, manage, navigate, operaAction, preferences, processElements, quit, saveScreenshot, selftest, setUseOperaIdle, switchTo, utils, 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 |
|---|
public OperaDesktopDriver()
public OperaDesktopDriver(org.openqa.selenium.Capabilities c)
c - Settings for binary path to Opera, prefs directory, arguments and more.| Method Detail |
|---|
protected Map<String,String> getServicesList()
getServicesList in class OperaDriverpublic void quitDriver()
public void quitOpera()
public int getActiveQuickWindowID()
public List<QuickWidget> getQuickWidgetList(String windowName)
windowName - name of window to list widgets inside
public List<QuickWidget> getQuickWidgetList(int windowId)
windowId - - windowId of window to get widgets in
public 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 window
public QuickWindow getQuickWindow(String windowName)
windowName - name of the window
public QuickWidget findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String widgetName)
windowId - window id of parent windowwidgetName - name of widget to find
public QuickWidget findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String widgetName,
String parentName)
windowId - id of parent windowwidgetName - name of widgetparentName - name of parent widget
public QuickWidget findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String text)
windowId - - id of parent windowtext - - text of widget
public QuickWidget findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String text,
String parentName)
windowId - id of parent windowtext - text of widgetparentName - name of parent widget
public QuickWidget findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String stringId)
windowId - id of parent windowstringId - string id of the widget
public QuickWidget findWidgetByStringId(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
int windowId,
String stringId,
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,
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(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 in
public 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 independant, 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 window
public QuickWindow findWindowById(int windowId)
windowId - id of window
public String getQuickWindowName(int windowId)
windowId - window id of window
public 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 held
public void keyUp(String key,
List<SystemInputProtos.ModifierPressed> modifiers)
key - key to pressmodifiers - modifiers held
public 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 on
public int waitForWindowUpdated(String windowName)
windowName - - window to wait for shown event on
public int waitForWindowActivated(String windowName)
windowName - - window to wait for shown event on
public int waitForWindowClose(String windowName)
windowName - - window to wait for shown event on
public int waitForWindowLoaded(String windowName)
windowName - - window to wait for shown event on
public String waitForMenuShown(String menuName)
menuName - window to wait for shown event on
public String waitForMenuClosed(String menuName)
menuName - window to wait for shown event on
public String waitForMenuItemPressed(String menuItemText)
menuItemText - - window to wait for shown event on
public 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||