com.opera.core.systems.scope.services.ums
Class EcmaScriptDebugger6

java.lang.Object
  extended by com.opera.core.systems.scope.AbstractService
      extended by com.opera.core.systems.scope.AbstractEcmascriptService
          extended by com.opera.core.systems.scope.services.ums.EcmaScriptDebugger
              extended by com.opera.core.systems.scope.services.ums.EcmaScriptDebugger6
All Implemented Interfaces:
IEcmaScriptDebugger

public class EcmaScriptDebugger6
extends EcmaScriptDebugger

EcmaScript debugger 6.0 implementation handles injection and runtime management to the new version of debugger.

Author:
Deniz Turkoglu

Field Summary
 
Fields inherited from class com.opera.core.systems.scope.AbstractEcmascriptService
activeWindowId, currentFramePath, driver, retries, sleepDuration, windowManager
 
Fields inherited from class com.opera.core.systems.scope.AbstractService
services
 
Constructor Summary
EcmaScriptDebugger6(ScopeServices services, String version)
           
 
Method Summary
 String callFunctionOnObject(String using, int objectId)
          The script to be executed on/using an object
 Object callFunctionOnObject(String using, int objectId, boolean responseExpected)
           
 List<Integer> examineObjects(Integer id)
           
 Object examineScriptResult(Integer id)
           
 Object executeScript(String using, boolean responseExpected)
          Executes a script and returns the response (based on responseExpected)
 Object executeScript(String using, boolean responseExpected, int runtimeId)
           
 Integer executeScriptOnObject(String using, int objectId)
           
 Integer getObject(String using)
          Gets the object id using a script
 Integer getObject(String using, int runtimeId)
           
protected  Object parseEvalReply(Esdbg6Protos.EvalResult result)
           
 Object scriptExecutor(String script, Object... params)
          Executes the given javascript via eval call
 
Methods inherited from class com.opera.core.systems.scope.services.ums.EcmaScriptDebugger
addRuntime, buildEval, buildVariable, changeRuntime, changeRuntime, cleanUpRuntimes, createAllRuntimes, eval, eval, executeJavascript, findRuntime, findRuntime, getRuntimeId, init, listFramePaths, listRuntimes, parseEvalReply, parseValue, readyStateChanged, releaseObject, releaseObjects, removeRuntime, resetFramePath, resetRuntimesList, setRuntime, updateRuntime
 
Methods inherited from class com.opera.core.systems.scope.AbstractEcmascriptService
buildEvalString, cleanUpRuntimes, executeJavascript, executeJavascript, isNumber, parseNumber, processArgument, recover, resetCounters, setDriver
 
Methods inherited from class com.opera.core.systems.scope.AbstractService
buildPayload, executeCommand, executeCommand, getVersion, isVersionInRange, sleep, xpathIterator, xpathPointer, xpathQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.opera.core.systems.scope.services.IEcmaScriptDebugger
cleanUpRuntimes, executeJavascript, executeJavascript, setDriver
 

Constructor Detail

EcmaScriptDebugger6

public EcmaScriptDebugger6(ScopeServices services,
                           String version)
Method Detail

scriptExecutor

public Object scriptExecutor(String script,
                             Object... params)
Description copied from interface: IEcmaScriptDebugger
Executes the given javascript via eval call

Specified by:
scriptExecutor in interface IEcmaScriptDebugger
Overrides:
scriptExecutor in class EcmaScriptDebugger
Parameters:
script - The script to be executed on host
params - Array of params, can be string, long or web element(s)

executeScript

public Object executeScript(String using,
                            boolean responseExpected)
Description copied from interface: IEcmaScriptDebugger
Executes a script and returns the response (based on responseExpected)

Specified by:
executeScript in interface IEcmaScriptDebugger
Overrides:
executeScript in class EcmaScriptDebugger
Parameters:
using - The script to be injected
responseExpected - The flag to enable/disable parsing response
Returns:
The raw result object if response is expected, null otherwise

executeScript

public Object executeScript(String using,
                            boolean responseExpected,
                            int runtimeId)
Overrides:
executeScript in class EcmaScriptDebugger

getObject

public Integer getObject(String using)
Description copied from interface: IEcmaScriptDebugger
Gets the object id using a script

Specified by:
getObject in interface IEcmaScriptDebugger
Overrides:
getObject in class EcmaScriptDebugger
Parameters:
using - the script to find the object
Returns:
object id with the result

getObject

public Integer getObject(String using,
                         int runtimeId)
Overrides:
getObject in class EcmaScriptDebugger

callFunctionOnObject

public String callFunctionOnObject(String using,
                                   int objectId)
Description copied from interface: IEcmaScriptDebugger
The script to be executed on/using an object

Specified by:
callFunctionOnObject in interface IEcmaScriptDebugger
Overrides:
callFunctionOnObject in class EcmaScriptDebugger
Parameters:
using - Script with reference to the object "locator"
objectId - The object to be used for injection
Returns:
The string value returned by the executed Javascript

callFunctionOnObject

public Object callFunctionOnObject(String using,
                                   int objectId,
                                   boolean responseExpected)
Specified by:
callFunctionOnObject in interface IEcmaScriptDebugger
Overrides:
callFunctionOnObject in class EcmaScriptDebugger

executeScriptOnObject

public Integer executeScriptOnObject(String using,
                                     int objectId)
Specified by:
executeScriptOnObject in interface IEcmaScriptDebugger
Overrides:
executeScriptOnObject in class EcmaScriptDebugger

parseEvalReply

protected Object parseEvalReply(Esdbg6Protos.EvalResult result)

examineObjects

public List<Integer> examineObjects(Integer id)
Specified by:
examineObjects in interface IEcmaScriptDebugger
Overrides:
examineObjects in class EcmaScriptDebugger

examineScriptResult

public Object examineScriptResult(Integer id)
Specified by:
examineScriptResult in interface IEcmaScriptDebugger
Overrides:
examineScriptResult in class EcmaScriptDebugger


Copyright © 2012. All Rights Reserved.