public class EmbeddedJSAFSDriver
extends java.lang.Object
The class does NOT subclass any existing SAFS class like DefaultDriver
.
Instead, the class instantiates a reference to a JSAFSDriver
that handles all
the interfacing with SAFS for the developer. The JSAFSDriver will expect a Java System
property to point to the INI file it would use for initialization. Like:
-Dsafs.project.config="pathTo\Driver.INI"
In this example, the JSAFSDriver is initialized in main(String[])
when this
EmbeddedJSAFSDriver class is executed in the JVM.
This example also show how one might reuse the same Java classes for NLS testing by passing in parameters for the primary and localized App Maps (Resources) to be used for testing.
Example -D System Properties set during command-line invocation:
-Dmain_map="MyMainApp.map" -Dlocal_map="MyLocalApp_en.map" or
-Dmain_map="MyMainApp.map" -Dlocal_map="MyLocalApp_zh_CN.map"
Modifier and Type | Field and Description |
---|---|
JSAFSDriver |
jsafs
A readily accessible reference to the instantiated JSAFSDriver used by the test.
|
static java.lang.String |
LOCAL_MAP
"local_map"
|
static EditBox |
Login_Password
|
static PushButton |
Login_Submit
Optional
PushButton reference to our Login Submit button
To be used when a Component reference might be desired instead of a String name. |
static EditBox |
Login_UserID
|
static java.lang.String |
LoginPassword
"LoginPassword"
App Map component name for Login Window Password EditBox
To be used when the String name of the component is needed.
|
static java.lang.String |
LoginSubmit
"LoginSubmit"
App Map component name for Login Window Submit Button
To be used when the String name of the component is needed.
|
static java.lang.String |
LoginUserID
"LoginUserID"
App Map component name for Login Window UserID EditBox.
|
static java.lang.String |
LoginWindow
"LoginWindow"
App Map window name for Login Window.
|
static Window |
LoginWindowUI
|
static java.lang.String |
MAIN_MAP
"main_map"
|
static java.lang.String |
MainWindow
"MainWindow"
App Map window name for main application window (after successful Login)
To be used when the String name of the window is needed.
|
static Window |
MainWindowUI
Optional
Window reference to our Main Window. |
Constructor and Description |
---|
EmbeddedJSAFSDriver() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Possible main entry point for the test class.
|
public static final java.lang.String MAIN_MAP
In our example, this should be another -D System Property passed in at invocation.
Example:
-Dmain_map="MyMainApp.map"
This tells the test which primary (non-localizable) App Map should be used for the test.
public static final java.lang.String LOCAL_MAP
In our example, this should be another -D System Property passed in at invocation.
Example:
-Dlocal_map="MyMainApp_en.map" or
-Dlocal_map="MyMainApp_zh_CN.map"
This tells the test which localized resource should be used for the test.
public static final java.lang.String LoginWindow
public static final java.lang.String LoginUserID
public static final java.lang.String LoginPassword
public static final java.lang.String LoginSubmit
public static final java.lang.String MainWindow
public static final Window LoginWindowUI
public static final EditBox Login_UserID
public static final EditBox Login_Password
public static final PushButton Login_Submit
PushButton
reference to our Login Submit button
To be used when a Component
reference might be desired instead of a String name.public static final Window MainWindowUI
public JSAFSDriver jsafs
public static void main(java.lang.String[] args)
java -Dsafs.project.config="pathTo\Driver.INI" -Dmain_map="MyMainApp.map" -Dlocal_map="MyLocalApp_en.map" EmbeddedJSAFSDriver
This example performs the following:
args
- Copyright © SAS Institute. All Rights Reserved.