com.appperfect.apptest.script
Interface IScriptEngine

All Superinterfaces:
IDatabaseHandler, INotificationHandler, IParameterHandler

public interface IScriptEngine
extends IDatabaseHandler, INotificationHandler, IParameterHandler

An engine which is created as a global variable by the application to be used in the script file that controls the execution of the test in the script file.

A IScriptEngine object is initialised by the application and is available as a global variable in the script file with the name engine. Flow of the test is controlled by this engine. App Test supports functional testing of windows and Java application. Group(s) can be added/deleted/edited from UI. An Action group is created and all the tasks (Window / Event) are recorded in this group

Tasks supported by App Test are IWindow and window or java elements and events on the same. The following code fragment illustrates how to create an IWindow task.

                 var window = engine.createWindow(1, 'Notepad', false);
 

Once a task is created, all its properties like think time, title, breakpoints etc. can be initialised to proper values using appropriate apis exposed by individual tasks. The following code fragment illustrates how to set think time for a IWindow task.

 window.setThinkTime(1);
 
The following code fragment illustrates how to add attribute for a Window element task.
       element.addAttribute('nativeClass', 'Edit', false, false);
 

Once a task is initialised it should be executed to fetch the results and process further. The following code fragment illustrates how to execute a window task.

 var successful = engine.executeWindow(window);
 

After execution of each task, it is must to call release method to release all the opened resources.

See Also:
IWindow, WinObject

Field Summary
 
Fields inherited from interface com.appperfect.devcommon.script.IParameterHandler
Contains, EndsWith, Equals, GreaterThan, GreaterThanEqualTo, LessThan, LessThanEqualTo, Matches, NotContains, NotEndsWith, NotEquals, NotMatches, NotStartsWith, StartsWith
 
