com.opera.core.systems
Class OperaDriver.OperaUtils

java.lang.Object
  extended by com.opera.core.systems.OperaDriver.OperaUtils
Direct Known Subclasses:
TestOperaDriver.TestOperaUtils
Enclosing class:
OperaDriver

public class OperaDriver.OperaUtils
extends Object

Interface for accessing the browser's meta- and utility information.


Constructor Summary
OperaDriver.OperaUtils()
           
 
Method Summary
 void clearPrivateData(OperaDriver.PrivateData... flags)
          Clear private data stored by Opera by type of data or by all.
 String getBinaryPath()
          The full path to the currently running binary.
 String getCoreVersion()
          Which Core version this instance of the browser is using, e.g.
 String getOS()
          A string which describes the operating system, e.g.
 Integer getPID()
          The ID of the process we're currently talking to.
 OperaProduct getProduct()
          Gets the current product.
 String getUserAgent()
          The User-Agent string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperaDriver.OperaUtils

public OperaDriver.OperaUtils()
Method Detail

getCoreVersion

public String getCoreVersion()
Which Core version this instance of the browser is using, e.g. "2.8.119".

Returns:
version number

getOS

public String getOS()
A string which describes the operating system, e.g. "Windows NT 6.1".

Returns:
operating system identifier

getProduct

public OperaProduct getProduct()
Gets the current product. For regular desktop builds this will be OperaProduct.DESKTOP Other examples are OperaProduct.MOBILE and OperaProduct.CORE.

Returns:
browser's product type

getBinaryPath

public String getBinaryPath()
The full path to the currently running binary.

Returns:
full path to browser

getUserAgent

public String getUserAgent()
The User-Agent string. Typically something like Opera/9.80 (Windows NT 6.1; U; en) Presto/2.7.62 Version/11.01.

Returns:
User-Agent string

getPID

public Integer getPID()
The ID of the process we're currently talking to. Might not be present if the build does not support retrieving process IDs.

Returns:
process ID, or null if not available

clearPrivateData

public void clearPrivateData(OperaDriver.PrivateData... flags)
Clear private data stored by Opera by type of data or by all.

Parameters:
flags - a variable list of flags can be used, or the value ALL to clean all stored data


Copyright © 2012. All Rights Reserved.