public class WDScriptFactory
extends com.sebuilder.interpreter.factory.ScriptFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANDWAIT_CLASS |
static java.lang.String |
CSS_LOCATORTYPE |
static java.lang.String |
CSSSELECTOR_LOCATORTYPE |
protected com.sebuilder.interpreter.factory.DataSourceFactory |
dataSourceFactory |
static java.lang.String |
ID_LOCATORTYPE |
static java.lang.String |
ITEM_PARAM |
static java.lang.String |
LINK_LOCATORTYPE |
static java.lang.String |
LINKTEXT_LOCATORTYPE |
static java.lang.String |
LOCATOR_PARAM |
static java.lang.String |
MAP_LOCATORTYPE |
static java.lang.String |
NAME_LOCATORTYPE |
static java.lang.String |
PAUSE_CLASS |
static java.lang.String |
SR_TABLE_TBODY |
static java.lang.String |
SR_TABLE_TD |
static java.lang.String |
SR_TABLE_TR |
static java.lang.String |
SRSTEPTYPE_PACKAGE
"org.safs.selenium.webdriver.lib.interpreter.selrunner.steptype"
|
protected com.sebuilder.interpreter.factory.StepTypeFactory |
stepTypeFactory |
static java.lang.String |
STORE_CLASS |
protected WDTestRunFactory |
testRunFactory |
static java.lang.String |
TEXT_PARAM |
static java.lang.String |
VALUE_LOCATORTYPE |
static java.lang.String |
VARIABLE_PARAM |
static java.lang.String |
WAITTIME_PARAM |
static java.lang.String |
XPATH_LOCATORTYPE |
Constructor and Description |
---|
WDScriptFactory() |
Modifier and Type | Method and Description |
---|---|
protected javax.xml.parsers.DocumentBuilder |
getDocumentBuilder() |
protected java.io.BufferedReader |
getUTF8Reader(java.io.File sourceFile) |
java.util.List<com.sebuilder.interpreter.Script> |
parse(org.w3c.dom.Document d,
java.io.File f,
com.sebuilder.interpreter.factory.StepTypeFactory stepTypeFactory)
Parse a XML/HTML Fit Table Document into a Script object.
|
java.util.List<com.sebuilder.interpreter.Script> |
parse(java.io.File f) |
java.util.List<com.sebuilder.interpreter.Script> |
parse(java.io.Reader reader,
java.io.File sourceFile) |
java.util.List<com.sebuilder.interpreter.Script> |
parse(java.lang.String script,
java.io.File sourceFile) |
protected void |
processNativeStep(com.sebuilder.interpreter.Step step,
java.lang.String[] params) |
protected com.sebuilder.interpreter.factory.StepTypeFactory stepTypeFactory
protected WDTestRunFactory testRunFactory
protected com.sebuilder.interpreter.factory.DataSourceFactory dataSourceFactory
public static final java.lang.String SRSTEPTYPE_PACKAGE
public static final java.lang.String SR_TABLE_TBODY
public static final java.lang.String SR_TABLE_TR
public static final java.lang.String SR_TABLE_TD
public static final java.lang.String LOCATOR_PARAM
public static final java.lang.String TEXT_PARAM
public static final java.lang.String ITEM_PARAM
public static final java.lang.String VARIABLE_PARAM
public static final java.lang.String WAITTIME_PARAM
public static final java.lang.String XPATH_LOCATORTYPE
public static final java.lang.String MAP_LOCATORTYPE
public static final java.lang.String LINK_LOCATORTYPE
public static final java.lang.String LINKTEXT_LOCATORTYPE
public static final java.lang.String NAME_LOCATORTYPE
public static final java.lang.String ID_LOCATORTYPE
public static final java.lang.String VALUE_LOCATORTYPE
public static final java.lang.String CSS_LOCATORTYPE
public static final java.lang.String CSSSELECTOR_LOCATORTYPE
public static final java.lang.String ANDWAIT_CLASS
public static final java.lang.String PAUSE_CLASS
public static final java.lang.String STORE_CLASS
public java.util.List<com.sebuilder.interpreter.Script> parse(java.lang.String script, java.io.File sourceFile) throws java.io.IOException
parse
in class com.sebuilder.interpreter.factory.ScriptFactory
script
- -- One of two possible formats:sourceFile
- Optionally. the file the script was loaded from.java.io.IOException
- If anything goes wrong with interpreting the script, or
with any Readers.public java.util.List<com.sebuilder.interpreter.Script> parse(org.w3c.dom.Document d, java.io.File f, com.sebuilder.interpreter.factory.StepTypeFactory stepTypeFactory) throws java.io.IOException
d
- the Document object parsed from the HTML source File.f
- the File the HTML file was sourced from.stepTypeFactory
- java.io.IOException
protected void processNativeStep(com.sebuilder.interpreter.Step step, java.lang.String[] params)
public java.util.List<com.sebuilder.interpreter.Script> parse(java.io.Reader reader, java.io.File sourceFile) throws java.io.IOException
parse
in class com.sebuilder.interpreter.factory.ScriptFactory
reader
- A Reader pointing to one of 2 possible script formats:sourceFile
- Optionally. the file the script was loaded from.java.io.IOException
- If anything goes wrong with interpreting the script, or
with the Reader.protected javax.xml.parsers.DocumentBuilder getDocumentBuilder() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
protected java.io.BufferedReader getUTF8Reader(java.io.File sourceFile) throws java.io.IOException
sourceFile
- java.io.IOException
public java.util.List<com.sebuilder.interpreter.Script> parse(java.io.File f) throws java.io.IOException
parse
in class com.sebuilder.interpreter.factory.ScriptFactory
f
- A File pointing to a JSON file describing a script or suite.java.io.IOException
- If anything goes wrong with interpreting the JSON, or
with the Reader.org.json.JSONException
- If the JSON can't be parsed.Copyright © SAS Institute. All Rights Reserved.