com.opera.core.systems
Class OperaDesktopDriver

java.lang.Object
  extended by org.openqa.selenium.remote.RemoteWebDriver
      extended by com.opera.core.systems.OperaDriver
          extended by com.opera.core.systems.OperaDesktopDriver
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 OperaDesktopDriver
extends OperaDriver

An extension of OperaDriver for testing the interface of the Opera desktop browser.

Author:
Adam Minchinton, Karianne Ekern

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 com.opera.core.systems.OperaDriver
close, escapeJsString, executeActions, executeAsyncScript, executeScript, findElement, findElement, findElement, findElementByName, findElements, findElements, findElements, findElementsByName, get, get, getCapabilities, getCurrentUrl, getDefaultCapabilities, getDefaultPref, getExecService, getKeyboard, getMouse, getOperaRunner, getPageSource, getPref, getScopeServices, getScreenshotAs, getScriptDebugger, getTitle, getVersion, getWindowCount, getWindowHandle, getWindowHandles, getWindowManager, init, isJavascriptEnabled, isOperaIdleAvailable, key, keyDown, keyUp, listAllPrefs, listFrames, listPrefs, manage, navigate, operaAction, processElements, quit, releaseKeys, saveScreenshot, selftest, setPref, setUseOperaIdle, switchTo, type, 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, 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

OperaDesktopDriver

public OperaDesktopDriver()

OperaDesktopDriver

@Deprecated
public OperaDesktopDriver(OperaDriverSettings settings)
Deprecated. 

Constructor that starts Opera if it's not running.

Parameters:
settings - settings for binary path to Opera, prefs directory, and arguments

OperaDesktopDriver

public OperaDesktopDriver(org.openqa.selenium.Capabilities c)
Constructor that starts Opera if it's not running.

Parameters:
c - Settings for binary path to Opera, prefs directory, arguments and more.
Method Detail

getServicesList

protected java.util.Map<java.lang.String,java.lang.String> getServicesList()
Overrides:
getServicesList in class OperaDriver

quitDriver

public void quitDriver()
Shuts down the driver (but not Opera)


quitOpera

public void quitOpera()
Quits Opera, cuts the connection to free the port and shuts down the services.


getActiveQuickWindowID

public int getActiveQuickWindowID()
Gets the id of the active QuickWindow.

Returns:
id of active window

getQuickWidgetList

public java.util.List<QuickWidget> getQuickWidgetList(java.lang.String windowName)
Gets a list of all widgets in the window with the given window name.

Parameters:
windowName - name of window to list widgets inside
Returns:
list of widgets in the window with name windowName If windowName is empty, it gets the widgets in the active window

getQuickWidgetList

public java.util.List<QuickWidget> getQuickWidgetList(int windowId)
Gets a list of all widgets in the window with the given window id.

Parameters:
windowId - - windowId of window to get widgets in
Returns:
list of widgets in the window with id windowId If windowId -1, gets the widgets in the active window

getQuickWindowList

public java.util.List<QuickWindow> getQuickWindowList()
Gets a list of all open QuickWindows.

Returns:
list of windows

getQuickMenu

public QuickMenu getQuickMenu(java.lang.String menuName)
Get a menu based on its name (Note; the menubar is also seen as a menu)

Parameters:
menuName - (as found in standard_menu.ini)
Returns:
QuickMenu with the given name, or null if no such menu is found

getQuickMenu

public 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

Parameters:
menuName - Name of the menu
windowId - WindowId of the menu (the window it is attached to)
Returns:
QuickMenu with given menuName and windowId, or null if no such menu can be found.

getQuickMenuList

public java.util.List<QuickMenu> getQuickMenuList()
Returns:
list of all open menus, as QuickMenus

getQuickMenuItemList

public java.util.List<QuickMenuItem> getQuickMenuItemList()
Returns:
list of all QuickMenuItems in open menus

getQuickWindowID

public int getQuickWindowID(java.lang.String windowName)
Parameters:
windowName - name of the window
Returns:
window id of the QuickWindow with name windowName, or -1 if no such window exists

getQuickWindow

public QuickWindow getQuickWindow(java.lang.String windowName)
Parameters:
windowName - name of the window
Returns:
QuickWindow with the given name, or null if no such window exists

findWidgetByName

public QuickWidget findWidgetByName(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
                                    int windowId,
                                    java.lang.String widgetName)
Finds widget by name in the window specified by windowId.

Parameters:
windowId - window id of parent window
widgetName - name of widget to find
Returns:
QuickWidget with the given name in the window with id windowId, or null if no such widget exists.

findWidgetByName

public 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.

Parameters:
windowId - id of parent window
widgetName - name of widget
parentName - name of parent widget
Returns:
QuickWidget with widgetName and parent in the window given by windowId, or null if no such widget exists

findWidgetByText

public 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. Note, if there are several widgets in this window with the same text, the widget returned can be any one of those