Method Summary
 boolean captureImageForComponent(java.lang.String accPath, java.lang.String imagePath)
 Capture the image for component at given accessible path
 AwtButton createAwtButton(int id, int iElementType)
 This method is used to create the AwtButton element.
 AwtCanvas createAwtCanvas(int id, int iElementType)
 This method is used to create the AwtCanvas element.
 AwtCheckbox createAwtCheckbox(int id, int iElementType)
 This method is used to create the AwtCheckbox element.
 AwtCheckboxMenuItem createAwtCheckboxMenuItem(int id, int iElementType)
 This method is used to create the AwtCheckboxMenuItem element.
 AwtComboBox createAwtCombobox(int id, int iElementType)
 This method is used to create the AwtCombobox element.
 AwtComponent createAwtComponent(int id, int iElementType)
 This method is used to create the AwtComponent element.
 AwtContainer createAwtContainer(int id, int iElementType)
 This method is used to create the AwtContainer element.
 AwtDialog createAwtDialog(int id, int iElementType)
 This method is used to create the AwtDialog element.
 AwtFileDialog createAwtFileDialog(int id, int iElementType)
 This method is used to create the AwtFileDialog element.
 AwtFrame createAwtFrame(int id, int iElementType)
 This method is used to create the AwtFrame element.
 AwtLabel createAwtLabel(int id, int iElementType)
 This method is used to create the AwtLabel element.
 AwtList createAwtList(int id, int iElementType)
 This method is used to create the AwtList element.
 AwtMenuItem createAwtMenuItem(int id, int iElementType)
 This method is used to create the AwtMenuItem element.
 AwtPanel createAwtPanel(int id, int iElementType)
 This method is used to create the AwtPanel element.
 AwtScrollbar createAwtScrollbar(int id, int iElementType)
 This method is used to create the AwtScrollbar element.
 AwtScrollPane createAwtScrollPane(int id, int iElementType)
 This method is used to create the AwtScrollPane element.
 AwtTextArea createAwtTextArea(int id, int iElementType)
 This method is used to create the AwtTextArea element.
 AwtTextComponent createAwtTextComponent(int id, int iElementType)
 This method is used to create the AwtTextComponent element.
 AwtTextField createAwtTextField(int id, int iElementType)
 This method is used to create the AwtTextField element.
 AwtWindow createAwtWindow(int id, int iElementType)
 This method is used to create the AwtWindow element.
 JavaComponent createJavaComponent(int id, java.lang.String sWindowClass, int iElementType)
 This method is used to create the JavaComponent element.
 SwingButton createSwingButton(int id, int iElementType)
 This method is used to create the SwingButton element.
 SwingCheckbox createSwingCheckbox(int id, int iElementType)
 This method is used to create the SwingCheckbox element.
 SwingCheckBoxMenuItem createSwingCheckBoxMenuItem(int id, int iElementType)
 This method is used to create the SwingCheckBoxMenuItem element.
 SwingComboBox createSwingComboBox(int id, int iElementType)
 This method is used to create the SwingComboBox element.
 SwingComponent createSwingComponent(int id, int iElementType)
 This method is used to create the SwingComponent element.
 SwingDialog createSwingDialog(int id, int iElementType)
 This method is used to create the SwingDialog element.
 SwingFileChooser createSwingFileChooser(int id, int iElementType)
 This method is used to create the SwingFileChooser element.
 SwingFrame createSwingFrame(int id, int iElementType)
 This method is used to create the SwingFrame element.
 SwingLabel createSwingLabel(int id, int iElementType)
 This method is used to create the SwingLabel element.
 SwingList createSwingList(int id, int iElementType)
 This method is used to create the SwingList element.
 SwingMenu createSwingMenu(int id, int iElementType)
 This method is used to create the SwingMenu element.
 SwingMenuItem createSwingMenuItem(int id, int iElementType)
 This method is used to create the SwingMenuItem element.
 SwingPanel createSwingPanel(int id, int iElementType)
 This method is used to create the SwingPanel element.
 SwingPasswordField createSwingPasswordField(int id, int iElementType)
 This method is used to create the SwingPasswordField element.
 SwingProgressBar createSwingProgressBar(int id, int iElementType)
 This method is used to create the SwingProgressBar element.
 SwingRadioButtonMenuItem createSwingRadioButtonMenuItem(int id, int iElementType)
 This method is used to create the SwingRadioButtonMenuItem element.
 SwingScrollBar createSwingScrollBar(int id, int iElementType)
 This method is used to create the SwingScrollBar element.
 SwingSlider createSwingSlider(int id, int iElementType)
 This method is used to create the SwingSlider element.
 SwingSpinner createSwingSpinner(int id, int iElementType)
 This method is used to create the SwingSpinner element.
 SwingSplitPane createSwingSplitPane(int id, int iElementType)
 This method is used to create the SwingSplitPane element.
 SwingTabbedPane createSwingTabbedPane(int id, int iElementType)
 This method is used to create the SwingTabbedPane element.
 SwingTable createSwingTable(int id, int iElementType)
 This method is used to create the SwingTable element.
 SwingTextArea createSwingTextArea(int id, int iElementType)
 This method is used to create the SwingTextArea element.
 SwingTextComponent createSwingTextComponent(int id, int iElementType)
 This method is used to create the SwingTextComponent element.
 SwingTextField createSwingTextField(int id, int iElementType)
 This method is used to create the SwingTextField element.
 SwingToggleButton createSwingToggleButton(int id, int iElementType)
 This method is used to create the SwingToggleButton element.
 SwingTree createSwingTree(int id, int iElementType)
 This method is used to create the SwingTree element.
 SwingWindow createSwingWindow(int id, int iElementType)
 This method is used to create the SwingWindow element.
 WinApplet createWinApplet(int id, int iElementType)
 This method is used to create the WinApplet element.
 WinButton createWinButton(int id, int iElementType)
 This method is used to create the WinButton element.
 WinCalendar createWinCalendar(int id, int iElementType)
 This method is used to create the WinCalendar element.
 WinCheckBox createWinCheckBox(int id, int iElementType)
 This method is used to create the WinCheckBox element.
 WinComboBox createWinComboBox(int id, int iElementType)
 This method is used to create the WinComboBox element.
 WinComboListBox createWinComboListBox(int id, int iElementType)
 This method is used to create the WinComboListBox element.
 IWindow createWindow(int id, java.lang.String sWindowTitle, boolean bDialog)
 This method is used to create the IWindow task.
 IWindowsTest createWindowsTest()
 To create windows or java test project
 WinEdit createWinEdit(int id, int iElementType)
 This method is used to create the WinEdit element.
 WinFlash createWinFlash(int id, int iElementType)
 This method is used to create the WinFlash element.
 WinListBox createWinListBox(int id, int iElementType)
 This method is used to create the WinListBox element.
 WinListView createWinListView(int id, int iElementType)
 This method is used to create the WinListView element.
 WinMenu createWinMenu(int id, java.lang.String sWindowClass, int iElementType)
 This method is used to create the WinMenu element.
 WinMenuWindow createWinMenuWindow(int id, int iElementType)
 This method is used to create the WinMenuWindow element.
 WinObject createWinObject(int id, java.lang.String sWindowClass, int iElementType)
 This method is used to create the WinObject element.
 WinRadioButton createWinRadioButton(int id, int iElementType)
 This method is used to create the WinRadioButton element.
 WinScrollbar createWinScrollbar(int id, int iElementType)
 This method is used to create the WinScrollbar element.
 WinSpin createWinSpin(int id, int iElementType)
 This method is used to create the WinSpin element.
 WinStatic createWinStatic(int id, int iElementType)
 This method is used to create the WinStatic element.
 WinStatusBar createWinStatusBar(int id, int iElementType)
 This method is used to create the WinStatusBar element.
 WinTab createWinTab(int id, int iElementType)
 This method is used to create the WinTab element.
 WinToolbar createWinToolbar(int id, int iElementType)
 This method is used to create the WinToolbar element.
 WinTreeView createWinTreeView(int id, int iElementType)
 This method is used to create the WinTreeView element.
 boolean executeWindow(IWindow window)
 Executes the IWindow task object passed.
 java.lang.String[] getAttributeNames(java.lang.String accPath)
 To fetch names of all the attributes / properties for component at given accessible path.
 java.lang.String[] getAttributeValues(java.lang.String accPath, java.lang.String[] attribNames)
 To fetch values of all the given attributes / properties for component at given accessible path.
 int getChildCount(java.lang.String parentAccPath, int depth)
 To fetch child count of component at given accessible path
 java.lang.String[][] getChildrenAccessiblePaths(java.lang.String parentAccPath, int depth)
 To fetch accessible paths of all the children of component at given accessible path
 int getIterationNumber()
 To get the number of iterations performed till now, including the one currently in progress.
 java.lang.String[] getPossibleActions(java.lang.String accPath)
 To fetch the names of all the possible actions for component at given accessible path.
 boolean performAction(java.lang.String accPath, java.lang.String action)
 Performs the given action on component at given accessible path
 void release()
 Releases all the internal objects like ResultSet, Connection are released in this method.
 
