public class Script extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JAVA_SCRIPT_TYPE |
Modifier and Type | Method and Description |
---|---|
static <T> T |
executeAutoitScript(String code)
Executes AutoIt Script on RPA agent side, not in Control Tower.
|
static <T> T |
executeAutoitScript(String code,
long timeout)
Executes AutoIt Script on RPA agent side, not in Control Tower.
|
static <T> T |
executeAutoitScript(String code,
long timeoutInMillis,
Object... args)
Executes AutoIt Script on RPA agent side, not in Control Tower.
|
static <T> T |
executeGroovyScript(Object code)
Deprecated.
|
static <T> T |
executeGroovyScript(String code)
Executes Groovy script on RPA agent side, not in Control Tower.
|
static <T> T |
executeGroovyScript(String code,
long timeoutInMillis)
Executes Groovy Script on RPA agent side, not in Control Tower.
|
static <T> T |
executeGroovyScript(String code,
long timeoutInMillis,
ScriptParams arguments)
Executes Groovy Script on RPA agent side, not in Control Tower.
|
static <T> T |
executeGroovyScript(String code,
Map<Object,Object> arguments)
Deprecated.
|
static <T> T |
executeGroovyScript(String code,
ScriptParams arguments)
Executes Groovy Script on RPA agent side, not in Control Tower.
|
static <T> T |
executeJavaScript(String code,
Object... args)
Executes Java script on RPA agent side, not in Control Tower.
|
static <T> T |
executeScript(Object code)
Deprecated.
|
static <T> T |
executeScript(Object code,
Object... arguments)
Deprecated.
|
static <T> T |
executeScript(String code)
Deprecated.
|
static <T> T |
executeScript(String code,
Object... arguments)
Deprecated.
|
public static final String JAVA_SCRIPT_TYPE
@Deprecated public static <T> T executeScript(String code, Object... arguments)
As of Release 9.1, replaces by executeGroovyScript(String)
, executeGroovyScript(String, long)
, executeGroovyScript(String, long, ScriptParams)
,
executeAutoitScript(String)
, executeAutoitScript(String, long)
, executeAutoitScript(String, long, Object...)
,
executeJavaScript(String, Object...)
driver.executeScript(...)
Driver Type: Desktop, Web
Desktop: executes basic AutoIt script
Web: executes JavaScript
code
- script code as a Stringarguments
- script arguments.
if arguments == new Object[] {"GROOVY"} THEN Groovy is executed
@Deprecated public static <T> T executeScript(String code)
As of Release 9.1, replaces by executeGroovyScript(String)
, executeGroovyScript(String, long)
, executeGroovyScript(String, long, ScriptParams)
,
executeAutoitScript(String)
, executeAutoitScript(String, long)
, executeAutoitScript(String, long, Object...)
,
executeJavaScript(String, Object...)
executeScript(String, Object...)
Script is executed without arguments
Driver Type: Desktop, Web
@Deprecated public static <T> T executeScript(Object code, Object... arguments)
As of Release 9.1, replaces by executeGroovyScript(String)
, executeGroovyScript(String, long)
, executeGroovyScript(String, long, ScriptParams)
,
executeAutoitScript(String)
, executeAutoitScript(String, long)
, executeAutoitScript(String, long, Object...)
,
executeJavaScript(String, Object...)
driver.executeScript(...)
Driver Type: Desktop, Web
Desktop: executes basic AutoIt script
Web: executes JavaScript
code
- script code as an Objectarguments
- script arguments.
if arguments == new Object[] {"GROOVY"} THEN Groovy is executed
@Deprecated public static <T> T executeScript(Object code)
As of Release 9.1, replaces by executeGroovyScript(String)
, executeGroovyScript(String, long)
, executeGroovyScript(String, long, ScriptParams)
,
executeAutoitScript(String)
, executeAutoitScript(String, long)
, executeAutoitScript(String, long, Object...)
,
executeJavaScript(String, Object...)
executeScript(Object, Object...)
Script is executed without arguments
Driver Type: Desktop, Web
@Deprecated public static <T> T executeGroovyScript(String code, Map<Object,Object> arguments)
As of Release 9.1, replaces by executeGroovyScript(String)
, executeGroovyScript(String, long)
, executeGroovyScript(String, long, ScriptParams)
,
executeAutoitScript(String)
, executeAutoitScript(String, long)
, executeAutoitScript(String, long, Object...)
,
executeJavaScript(String, Object...)
executeScript(code, "GROOVY", args);
Driver Type: Desktop
code
- script code as a Stringarguments
- script arguments.
if arguments == new Object[] {"GROOVY"} THEN Groovy is executed
@Deprecated public static <T> T executeGroovyScript(Object code)
As of Release 9.1, replaces by executeGroovyScript(String)
, executeGroovyScript(String, long)
, executeGroovyScript(String, long, ScriptParams)
,
executeAutoitScript(String)
, executeAutoitScript(String, long)
, executeAutoitScript(String, long, Object...)
,
executeJavaScript(String, Object...)
executeScript(code, new Object[] {"GROOVY"});
Driver Type: Desktop
code
- script code as an Objectpublic static <T> T executeGroovyScript(String code)
Driver Type: Desktop
code
- script code as a Stringdef scriptCode = 'println "Hello Bot! Again!! Smile!! ^_^"'
executeGroovyScript(scriptCode)
public static <T> T executeGroovyScript(String code, long timeoutInMillis)
Driver Type: Desktop
code
- script code as a StringtimeoutInMillis
- timeout for execution of script in millisorg.openqa.selenium.ScriptTimeoutException
- def scriptCode = 'println "Hello Bot! Again!! Smile!! ^_^"'
executeGroovyScript(scriptCode, 1000)
public static <T> T executeGroovyScript(String code, ScriptParams arguments)
Driver Type: Desktop
code
- script code as a Stringarguments
- object representation of arguments for script as map of pairs of argumentName and argumentValuedef param = 2
def scriptCode = 'def sum = 2 + param1; return sum.toString();'
def result3 = executeGroovyScript(scriptCode, new ScriptParams("param1", param))
ScriptParams
public static <T> T executeGroovyScript(String code, long timeoutInMillis, ScriptParams arguments)
Driver Type: Desktop
code
- script code as a StringtimeoutInMillis
- timeout for execution of script in millisarguments
- object representation of arguments for script as map of pairs of argumentName and argumentValueorg.openqa.selenium.ScriptTimeoutException
def param = 2
def scriptCode = 'def sum = 2 + param1; return sum.toString();'
def result3 = executeGroovyScript(scriptCode, 31000L, new ScriptParams("param1", param))
ScriptParams
public static <T> T executeAutoitScript(String code)
Driver Type: Desktop
code
- script code as an Objectdef scriptCode = "ToolTip('Im still alive!!! O_o')"
def result3 = executeAutoitScript(scriptCode)
public static <T> T executeAutoitScript(String code, long timeout)
Driver Type: Desktop
code
- script code as an Objecttimeout
- timeout for execution of scriptorg.openqa.selenium.ScriptTimeoutException
def scriptCode = "ToolTip('Im still alive!!! O_o')"
def result3 = executeAutoitScript(scriptCode, 15000L)
public static <T> T executeAutoitScript(String code, long timeoutInMillis, Object... args)
Driver Type: Desktop
code
- script code as an ObjecttimeoutInMillis
- timeout for execution of script in millisorg.openqa.selenium.ScriptTimeoutException
def param = 2
def scriptCode = 'def sum = 2 + param1; return sum.toString();'
def result3 = executeAutoitScript(scriptCode,3000L, new ScriptParams("param1", param))
public static <T> T executeJavaScript(String code, Object... args)
Driver Type: Web
code
- script code as a Stringargs
- script arguments.def script = "return 'hello java script';"
def result3 = executeJavaScript(script
Copyright 2016, WorkFusion, Inc.