Parameters:
windowId - - id of parent window
text - - text of widget
Returns:
QuickWidget with the given text in the specified window, or null if no such widget exists.

findWidgetByText

public QuickWidget findWidgetByText(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
                                    int windowId,
                                    java.lang.String text,
                                    java.lang.String parentName)
Finds widget by text and parent widget name.

Parameters:
windowId - id of parent window
text - text of widget
parentName - name of parent widget
Returns:
QuickWidget with the given text and parent in the window with id windowId, or null if no such widget exists

findWidgetByStringId

public 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.

Parameters:
windowId - id of parent window
stringId - string id of the widget
Returns:
QuickWidget or null if no matching widget found

findWidgetByStringId

public 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.

Parameters:
windowId - id of parent window
stringId - stringid of the widget
parentName - name of parent widget
Returns:
QuickWidget, or null if no matching widget found

findWidgetByPosition

public QuickWidget findWidgetByPosition(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
                                        int windowId,
                                        int row,
                                        int column)
Finds widget by specified position. Used for widgets that have a position only, e.g. treeviewitems and tabs.

Parameters:
windowId - id of parent window
row - row of widget within its parent
column - column of widget within its parent
Returns:
QuickWidget matching, or null if no matching widget is found

findWidgetByPosition

public QuickWidget findWidgetByPosition(DesktopWmProtos.QuickWidgetInfo.QuickWidgetType type,
                                        int windowId,
                                        int row,
                                        int column,
                                        java.lang.String parentName)
Finds widget by specified position. Used for widgets that have a position, e.g. treeviewitems and tabs.

Parameters:
windowId - id of parent window
row - row of widget within its parent
column - column of widget within its parent
parentName - name of parent widget
Returns:
QuickWidget, or null if no matching widget is found

pressQuickMenuItem

public void pressQuickMenuItem(java.lang.String menuItemText,
                               boolean popMenu)
Parameters:
menuItemText - Menu item text

getQuickMenuItemByAction

public QuickMenuItem getQuickMenuItemByAction(java.lang.String action)
Get a QuickMenuItem by its action

Parameters:
name - - name of action of item (as specified in standard_menu.ini)
Returns:
QuickMenuItem

getQuickMenuItemBySubmenu

public QuickMenuItem getQuickMenuItemBySubmenu(java.lang.String submenu)
Get a quickmenuitem by its submenuname

Parameters:
name - - name of submenu of item (as specified in standard_menu.ini)
Returns:

getQuickMenuItemByName

public QuickMenuItem getQuickMenuItemByName(java.lang.String name)
Parameters:
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)
Returns:

getQuickMenuItemByName

public 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. This is only relevant for the menubar. Makes it possible to distinguish between menubar items in different main windows.

Parameters:
name -
window_id -
Returns:

getQuickMenuItemByText

public QuickMenuItem getQuickMenuItemByText(java.lang.String text)
Get an item by its text. Not language independant, and therefore not a recommended way to get an item.

Parameters:
text - - text of the item (as shown in UI).
Returns:

getQuickMenuItemByPosition

public QuickMenuItem getQuickMenuItemByPosition(int row,
                                                java.lang.String menuName)
Get an item by its position (row). Rows starts counting at 0, and note that also menu separators are counted. Note that this is only unique within a single menu (specified by parentName), if parentName is null, this retrieves the first match.

Parameters:
name - - Position (row) in menu of item
menuName - - name of menu item is in
Returns:

getQuickMenuItemByAccKey

public QuickMenuItem getQuickMenuItemByAccKey(java.lang.String key,
                                              java.lang.String menuName)
Parameters:
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
Returns:

getQuickMenuItemByShortcut

public QuickMenuItem getQuickMenuItemByShortcut(java.lang.String shortcut)
Parameters:
name - - Shortcut of item
Returns:

getQuickMenuItemByStringId

public QuickMenuItem getQuickMenuItemByStringId(java.lang.String stringId)
Get an item in a language independant way from its stringId.

Parameters:
stringId - StringId as found in standard_menu.ini
Returns:

findWindowByName

public QuickWindow findWindowByName(java.lang.String windowName)
Find a Window by its name.

Parameters:
windowName - name of window
Returns:
QuickWindow or null if no window with windowName is found

findWindowById

public QuickWindow findWindowById(int windowId)
Find window by window id.

Parameters:
windowId - id of window
Returns:
QuickWindow or null if no window with the id found

getQuickWindowName

public java.lang.String getQuickWindowName(int windowId)
Gets the name of the window from its window id.

Parameters:
windowId - window id of window
Returns:
String: name of the window with id windowId

getString

public java.lang.String getString(java.lang.String enumText,
                                  boolean stripAmpersand)
Parameters:
enumText -
Returns:
the string specified by the id @param enum_text

getOperaPath

public java.lang.String getOperaPath()
Gets the path to the connected Opera instance.