Methods inherited from interface com.appperfect.devcommon.script.IDatabaseHandler
closeResultSet, executeInsertUpdateQuery, executeSelectQuery, getLastError, getNumberOfDatabaseColumns, getNumberOfDatabaseRows, getResultSet, getValueFromDatabase, isDatabaseConnectionValid, setDatabaseConnection
 
Methods inherited from interface com.appperfect.devcommon.script.INotificationHandler
sendEmailNotificaion, sendEmailNotificaion, sendEmailNotificaion
 
Methods inherited from interface com.appperfect.devcommon.script.IParameterHandler
assertTestParameterValue, getParameterValue, getParameterValue, getParameterValueByParsing, getParameterValueByParsing, getParameterValueForPattern
 

Method Detail

captureImageForComponent

boolean captureImageForComponent(java.lang.String accPath,
                                 java.lang.String imagePath)
Capture the image for component at given accessible path

Parameters:
accPath - accessible path of component whose image should be taken
imagePath - full path of image including the image file name where the image should be saved
Returns:
true if action was successful, false otherwise.

createAwtButton

AwtButton createAwtButton(int id,
                          int iElementType)
This method is used to create the AwtButton element. Represents java.awt.Button class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtButton object for execution

createAwtCanvas

AwtCanvas createAwtCanvas(int id,
                          int iElementType)
This method is used to create the AwtCanvas element. Represents java.awt.Canvas class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtCanvas object for execution

createAwtCheckbox

AwtCheckbox createAwtCheckbox(int id,
                              int iElementType)
This method is used to create the AwtCheckbox element. Represents java.awt.Checkbox class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtCheckbox object for execution

