|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opera.core.systems.scope.AbstractService
com.opera.core.systems.scope.AbstractEcmascriptService
public abstract class AbstractEcmascriptService
| Field Summary | |
|---|---|
protected int |
activeWindowId
The window our current runtime is contained in. |
protected String |
currentFramePath
The frame our current runtime is contained in. |
protected OperaDriver |
driver
|
protected int |
retries
The number of times we've attempted to retrieve a response from an injected JavaScript sent to the browser. |
protected RuntimeNode |
root
|
protected long |
sleepDuration
Defines for how long to sleep when retrying to execute a JS command. |
protected IWindowManager |
windowManager
The window manager we are using. |
| Fields inherited from class com.opera.core.systems.scope.AbstractService |
|---|
services |
| Constructor Summary | |
|---|---|
AbstractEcmascriptService(ScopeServices services,
String version)
|
|
| Method Summary | |
|---|---|
protected String |
buildEvalString(List<org.openqa.selenium.WebElement> elements,
String script,
Object... params)
Build the script to send with arguments. |
void |
cleanUpRuntimes()
Cleanup runtimes with the active window id |
String |
executeJavascript(String using)
Execute a script and wait for response |
String |
executeJavascript(String using,
boolean responseExpected)
Execute a script, this method allows fine tuning of responses, we are not interested in return value in some injections |
protected boolean |
isNumber(String name)
|
protected Object |
parseNumber(String value)
|
protected void |
processArgument(Object object,
StringBuilder builder,
List<org.openqa.selenium.WebElement> elements)
|
protected void |
recover()
|
protected void |
resetCounters()
Reset the timeout and retries. |
void |
setDriver(OperaDriver driver)
Set the driver this service belongs to. |
| 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 |
|---|
addRuntime, callFunctionOnObject, callFunctionOnObject, changeRuntime, changeRuntime, cleanUpRuntimes, examineObjects, examineScriptResult, executeJavascript, executeScript, executeScriptOnObject, getObject, getRuntimeId, init, listFramePaths, readyStateChanged, releaseObject, releaseObjects, removeRuntime, resetFramePath, resetRuntimesList, scriptExecutor, setRuntime, updateRuntime |
| Field Detail |
|---|
protected int retries
protected long sleepDuration
OperaIntervals.SCRIPT_RETRY_INTERVAL.
protected IWindowManager windowManager
protected String currentFramePath
protected int activeWindowId
protected OperaDriver driver
protected RuntimeNode root
| Constructor Detail |
|---|
public AbstractEcmascriptService(ScopeServices services,
String version)
| Method Detail |
|---|
protected void resetCounters()
OperaIntervals.SCRIPT_RETRY_INTERVAL as
the default value of the sleep interval sleepDuration.
protected String buildEvalString(List<org.openqa.selenium.WebElement> elements,
String script,
Object... params)
elements - the web elements to send with the script as argumentscript - the script to execute, can have references to argument(s)params - params to send with the script, will be parsed in to arguments
protected void processArgument(Object object,
StringBuilder builder,
List<org.openqa.selenium.WebElement> elements)
public String executeJavascript(String using)
IEcmaScriptDebugger
executeJavascript in interface IEcmaScriptDebuggerusing - script to execute
public String executeJavascript(String using,
boolean responseExpected)
IEcmaScriptDebugger
executeJavascript in interface IEcmaScriptDebuggerusing - script to executeresponseExpected - if true parse the response
protected void recover()
protected Object parseNumber(String value)
protected boolean isNumber(String name)
public void cleanUpRuntimes()
IEcmaScriptDebugger
cleanUpRuntimes in interface IEcmaScriptDebuggerpublic void setDriver(OperaDriver driver)
IEcmaScriptDebugger
setDriver in interface IEcmaScriptDebugger
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||