Returns:
the path to the connected Opera instance

getLargePreferencesPath

public java.lang.String getLargePreferencesPath()
Returns:
large preferences path

getSmallPreferencesPath

public java.lang.String getSmallPreferencesPath()
Returns:
small preferences path

getCachePreferencesPath

public java.lang.String getCachePreferencesPath()
Returns:
cache preferences path

keyPress

public void keyPress(java.lang.String key,
                     java.util.List<SystemInputProtos.ModifierPressed> modifiers)
Press Key with modifiers held down.

Parameters:
key - key to press
modifiers - modifiers held

keyUp

public void keyUp(java.lang.String key,
                  java.util.List<SystemInputProtos.ModifierPressed> modifiers)
Release key.

Parameters:
key - key to press
modifiers - modifiers held

keyDown

public void keyDown(java.lang.String key,
                    java.util.List<SystemInputProtos.ModifierPressed> modifiers)
Press Key.

Parameters:
key - key to press
modifiers - modifiers held

getQuickWindowCount

public int getQuickWindowCount()
Gets number of open windows.

Returns:
number of open windows

operaDesktopAction

public void operaDesktopAction(java.lang.String using,
                               int data,
                               java.lang.String dataString,
                               java.lang.String dataStringParam)
Executes an opera action.

Parameters:
using - - action_name
data - - data parameter
dataString - - data string parameter
dataStringParam - - parameter to data string

waitStart

public void waitStart()
Starts a process of waiting for some event. After this call, messages to the driver about window events are not thrown away, so that the notification about window shown is not lost because of other events or messages

Throws:
CommuncationException - if no connection

waitForWindowUpdated

public void waitForWindowUpdated()
Waits for any window update event.

Throws:
CommuncationException - if no connection

waitForWindowActivated

public void waitForWindowActivated()
Waits for any window activated event.

Throws:
CommuncationException - if no connection

waitForWindowClose

public void waitForWindowClose()
Waits for any window close event.

Throws:
CommuncationException - if no connection

waitForWindowShown

public int waitForWindowShown(java.lang.String windowName)
Waits until the window is shown, and then returns the window id of the window

Parameters:
windowName - - window to wait for shown event on
Returns:
id of window
Throws:
CommuncationException - if no connection

waitForWindowUpdated

public int waitForWindowUpdated(java.lang.String windowName)
Waits until the window is updated, and then returns the window id of the window.

Parameters:
windowName - - window to wait for shown event on
Returns:
id of window
Throws:
CommuncationException - if no connection

waitForWindowActivated

public int waitForWindowActivated(java.lang.String windowName)
Waits until the window is activated, and then returns the window id of the window.

Parameters:
windowName - - window to wait for shown event on
Returns:
id of window
Throws:
CommuncationException - if no connection

waitForWindowClose

public int waitForWindowClose(java.lang.String windowName)
Waits until the window is closed, and then returns the window id of the window.

Parameters:
windowName - - window to wait for shown event on
Returns:
id of window
Throws:
CommuncationException - if no connection

waitForWindowLoaded

public int waitForWindowLoaded(java.lang.String windowName)
Waits until the window is loaded and then returns the window id of the window.

Parameters:
windowName - - window to wait for shown event on
Returns:
id of window
Throws:
CommuncationException - if no connection

waitForMenuShown

public java.lang.String waitForMenuShown(java.lang.String menuName)
Waits until the menu is shown, and then returns the name of the window

Parameters:
menu - - window to wait for shown event on
Returns:
id of window
Throws:
CommuncationException - if no connection

waitForMenuClosed

public java.lang.String waitForMenuClosed(java.lang.String menuName)
Waits until the menu is closed, and then returns the name of the window

Parameters:
menu - - window to wait for shown event on
Returns:
id of window
Throws:
CommuncationException - if no connection

waitForMenuItemPressed

public 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

Parameters:
menuItemText - - window to wait for shown event on
Returns:
text of the menu item
Throws:
CommuncationException - if no connection

resetOperaPrefs

public void resetOperaPrefs(java.lang.String newPrefs)
resetOperaPrefs - restarts Opera after copying over newPrefs to profile, if newPrefs folder exists. Copies prefs in folder newPrefs to the profile for the connected Opera instance. Will first quit Opera, then delete the old prefs, and copy the new prefs over, then restart Opera with the new prefs. Does nothing if profile used is default main user profile

Parameters:
newPrefs - - path to where new prefs to be copied into the prefs folders are located

deleteOperaPrefs

public void deleteOperaPrefs()
Deletes the profile for the connected Opera instance. Should only be called after the given Opera instance has quit


getPid

public int getPid()
Returns:
Process id of Opera browser that is connected to this driver.

isOperaRunning

public boolean isOperaRunning()
Returns:
true if Opera is running, and running under the launcher


Copyright © 2011. All Rights Reserved.