createAwtCheckboxMenuItem

AwtCheckboxMenuItem createAwtCheckboxMenuItem(int id,
                                              int iElementType)
This method is used to create the AwtCheckboxMenuItem element. Represents java.awt.CheckboxMenuItem class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtCheckboxMenuItem object for execution

createAwtCombobox

AwtComboBox createAwtCombobox(int id,
                              int iElementType)
This method is used to create the AwtCombobox element. Represents java.awt.Choice class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtCombobox object for execution

createAwtComponent

AwtComponent createAwtComponent(int id,
                                int iElementType)
This method is used to create the AwtComponent element. Represents java.awt.Component class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtComponent object for execution

createAwtContainer

AwtContainer createAwtContainer(int id,
                                int iElementType)
This method is used to create the AwtContainer element. Represents java.awt.Container class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtContainer object for execution

createAwtDialog

AwtDialog createAwtDialog(int id,
                          int iElementType)
This method is used to create the AwtDialog element. Represents java.awt.Dialog class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtDialog object for execution

createAwtFileDialog

AwtFileDialog createAwtFileDialog(int id,
                                  int iElementType)
This method is used to create the AwtFileDialog element. Represents java.awt.FileDialog class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtFileDialog object for execution

createAwtFrame

AwtFrame createAwtFrame(int id,
                        int iElementType)
This method is used to create the AwtFrame element. Represents java.awt.Frame class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtFrame object for execution

createAwtLabel

AwtLabel createAwtLabel(int id,
                        int iElementType)
This method is used to create the AwtLabel element. Represents java.awt.Label class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtLabel object for execution

createAwtList

AwtList createAwtList(int id,
                      int iElementType)
This method is used to create the AwtList element. Represents java.awt.List class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtList object for execution

createAwtMenuItem

AwtMenuItem createAwtMenuItem(int id,
                              int iElementType)
This method is used to create the AwtMenuItem element. Represents java.awt.MenuItem class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtMenuItem object for execution

createAwtPanel

AwtPanel createAwtPanel(int id,
                        int iElementType)
This method is used to create the AwtPanel element. Represents java.awt.Panel class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtPanel object for execution

createAwtScrollbar

AwtScrollbar createAwtScrollbar(int id,
                                int iElementType)
This method is used to create the AwtScrollbar element. Represents java.awt.Scrollbar class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtScrollbar object for execution

createAwtScrollPane

AwtScrollPane createAwtScrollPane(int id,
                                  int iElementType)
This method is used to create the AwtScrollPane element. Represents java.awt.ScrollPane class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtScrollPane object for execution

createAwtTextArea

AwtTextArea createAwtTextArea(int id,
                              int iElementType)
This method is used to create the AwtTextArea element. Represents java.awt.TextArea class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtTextArea object for execution

createAwtTextComponent

AwtTextComponent createAwtTextComponent(int id,
                                        int iElementType)
This method is used to create the AwtTextComponent element. Represents java.awt.TextComponent class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtTextComponent object for execution

createAwtTextField

AwtTextField createAwtTextField(int id,
                                int iElementType)
This method is used to create the AwtTextField element. Represents java.awt.TextField class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtTextField object for execution

createAwtWindow

AwtWindow createAwtWindow(int id,
                          int iElementType)
This method is used to create the AwtWindow element. Represents java.awt.Window class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtWindow object for execution

createJavaComponent

JavaComponent createJavaComponent(int id,
                                  java.lang.String sWindowClass,
                                  int iElementType)
This method is used to create the JavaComponent element. This is the base element for any Java element. Should be used for creating an element whose class name is known and corresponding element for same is not present in the standard elements list supported by default.

Parameters:
id - is the Task Id. Should be unique across the test
sWindowClass - represents name of the AWT/Swing class.
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application Frame.
Returns:
JavaComponent object for execution

createSwingButton

SwingButton createSwingButton(int id,
                              int iElementType)
This method is used to create the SwingButton element. Represents javax.swing.JButton class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingButton object for execution

createSwingCheckbox

SwingCheckbox createSwingCheckbox(int id,
                                  int iElementType)
This method is used to create the SwingCheckbox element. Represents javax.swing.JCheckbox class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingCheckbox object for execution

createSwingCheckBoxMenuItem

SwingCheckBoxMenuItem createSwingCheckBoxMenuItem(int id,
                                                  int iElementType)
This method is used to create the SwingCheckBoxMenuItem element. Represents javax.swing.JCheckBoxMenuItem class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingCheckBoxMenuItem object for execution

createSwingComboBox

SwingComboBox createSwingComboBox(int id,
                                  int iElementType)
This method is used to create the SwingComboBox element. Represents javax.swing.JComboBox class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingComboBox object for execution

createSwingComponent

SwingComponent createSwingComponent(int id,
                                    int iElementType)
This method is used to create the SwingComponent element. Represents javax.swing.JComponent class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingComponent object for execution

createSwingDialog

SwingDialog createSwingDialog(int id,
                              int iElementType)
This method is used to create the SwingDialog element. Represents javax.swing.Dialog class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingDialog object for execution

createSwingFileChooser

SwingFileChooser createSwingFileChooser(int id,
                                        int iElementType)
This method is used to create the SwingFileChooser element. Represents javax.swing.JFileChooser class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingFileChooser object for execution

createSwingFrame

SwingFrame createSwingFrame(int id,
                            int iElementType)
This method is used to create the SwingFrame element. Represents javax.swing.JFrame class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingFrame object for execution

createSwingLabel

SwingLabel createSwingLabel(int id,
                            int iElementType)
This method is used to create the SwingLabel element. Represents javax.swing.JLabel class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingLabel object for execution

createSwingList

SwingList createSwingList(int id,
                          int iElementType)
This method is used to create the SwingList element. Represents javax.swing.JList class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingList object for execution

createSwingMenu

SwingMenu createSwingMenu(int id,
                          int iElementType)
This method is used to create the SwingMenu element. Represents javax.swing.JMenu class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
AwtSwingMenu object for execution

createSwingMenuItem

SwingMenuItem createSwingMenuItem(int id,
                                  int iElementType)
This method is used to create the SwingMenuItem element. Represents javax.swing.JMenuItem class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingMenuItem object for execution

createSwingPanel

SwingPanel createSwingPanel(int id,
                            int iElementType)
This method is used to create the SwingPanel element. Represents javax.swing.JPanel class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingPanel object for execution

createSwingPasswordField

SwingPasswordField createSwingPasswordField(int id,
                                            int iElementType)
This method is used to create the SwingPasswordField element. Represents javax.swing.JPasswordField class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingPasswordField object for execution

createSwingProgressBar

SwingProgressBar createSwingProgressBar(int id,
                                        int iElementType)
This method is used to create the SwingProgressBar element. Represents javax.swing.JProgressBar class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingProgressBar object for execution

createSwingRadioButtonMenuItem

SwingRadioButtonMenuItem createSwingRadioButtonMenuItem(int id,
                                                        int iElementType)
This method is used to create the SwingRadioButtonMenuItem element. Represents javax.swing.JRadioButtonMenuItem class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingRadioButtonMenuItem object for execution

createSwingScrollBar

SwingScrollBar createSwingScrollBar(int id,
                                    int iElementType)
This method is used to create the SwingScrollBar element. Represents javax.swing.JScrollBar class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingScrollBar object for execution

createSwingSlider

SwingSlider createSwingSlider(int id,
                              int iElementType)
This method is used to create the SwingSlider element. Represents javax.swing.JSlider class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingSlider object for execution

createSwingSpinner

SwingSpinner createSwingSpinner(int id,
                                int iElementType)
This method is used to create the SwingSpinner element. Represents javax.swing.JSpinner class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingSpinner object for execution

createSwingSplitPane

SwingSplitPane createSwingSplitPane(int id,
                                    int iElementType)
This method is used to create the SwingSplitPane element. Represents javax.swing.JSplitPane class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingSplitPane object for execution

createSwingTabbedPane

SwingTabbedPane createSwingTabbedPane(int id,
                                      int iElementType)
This method is used to create the SwingTabbedPane element. Represents javax.swing.JTabbedPane class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingTabbedPane object for execution

createSwingTable

SwingTable createSwingTable(int id,
                            int iElementType)
This method is used to create the SwingTable element. Represents javax.swing.JTable class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingTable object for execution

createSwingTextArea

SwingTextArea createSwingTextArea(int id,
                                  int iElementType)
This method is used to create the SwingTextArea element. Represents javax.swing.JTextArea class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingTextArea object for execution

createSwingTextComponent

SwingTextComponent createSwingTextComponent(int id,
                                            int iElementType)
This method is used to create the SwingTextComponent element. Represents javax.swing.JTextComponent class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingTextComponent object for execution

createSwingTextField

SwingTextField createSwingTextField(int id,
                                    int iElementType)
This method is used to create the SwingTextField element. Represents javax.swing.JTextField class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingTextField object for execution

createSwingToggleButton

SwingToggleButton createSwingToggleButton(int id,
                                          int iElementType)
This method is used to create the SwingToggleButton element. Represents javax.swing.JToggleButton class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingToggleButton object for execution

createSwingTree

SwingTree createSwingTree(int id,
                          int iElementType)
This method is used to create the SwingTree element. Represents javax.swing.JTree class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingTree object for execution

createSwingWindow

SwingWindow createSwingWindow(int id,
                              int iElementType)
This method is used to create the SwingWindow element. Represents javax.swing.JWindow class.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child frame, 5 if element is on main application or Top Level Frame.
Returns:
SwingWindow object for execution

createWinApplet

WinApplet createWinApplet(int id,
                          int iElementType)
This method is used to create the WinApplet element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinApplet object for execution

createWinButton

WinButton createWinButton(int id,
                          int iElementType)
This method is used to create the WinButton element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinButton object for execution

createWinCalendar

WinCalendar createWinCalendar(int id,
                              int iElementType)
This method is used to create the WinCalendar element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinCalendar object for execution

createWinCheckBox

WinCheckBox createWinCheckBox(int id,
                              int iElementType)
This method is used to create the WinCheckBox element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinCheckBox object for execution

createWinComboBox

WinComboBox createWinComboBox(int id,
                              int iElementType)
This method is used to create the WinComboBox element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinComboBox object for execution

createWinComboListBox

WinComboListBox createWinComboListBox(int id,
                                      int iElementType)
This method is used to create the WinComboListBox element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 1 if element is on a WebBrowser, 2 if element is on top level page, 3 if element is present on subframe.
Returns:
WinComboListBox object for execution

createWindow

IWindow createWindow(int id,
                     java.lang.String sWindowTitle,
                     boolean bDialog)
This method is used to create the IWindow task.

Parameters:
id - is the Task Id. Should be unique across the test
sWindowTitle - is title of the window
bDialog - whether its a dialog or a Window.
Returns:
IWindow object for execution

createWindowsTest

IWindowsTest createWindowsTest()
To create windows or java test project

Returns:
IWindowTest

createWinEdit

WinEdit createWinEdit(int id,
                      int iElementType)
This method is used to create the WinEdit element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinEdit object for execution

createWinFlash

WinFlash createWinFlash(int id,
                        int iElementType)
This method is used to create the WinFlash element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinFlash object for execution

createWinListBox

WinListBox createWinListBox(int id,
                            int iElementType)
This method is used to create the WinListBox element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinListBox object for execution

createWinListView

WinListView createWinListView(int id,
                              int iElementType)
This method is used to create the WinListView element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinListView object for execution

createWinMenu

WinMenu createWinMenu(int id,
                      java.lang.String sWindowClass,
                      int iElementType)
This method is used to create the WinMenu element.

Parameters:
id - is the Task Id. Should be unique across the test
sWindowClass - represents name of the window class.
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinMenu object for execution

createWinMenuWindow

WinMenuWindow createWinMenuWindow(int id,
                                  int iElementType)
This method is used to create the WinMenuWindow element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 1 if element is on a WebBrowser, 2 if element is on top level page, 3 if element is present on subframe.
Returns:
WinMenuWindow object for execution

createWinObject

WinObject createWinObject(int id,
                          java.lang.String sWindowClass,
                          int iElementType)
This method is used to create the WinObject element. This is the base element for any window component. Should be used for creating an element whose class name is known and equivalent element for same is not present in the standard elements supported by default.

Parameters:
id - is the Task Id. Should be unique across the test
sWindowClass - represents name of the window class.
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinObject object for execution

createWinRadioButton

WinRadioButton createWinRadioButton(int id,
                                    int iElementType)
This method is used to create the WinRadioButton element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinRadioButton object for execution

createWinScrollbar

WinScrollbar createWinScrollbar(int id,
                                int iElementType)
This method is used to create the WinScrollbar element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinScrollbar object for execution

createWinSpin

WinSpin createWinSpin(int id,
                      int iElementType)
This method is used to create the WinSpin element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinSpin object for execution

createWinStatic

WinStatic createWinStatic(int id,
                          int iElementType)
This method is used to create the WinStatic element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinStatic object for execution

createWinStatusBar

WinStatusBar createWinStatusBar(int id,
                                int iElementType)
This method is used to create the WinStatusBar element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinStatusBar object for execution

createWinTab

WinTab createWinTab(int id,
                    int iElementType)
This method is used to create the WinTab element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinTab object for execution

createWinToolbar

WinToolbar createWinToolbar(int id,
                            int iElementType)
This method is used to create the WinToolbar element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinToolbar object for execution

createWinTreeView

WinTreeView createWinTreeView(int id,
                              int iElementType)
This method is used to create the WinTreeView element.

Parameters:
id - is the Task Id. Should be unique across the test
iElementType - possible values, 4 if element is on a Dialog or a child window, 5 if element is on main application window.
Returns:
WinTreeView object for execution

executeWindow

boolean executeWindow(IWindow window)
Executes the IWindow task object passed.

Parameters:
window - The IWindow object to be executed
Returns:
true if the window was executed successfully; false if there was an error during execution.

getAttributeNames

java.lang.String[] getAttributeNames(java.lang.String accPath)
To fetch names of all the attributes / properties for component at given accessible path.

Parameters:
accPath - accessible path of the component whose attributes / properties needs to be fetched.
Returns:
String array containing names of the attributes / properties

getAttributeValues

java.lang.String[] getAttributeValues(java.lang.String accPath,
                                      java.lang.String[] attribNames)
To fetch values of all the given attributes / properties for component at given accessible path.

Parameters:
accPath - accessible path of the component whose attributes / properties needs to be fetched.
attribNames - name of the attributes / properties whose values needs to be fetched.
Returns:
String array containing names of the attributes / properties

getChildCount

int getChildCount(java.lang.String parentAccPath,
                  int depth)
To fetch child count of component at given accessible path

Parameters:
parentAccPath - parent's accessible path whose children needs to be traversed.
depth - level till the traversal should be done, 0 specifies just the immediate child count, if depth is greater than the hierarchy depth, returns count of all children in heirarchy
Returns:
number of children for given parent till given depth

getChildrenAccessiblePaths

java.lang.String[][] getChildrenAccessiblePaths(java.lang.String parentAccPath,
                                                int depth)
To fetch accessible paths of all the children of component at given accessible path

Parameters:
parentAccPath - parent's accessible path whose children needs to be traversed.
depth - level till the traversal should be done, 0 specifies just the immediate children, if depth is greater than the hierarchy depth, returns all children in heirarchy
Returns:
Array of Array of strings containing the children accessible path.

getIterationNumber

int getIterationNumber()
To get the number of iterations performed till now, including the one currently in progress.

Returns:
the number of iterations performed till now, including the one currently in progress.

getPossibleActions

java.lang.String[] getPossibleActions(java.lang.String accPath)
To fetch the names of all the possible actions for component at given accessible path.

Parameters:
accPath - accessible path of component whose supported actions needs to be fetched.
Returns:
supported actions for given component

performAction

boolean performAction(java.lang.String accPath,
                      java.lang.String action)
Performs the given action on component at given accessible path

Parameters:
accPath - accessible path of component on which action should be performed
action - name of the action to perform
Returns:
true if action was successful, false otherwise.

release

void release()
Releases all the internal objects like ResultSet, Connection are released in this method. Also this method takes care of saving the response to disk. This method should be always called in the end after the execution of each task.



Copyright © 2003-2011 AppPerfect Corporation. All Rights Reserved.