Class GUIAutomationFixture
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.zerog.ia.test.fixtures.TempDirFixture
-
- com.zerog.ia.test.fixtures.WorkDirFixture
-
- com.zerog.ia.test.fixtures.JavaFixture
-
- com.zerog.ia.test.fixtures.GUIAutomationFixture
-
- All Implemented Interfaces:
junit.framework.Test
public class GUIAutomationFixture extends com.zerog.ia.test.fixtures.JavaFixtureThe
GUIAutomationFixtureclass is designed to allow developers to write automated GUI tests that can communicate with InstallAnywhere installers.Tests that extend GUIAutomationFixture have methods available to launch InstallAnywhere installers and uninstallers, interact with GUI elements and assert that installers and uninstaller ran successfully.
The GUI interations are implement using the AWT's Robot helper class.
- See Also:
Robot
-
-
Constructor Summary
Constructors Constructor Description GUIAutomationFixture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertInstallerHasCompletedSuccessfully()Asserts that the launched InstallAnywhere installer has completed successfully.protected voidassertJavaHasCompletedSuccessfully()Asserts that the launched java process has completed successfully.protected voidassertUninstallerHasCompletedSuccessfully()Asserts that the launched InstallAnywhere uninstaller has completed successfully.protected voidclearEventQueue()Clears the event queue.protected voidclickButton(java.lang.String panelTitle, java.lang.String id)Programmatically performs a click on the button based on the button ID.protected voidclickCancel()Clicks the Cancel button of the Installer/Uninstaller, only if it is visible and enabled.protected voidclickDialogButtonWithText(java.lang.String dialogTitle, java.lang.String text)Programmatically performs a click on the button based on the button text on the Dialog.protected voidclickDone()Clicks the Done button of the Installer/Uninstaller, only if it is visible and enabled.protected voidclickHelp()Clicks the Help button of the Installer/Uninstaller, only if it is visible and enabled.protected voidclickInstall()Clicks the Install button of the Installer, only if it is visible and enabled.protected voidclickNext()Clicks the Next button of the Installer/Uninstaller, only if it is visible and enabled.protected voidclickPrevious()Clicks the Previous button of the Installer/Uninstaller, only if it is visible and enabled.protected voidclickUninstall()Clicks the Uninstall button of the Uninstaller, only if it is visible and enabled.protected voidclickWindowButton(java.lang.String windowTitle, java.lang.String id)Programmatically performs a click on the button based on the button ID on the Window/Frame.protected voiddelay(int ms)Sleeps for the specified period of time.protected booleanfoundEvent(EventLine eventLine)The foundEvent method returns whether the specified event occurred or not.protected java.lang.String[]getAllComboBoxItems(java.lang.String panelTitle, java.lang.String id)Get all the items in the combobox based on the combobox ID.protected java.lang.String[]getAllListBoxItems(java.lang.String panelTitle, java.lang.String id)Get all the items in the listbox based on the listbox ID.protected java.lang.StringgetButtonText(java.lang.String panelTitle, java.lang.String id)Get the button's text based on the button ID.protected java.lang.StringgetCheckBoxText(java.lang.String panelTitle, java.lang.String id)Get the checkbox's text base on the checkbox ID.protected java.lang.StringgetComboBoxSelectedItem(java.lang.String panelTitle, java.lang.String id)Get all the selected items in the combobox base on the combobox ID.protected java.lang.String[]getDialogButtonsText(java.lang.String dialogTitle)Get all button labels on the dialog.protected java.lang.String[]getDialogTexts(java.lang.String dialogTitle)Get all the labels on the dialog.protected java.lang.StringgetInstallDir(java.lang.String productName)Looks for the InstallAnywhere installation directory of the specified product name.protected java.lang.StringgetLabelText(java.lang.String panelTitle, java.lang.String id)Get the label's text based on the label ID.protected java.lang.String[]getListBoxSelectedItems(java.lang.String panelTitle, java.lang.String id)Get all the selected items in the listbox base on the listbox ID.protected java.lang.StringgetPanelTitle()Get the title of the current panel.protected java.lang.StringgetProgramsDir()Looks for the system's programs directory.protected java.lang.StringgetRadioButtonText(java.lang.String panelTitle, java.lang.String id)Get the radio button's text base on the radio button ID.protected java.lang.String[]getRadioButtonTextEx(java.lang.String panelTitle, java.lang.String id)Get the radio button's text base on the radio button ID.protected java.lang.StringgetTextFieldText(java.lang.String panelTitle, java.lang.String id)Get the textfield's text base on the textfield ID.protected java.lang.StringgetUninstallerPath(java.io.File installDir, java.lang.String productName)Looks for the InstallAnywhere uninstaller path of the specified product name at the specified installation directory.protected java.lang.StringgetUninstallerPath(java.lang.String productName)Looks for the InstallAnywhere uninstaller path of the specified product name at the system's programs directory.protected java.lang.StringgetUninstallerPath(java.lang.String installDirName, java.lang.String productName)Looks for the InstallAnywhere uninstaller path of the specified product name at the specified installation directory at the system's programs directory.protected java.lang.String[]getWindowAllComboBoxItems(java.lang.String windowTitle, java.lang.String id)Get all the items in the combobox based on the combobox ID on the Window/Frame.protected java.lang.StringgetWindowButtonText(java.lang.String windowTitle, java.lang.String id)Get button's text based on the button ID from Window/Frame.protected java.lang.StringgetWindowComboBoxSelectedItem(java.lang.String windowTitle, java.lang.String id)Get all the selected items in the combobox base on the combobox ID on the Window/Frame.protected java.lang.StringgetWindowLabelText(java.lang.String windowTitle, java.lang.String id)Get the label's text base on the label ID on the Window/Frame.protected booleanisAutomationDisabled()The isAutomationDisabled() method returns a boolean indicating whether the automation is disabled or not.protected booleanisAutomationEnabled()The isAutomationEnabled() method returns a boolean indicating whether the automation is enabled or not.protected booleanisButtonEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the button is enabled or not based on the button ID.protected booleanisButtonVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the button is visible or not based on the button ID.protected booleanisCancelEnabled()Determines whether the Cancel button is enabled or not.protected booleanisCheckBoxEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the checkbox is enabled or not based on the checkbox ID.protected booleanisCheckBoxSelected(java.lang.String panelTitle, java.lang.String id)Determines whether the checkbox is selected or not based on the checkbox ID.protected booleanisCheckBoxVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the checkbox is visible or not based on the checkbox ID.protected booleanisComboBoxEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the combobox is enabled or not based on the combobox ID.protected booleanisComboBoxVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the combobox is visible or not based on the combobox ID.protected booleanisDoneEnabled()Determines whether the Done button is enabled or not.protected booleanisHelpEnabled()Determines whether the Help button is enabled or not.protected booleanisInstallEnabled()Determines whether the Install button is enabled or not.protected booleanisLabelVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the label is visible or not based on the label ID.protected booleanisListBoxEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the listbox is enabled or not based on the listbox ID.protected booleanisListBoxVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the listbox is visible or not based on the listbox ID.protected booleanisNextEnabled()Determines whether the Next button is enabled or not.protected booleanisPasswordTextFieldEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the password textfield is enabled or not based on the password textfield ID.protected booleanisPasswordTextFieldVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the password textfield is visible or not based on the password textfield ID.protected booleanisPreviousEnabled()Determines whether the Previous button is enabled or not.protected booleanisRadioButtonEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the radio button is enabled or not based on the radio button ID.protected booleanisRadioButtonSelected(java.lang.String panelTitle, java.lang.String id)Determines whether the radio button is selected or not based on the radio button ID.protected booleanisRadioButtonVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the radio button is visible or not based on the radio button ID.protected booleanisTextFieldEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the textfield is enabled or not based on the textfield ID.protected booleanisTextFieldVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the textfield is visible or not based on the textfield ID.protected booleanisUninstallEnabled()Determines whether the Uninstall button is enabled or not.protected booleanisWindowButtonEnabled(java.lang.String windowTitle, java.lang.String id)Determines whether a button is enabled or not based on the button ID on the Window/Frame.protected booleanisWindowComboBoxEnabled(java.lang.String windowTitle, java.lang.String id)Determines whether the combobox is enabled or not based on the combobox ID on the Window/Frame.protected voidlaunchBinary(java.lang.String exePath)Launch the specific Installer/Uninstaller executableprotected voidlaunchInstaller(java.lang.String installerPath)Launches the InstallAnywhere installer found in the specified path.protected voidlaunchInstaller(java.lang.String installerPath, boolean waitForDebugger)Launches the InstallAnywhere installer found in the specified path and gives the option to wait for the remote debugger.protected voidlaunchJava(java.lang.String[] args)Launches the system default java runtime passing the specified parameters.protected voidlaunchJava(java.lang.String className, java.lang.String[] appArgs, boolean waitForDebugger)Launches the specified class using the system default java runtime and gives the option to wait for the remote debugger.protected voidlaunchUninstaller(java.io.File installDir, java.lang.String productName)Launches the InstallAnywhere uninstaller found at the specified installation directory.protected voidlaunchUninstaller(java.io.File installDir, java.lang.String productName, boolean waitForDebugger)Launches the InstallAnywhere uninstaller found at the specified installation directory and gives the option to wait for the remote debugger.protected voidlaunchUninstaller(java.lang.String productName)Launches the InstallAnywhere uninstaller of the specified product name.protected voidlaunchUninstaller(java.lang.String productName, boolean waitForDebugger)Launches the InstallAnywhere uninstaller of the specified product name and gives the option to wait for the remote debugger.protected voidlaunchUninstaller(java.lang.String installDirName, java.lang.String productName)Launches the InstallAnywhere uninstaller of the specified product name.protected voidlaunchUninstaller(java.lang.String installDirName, java.lang.String productName, boolean waitForDebugger)Launches the InstallAnywhere uninstaller of the specified product name and gives the option to wait for the remote debugger.protected voidmouseClick(java.awt.Point point)Presses the mouse buttom at the given screen coordinates.protected voidpressEnter()Presses the ENTER key.protected voidpressKey(int key)Types the specified key and releases after the autoDelay time.protected voidpressKey(int key, boolean release)Types the specified key and specifies if the key should be released after the autoDelay time.protected voidpressTab()Presses the TAB key.protected voidprintJavaOutput(java.lang.String title)Prints the java process output to the system default output using the specified title.protected voidreleaseKey(int key)Releases the specified key.protected voidselectCheckBox(java.lang.String panelTitle, java.lang.String id)Programmatically performs a click on the checkbox based on the checkbox ID.protected voidselectRadioButton(java.lang.String panelTitle, java.lang.String id)Programmatically performs a click on the radio button based on the radio button ID.protected voidsetAutoDelay(int ms)Sets the delay time between mouse and keyboard events for the specified time.protected voidsetComboBoxSelectedItem(java.lang.String panelTitle, java.lang.String id, int index)Select item from combobox base on combobox ID and indexprotected voidsetComboBoxSelectedItem(java.lang.String panelTitle, java.lang.String id, java.lang.String text)Select item from combobox base on combobox ID and text.protected voidsetListBoxSelectedItem(java.lang.String panelTitle, java.lang.String id, int index)Select item from listbox base on listbox ID and indexprotected voidsetListBoxSelectedItem(java.lang.String panelTitle, java.lang.String id, java.lang.String text)Select item from listbox base on listbox ID and text.protected voidsetPasswordTextFieldText(java.lang.String panelTitle, java.lang.String id, java.lang.String text)Set the password textfield's text base on the password textfield ID.protected voidsetTextFieldText(java.lang.String panelTitle, java.lang.String id, java.lang.String text)Set the textfield's text base on the textfield ID.voidsetUp()This method initializes event notification listeners.protected voidsetWaitTimeout(int ms)Sets the wait time for GUI events for the specified time.protected voidsetWindowComboBoxSelectedItem(java.lang.String windowTitle, java.lang.String id, int index)Select item from combobox base on combobox ID and index on the Window/Frame.protected voidsetWindowComboBoxSelectedItem(java.lang.String windowTitle, java.lang.String id, java.lang.String text)Select item from combobox base on combobox ID and text on the Window/Frame.voidtearDown()This method finalizes event notification listeners.protected voidtype(java.lang.String text)Types the specified text string.protected EventLinewaitForEvent(java.lang.String id)Waits for the specified event to happen.protected voidwaitForInstallerToComplete()Waits for 180 seconds for the launched InstallAnywhere installer to complete.protected voidwaitForJavaToComplete(int ms)Waits for the launched java process to complete.protected voidwaitForPanel(java.lang.String title)Waits for the specified panel to appear.protected voidwaitForWindow(java.lang.String title)Waits for the specified window to appear.protected voidwaitForWindowEx(java.lang.String title)-
Methods inherited from class com.zerog.ia.test.fixtures.JavaFixture
assertExecutableHasCompletedSuccessfully, getDebugOptions, getExecutableExitCode, getExitCode, launchExecutable, launchJar, launchJava, launchJava, printExecutableOuput, printJavaOutput, waitForExecutableToComplete
-
Methods inherited from class com.zerog.ia.test.fixtures.WorkDirFixture
getRootDir, getWorkDir, getWorkSubDir
-
Methods inherited from class com.zerog.ia.test.fixtures.TempDirFixture
assertDirExists, assertDirNotFound, assertFileExists, assertFileNotFound, createTempSubDir, deleteDir, getSystemTempDir, getTempDir
-
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
-
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
-
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.ExceptionThis method initializes event notification listeners. It should be called by overriding methods, otherwise test automation will be disabled.
- Overrides:
setUpin classcom.zerog.ia.test.fixtures.JavaFixture- Throws:
java.lang.Exception- See Also:
isAutomationEnabled(),isAutomationDisabled()
-
tearDown
public void tearDown() throws java.lang.ExceptionThis method finalizes event notification listeners. It should be called by overriding methods.
- Overrides:
tearDownin classcom.zerog.ia.test.fixtures.JavaFixture- Throws:
java.lang.Exception
-
isAutomationEnabled
protected boolean isAutomationEnabled()
The isAutomationEnabled() method returns a boolean indicating whether the automation is enabled or not.
- Returns:
- Automation is enabled
- See Also:
isAutomationDisabled()
-
isAutomationDisabled
protected boolean isAutomationDisabled()
The isAutomationDisabled() method returns a boolean indicating whether the automation is disabled or not.
- Returns:
- Automation is disabled
- See Also:
isAutomationEnabled()
-
setAutoDelay
protected void setAutoDelay(int ms)
Sets the delay time between mouse and keyboard events for the specified time.
- Parameters:
ms- Delay time in milliseconds- See Also:
Robot.delay(int)
-
setWaitTimeout
protected void setWaitTimeout(int ms)
Sets the wait time for GUI events for the specified time.
- Parameters:
ms- Wait time in milliseconds
-
pressEnter
protected void pressEnter()
Presses the ENTER key.
-
pressTab
protected void pressTab()
Presses the TAB key.
-
type
protected void type(java.lang.String text)
Types the specified text string.
- Parameters:
text- Text to type
-
pressKey
protected void pressKey(int key)
Types the specified key and releases after the autoDelay time.
- Parameters:
key- Key to type- See Also:
setAutoDelay(int),Robot.keyPress(int),KeyEvent
-
pressKey
protected void pressKey(int key, boolean release)Types the specified key and specifies if the key should be released after the autoDelay time.
- Parameters:
key- Key to type- See Also:
setAutoDelay(int),Robot.keyPress(int),KeyEvent
-
releaseKey
protected void releaseKey(int key)
Releases the specified key.
- Parameters:
key- Key to type- See Also:
Robot.keyRelease(int),KeyEvent
-
mouseClick
protected void mouseClick(java.awt.Point point)
Presses the mouse buttom at the given screen coordinates.
- Parameters:
point- Screen coordinates
-
delay
protected void delay(int ms)
Sleeps for the specified period of time.
- Parameters:
ms- Time to sleep in milliseconds- See Also:
Robot.delay(int)
-
waitForWindow
protected void waitForWindow(java.lang.String title)
Waits for the specified window to appear. The wait time will be that specified in setWaitTimeout method.
- Parameters:
title- Windows title- See Also:
setWaitTimeout(int)
-
waitForWindowEx
protected void waitForWindowEx(java.lang.String title)
-
waitForPanel
protected void waitForPanel(java.lang.String title)
Waits for the specified panel to appear. The wait time will be that specified in setWaitTimeout method.
- Parameters:
title- Panel title- See Also:
setWaitTimeout(int)
-
waitForEvent
protected EventLine waitForEvent(java.lang.String id)
Waits for the specified event to happen. The wait time will be that specified in setWaitTimeout method.
- Parameters:
id- Event identifier- Returns:
- Event details
- See Also:
setWaitTimeout(int),EventLine
-
foundEvent
protected boolean foundEvent(EventLine eventLine)
The foundEvent method returns whether the specified event occurred or not.
- Parameters:
eventLine- Event- Returns:
- Event occurred
- See Also:
EventLine
-
clearEventQueue
protected void clearEventQueue()
Clears the event queue. The event queue is populated by events occurred in the installer/uninstaller being tested.
-
launchJava
protected void launchJava(java.lang.String[] args)
Launches the system default java runtime passing the specified parameters.
- Overrides:
launchJavain classcom.zerog.ia.test.fixtures.JavaFixture- Parameters:
args- Launch parameters
-
assertJavaHasCompletedSuccessfully
protected void assertJavaHasCompletedSuccessfully()
Asserts that the launched java process has completed successfully.
- Overrides:
assertJavaHasCompletedSuccessfullyin classcom.zerog.ia.test.fixtures.JavaFixture
-
printJavaOutput
protected void printJavaOutput(java.lang.String title)
Prints the java process output to the system default output using the specified title.
- Overrides:
printJavaOutputin classcom.zerog.ia.test.fixtures.JavaFixture- Parameters:
title- Output title
-
launchInstaller
protected void launchInstaller(java.lang.String installerPath)
Launches the InstallAnywhere installer found in the specified path.
- Parameters:
installerPath- Installer path
-
launchInstaller
protected void launchInstaller(java.lang.String installerPath, boolean waitForDebugger)Launches the InstallAnywhere installer found in the specified path and gives the option to wait for the remote debugger.
Waits for the remote debugger at the port 8000.
- Parameters:
installerPath- Installer pathwaitForDebugger- Whether wait for debugger or not
-
launchUninstaller
protected void launchUninstaller(java.lang.String productName, boolean waitForDebugger)Launches the InstallAnywhere uninstaller of the specified product name and gives the option to wait for the remote debugger.
Looks for the product uninstaller in the system's programs directory.
Waits for the remote debugger at the port 8000.
- Parameters:
productName- Product namewaitForDebugger- Whether wait for debugger or not
-
launchUninstaller
protected void launchUninstaller(java.lang.String installDirName, java.lang.String productName, boolean waitForDebugger)Launches the InstallAnywhere uninstaller of the specified product name and gives the option to wait for the remote debugger.
Looks for the uninstaller at the specified installation directory at the system's programs directory.
Waits for the remote debugger at the port 8000.
- Parameters:
installDirName- Installation directoryproductName- Product namewaitForDebugger- Whether wait for debugger or not
-
launchUninstaller
protected void launchUninstaller(java.io.File installDir, java.lang.String productName, boolean waitForDebugger)Launches the InstallAnywhere uninstaller found at the specified installation directory and gives the option to wait for the remote debugger.
Waits for the remote debugger at the port 8000.
- Parameters:
installDir- Installation directoryproductName- Product namewaitForDebugger- Whether wait for debugger or not
-
launchUninstaller
protected void launchUninstaller(java.lang.String productName)
Launches the InstallAnywhere uninstaller of the specified product name.
Looks for the product uninstaller in the system's programs directory.
- Parameters:
productName- Product name
-
launchUninstaller
protected void launchUninstaller(java.lang.String installDirName, java.lang.String productName)Launches the InstallAnywhere uninstaller of the specified product name.
Looks for the uninstaller at the specified installation directory at the system's programs directory.
- Parameters:
installDirName- Installation directoryproductName- Product name
-
launchUninstaller
protected void launchUninstaller(java.io.File installDir, java.lang.String productName)Launches the InstallAnywhere uninstaller found at the specified installation directory.
- Parameters:
installDir- Installation directoryproductName- Product name
-
getUninstallerPath
protected java.lang.String getUninstallerPath(java.lang.String productName)
Looks for the InstallAnywhere uninstaller path of the specified product name at the system's programs directory.
- Parameters:
productName- Product name
-
getUninstallerPath
protected java.lang.String getUninstallerPath(java.lang.String installDirName, java.lang.String productName)Looks for the InstallAnywhere uninstaller path of the specified product name at the specified installation directory at the system's programs directory.
- Parameters:
installDirName- Installation directoryproductName- Product name
-
getUninstallerPath
protected java.lang.String getUninstallerPath(java.io.File installDir, java.lang.String productName)Looks for the InstallAnywhere uninstaller path of the specified product name at the specified installation directory.
- Parameters:
installDir- Installation directoryproductName- Product name
-
getInstallDir
protected java.lang.String getInstallDir(java.lang.String productName)
Looks for the InstallAnywhere installation directory of the specified product name.
- Parameters:
productName- Product name
-
getProgramsDir
protected java.lang.String getProgramsDir()
Looks for the system's programs directory.
-
waitForJavaToComplete
protected void waitForJavaToComplete(int ms)
Waits for the launched java process to complete.
- Overrides:
waitForJavaToCompletein classcom.zerog.ia.test.fixtures.JavaFixture- Parameters:
ms- Wait time in milliseconds
-
waitForInstallerToComplete
protected void waitForInstallerToComplete()
Waits for 180 seconds for the launched InstallAnywhere installer to complete.
-
assertInstallerHasCompletedSuccessfully
protected void assertInstallerHasCompletedSuccessfully()
Asserts that the launched InstallAnywhere installer has completed successfully.
-
assertUninstallerHasCompletedSuccessfully
protected void assertUninstallerHasCompletedSuccessfully()
Asserts that the launched InstallAnywhere uninstaller has completed successfully.
-
launchJava
protected void launchJava(java.lang.String className, java.lang.String[] appArgs, boolean waitForDebugger)Launches the specified class using the system default java runtime and gives the option to wait for the remote debugger.
Waits for the remote debugger at the port 8000.
- Overrides:
launchJavain classcom.zerog.ia.test.fixtures.JavaFixture- Parameters:
className- Class to launchappArgs- Launch parameterswaitForDebugger- Whether wait for debugger or not
-
launchBinary
protected void launchBinary(java.lang.String exePath)
Launch the specific Installer/Uninstaller executable- Parameters:
exePath- Path to executable file.
-
clickNext
protected void clickNext()
Clicks the Next button of the Installer/Uninstaller, only if it is visible and enabled.
-
clickPrevious
protected void clickPrevious()
Clicks the Previous button of the Installer/Uninstaller, only if it is visible and enabled.
-
clickHelp
protected void clickHelp()
Clicks the Help button of the Installer/Uninstaller, only if it is visible and enabled.
-
clickCancel
protected void clickCancel()
Clicks the Cancel button of the Installer/Uninstaller, only if it is visible and enabled.
-
clickInstall
protected void clickInstall()
Clicks the Install button of the Installer, only if it is visible and enabled.
-
clickUninstall
protected void clickUninstall()
Clicks the Uninstall button of the Uninstaller, only if it is visible and enabled.
-
clickDone
protected void clickDone()
Clicks the Done button of the Installer/Uninstaller, only if it is visible and enabled.
-
isNextEnabled
protected boolean isNextEnabled()
Determines whether the Next button is enabled or not.- Returns:
trueif Next button is enabled,falseotherwise.
-
isPreviousEnabled
protected boolean isPreviousEnabled()
Determines whether the Previous button is enabled or not.- Returns:
trueif Previous button is enabled,falseotherwise.
-
isCancelEnabled
protected boolean isCancelEnabled()
Determines whether the Cancel button is enabled or not.- Returns:
trueif Cancel button is enabled,falseotherwise.
-
isHelpEnabled
protected boolean isHelpEnabled()
Determines whether the Help button is enabled or not.- Returns:
trueif Help button is enabled,falseotherwise.
-
isInstallEnabled
protected boolean isInstallEnabled()
Determines whether the Install button is enabled or not.- Returns:
trueif Install button is enabled,falseotherwise.
-
isUninstallEnabled
protected boolean isUninstallEnabled()
Determines whether the Uninstall button is enabled or not.- Returns:
trueif Uninstall button is enabled,falseotherwise.
-
isDoneEnabled
protected boolean isDoneEnabled()
Determines whether the Done button is enabled or not.- Returns:
trueif Done button is enabled,falseotherwise.
-
getPanelTitle
protected java.lang.String getPanelTitle()
Get the title of the current panel.- Returns:
- Current panel title.
-
clickButton
protected void clickButton(java.lang.String panelTitle, java.lang.String id)Programmatically performs a click on the button based on the button ID.- Parameters:
panelTitle- Title of the panelid- Buttons ID
-
getButtonText
protected java.lang.String getButtonText(java.lang.String panelTitle, java.lang.String id)Get the button's text based on the button ID.- Parameters:
panelTitle- Title of the panelid- Button ID- Returns:
- The button's text
-
isButtonEnabled
protected boolean isButtonEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the button is enabled or not based on the button ID.- Parameters:
panelTitle- Title of the panelid- Button ID- Returns:
trueif button is enabled,falseotherwise.
-
isButtonVisible
protected boolean isButtonVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the button is visible or not based on the button ID.- Parameters:
panelTitle- Title of the panelid- Button ID- Returns:
trueif button is visible,falseotherwise.
-
clickDialogButtonWithText
protected void clickDialogButtonWithText(java.lang.String dialogTitle, java.lang.String text)Programmatically performs a click on the button based on the button text on the Dialog.- Parameters:
dialogTitle- Title of the dialog. This cannot be empty.text- Text of the button
-
getDialogTexts
protected java.lang.String[] getDialogTexts(java.lang.String dialogTitle)
Get all the labels on the dialog.- Parameters:
dialogTitle- Title of the dialog. This cannot be empty.- Returns:
- String array of all the labels on the dialog.
-
getDialogButtonsText
protected java.lang.String[] getDialogButtonsText(java.lang.String dialogTitle)
Get all button labels on the dialog.- Parameters:
dialogTitle- Title of the dialog. This cannot be empty.- Returns:
- String array of all the button labels on the dialog
-
getLabelText
protected java.lang.String getLabelText(java.lang.String panelTitle, java.lang.String id)Get the label's text based on the label ID.- Parameters:
panelTitle- Title of the panelid- Label ID- Returns:
- The label's text
-
isLabelVisible
protected boolean isLabelVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the label is visible or not based on the label ID.- Parameters:
panelTitle- Title of the panelid- Label ID- Returns:
trueif label is visible,falseotherwise.
-
isTextFieldEnabled
protected boolean isTextFieldEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the textfield is enabled or not based on the textfield ID.- Parameters:
panelTitle- Title of the panelid- TextField ID- Returns:
trueif textfield is enabled,falseotherwise.
-
isTextFieldVisible
protected boolean isTextFieldVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the textfield is visible or not based on the textfield ID.- Parameters:
panelTitle- Title of the panelid- TextField ID- Returns:
trueif textfield is visible,falseotherwise.
-
getTextFieldText
protected java.lang.String getTextFieldText(java.lang.String panelTitle, java.lang.String id)Get the textfield's text base on the textfield ID.- Parameters:
panelTitle- Title of the panelid- TextField ID- Returns:
- The textfield's text
-
setTextFieldText
protected void setTextFieldText(java.lang.String panelTitle, java.lang.String id, java.lang.String text)Set the textfield's text base on the textfield ID.- Parameters:
panelTitle- Title of the panelid- TextField IDtext- The string that is to be set
-
isPasswordTextFieldEnabled
protected boolean isPasswordTextFieldEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the password textfield is enabled or not based on the password textfield ID.- Parameters:
panelTitle- Title of the panelid- Password TextField ID- Returns:
trueif password textfield is enabled,falseotherwise.
-
isPasswordTextFieldVisible
protected boolean isPasswordTextFieldVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the password textfield is visible or not based on the password textfield ID.- Parameters:
panelTitle- Title of the panelid- Password TextField ID- Returns:
trueif password textfield is visible,falseotherwise.
-
setPasswordTextFieldText
protected void setPasswordTextFieldText(java.lang.String panelTitle, java.lang.String id, java.lang.String text)Set the password textfield's text base on the password textfield ID.- Parameters:
panelTitle- Title of the panelid- Password TextField IDtext- The string that is to be set
-
isCheckBoxEnabled
protected boolean isCheckBoxEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the checkbox is enabled or not based on the checkbox ID.- Parameters:
panelTitle- Title of the panelid- CheckBox ID- Returns:
trueif checkbox is enabled,falseotherwise.
-
isCheckBoxVisible
protected boolean isCheckBoxVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the checkbox is visible or not based on the checkbox ID.- Parameters:
panelTitle- Title of the panelid- CheckBox ID- Returns:
trueif checkbox is visible,falseotherwise.
-
getCheckBoxText
protected java.lang.String getCheckBoxText(java.lang.String panelTitle, java.lang.String id)Get the checkbox's text base on the checkbox ID.- Parameters:
panelTitle- Title of the panelid- TextField ID- Returns:
- The checkbox's text
-
selectCheckBox
protected void selectCheckBox(java.lang.String panelTitle, java.lang.String id)Programmatically performs a click on the checkbox based on the checkbox ID.- Parameters:
panelTitle- Title of the panelid- CheckBox ID
-
isCheckBoxSelected
protected boolean isCheckBoxSelected(java.lang.String panelTitle, java.lang.String id)Determines whether the checkbox is selected or not based on the checkbox ID.- Parameters:
panelTitle- Title of the panelid- CheckBox ID- Returns:
trueif checkbox is selected,falseotherwise.
-
isRadioButtonEnabled
protected boolean isRadioButtonEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the radio button is enabled or not based on the radio button ID.- Parameters:
panelTitle- Title of the panelid- Radio Button ID- Returns:
trueif radio button is enabled,falseotherwise.
-
isRadioButtonVisible
protected boolean isRadioButtonVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the radio button is visible or not based on the radio button ID.- Parameters:
panelTitle- Title of the panelid- Radio Button ID- Returns:
trueif radio button is visible,falseotherwise.
-
getRadioButtonText
protected java.lang.String getRadioButtonText(java.lang.String panelTitle, java.lang.String id)Get the radio button's text base on the radio button ID.- Parameters:
panelTitle- Title of the panelid- Radio Button ID- Returns:
- The radio button's text
-
getRadioButtonTextEx
protected java.lang.String[] getRadioButtonTextEx(java.lang.String panelTitle, java.lang.String id)Get the radio button's text base on the radio button ID.- Parameters:
panelTitle- Title of the panelid- Radio Button ID- Returns:
- The radio button's text
-
selectRadioButton
protected void selectRadioButton(java.lang.String panelTitle, java.lang.String id)Programmatically performs a click on the radio button based on the radio button ID.- Parameters:
panelTitle- Title of the panelid- Radio Button ID
-
isRadioButtonSelected
protected boolean isRadioButtonSelected(java.lang.String panelTitle, java.lang.String id)Determines whether the radio button is selected or not based on the radio button ID.- Parameters:
panelTitle- Title of the panelid- Radio Button ID- Returns:
trueif radio button is selected,falseotherwise.
-
isListBoxEnabled
protected boolean isListBoxEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the listbox is enabled or not based on the listbox ID.- Parameters:
panelTitle- Title of the panelid- ListBox ID- Returns:
trueif listbox is enabled,falseotherwise.
-
isListBoxVisible
protected boolean isListBoxVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the listbox is visible or not based on the listbox ID.- Parameters:
panelTitle- Title of the panelid- ListBox ID- Returns:
trueif listbox is visible,falseotherwise.
-
getAllListBoxItems
protected java.lang.String[] getAllListBoxItems(java.lang.String panelTitle, java.lang.String id)Get all the items in the listbox based on the listbox ID.- Parameters:
panelTitle- Title of the panelid- ListBox ID- Returns:
- String array of all the items in the listbox
-
getListBoxSelectedItems
protected java.lang.String[] getListBoxSelectedItems(java.lang.String panelTitle, java.lang.String id)Get all the selected items in the listbox base on the listbox ID.- Parameters:
panelTitle- Title of the panelid- ListBox ID- Returns:
- String array of all the selected items in the listbox
-
setListBoxSelectedItem
protected void setListBoxSelectedItem(java.lang.String panelTitle, java.lang.String id, java.lang.String text)Select item from listbox base on listbox ID and text.- Parameters:
panelTitle- Title of the panelid- ListBox IDtext- Text that is to be selected from listbox
-
setListBoxSelectedItem
protected void setListBoxSelectedItem(java.lang.String panelTitle, java.lang.String id, int index)Select item from listbox base on listbox ID and index- Parameters:
panelTitle- Title of the panelid- ListBox IDindex- Index that is to be selected from listbox
-
isComboBoxEnabled
protected boolean isComboBoxEnabled(java.lang.String panelTitle, java.lang.String id)Determines whether the combobox is enabled or not based on the combobox ID.- Parameters:
panelTitle- Title of the panelid- ComboBox ID- Returns:
trueif combobox is enabled,falseotherwise.
-
isComboBoxVisible
protected boolean isComboBoxVisible(java.lang.String panelTitle, java.lang.String id)Determines whether the combobox is visible or not based on the combobox ID.- Parameters:
panelTitle- Title of the panelid- ComboBox ID- Returns:
trueif password combobox is visible,falseotherwise.
-
getAllComboBoxItems
protected java.lang.String[] getAllComboBoxItems(java.lang.String panelTitle, java.lang.String id)Get all the items in the combobox based on the combobox ID.- Parameters:
panelTitle- Title of the panelid- ComboBox ID- Returns:
- String array of all the items in the combobox
-
getComboBoxSelectedItem
protected java.lang.String getComboBoxSelectedItem(java.lang.String panelTitle, java.lang.String id)Get all the selected items in the combobox base on the combobox ID.- Parameters:
panelTitle- Title of the panelid- ComboBox ID- Returns:
- String array of all the selected items in the combobox
-
setComboBoxSelectedItem
protected void setComboBoxSelectedItem(java.lang.String panelTitle, java.lang.String id, java.lang.String text)Select item from combobox base on combobox ID and text.- Parameters:
panelTitle- Title of the panelid- ComboBox IDtext- Text that is to be selected from combobox
-
setComboBoxSelectedItem
protected void setComboBoxSelectedItem(java.lang.String panelTitle, java.lang.String id, int index)Select item from combobox base on combobox ID and index- Parameters:
panelTitle- Title of the panelid- ComboBox IDindex- Index that is to be selected from combobox
-
clickWindowButton
protected void clickWindowButton(java.lang.String windowTitle, java.lang.String id)Programmatically performs a click on the button based on the button ID on the Window/Frame.- Parameters:
windowTitle- Title of the Window/Frame. This cannot be empty.id- Button ID
-
getWindowButtonText
protected java.lang.String getWindowButtonText(java.lang.String windowTitle, java.lang.String id)Get button's text based on the button ID from Window/Frame.- Parameters:
windowTitle- Title of the Window/Frame. This cannot be empty.id- Button ID- Returns:
- The button's text
-
isWindowButtonEnabled
protected boolean isWindowButtonEnabled(java.lang.String windowTitle, java.lang.String id)Determines whether a button is enabled or not based on the button ID on the Window/Frame.- Parameters:
windowTitle- Title of the Window/Frame. This cannot be empty.id- Button ID- Returns:
trueif button is enabled,falseotherwise.
-
getWindowLabelText
protected java.lang.String getWindowLabelText(java.lang.String windowTitle, java.lang.String id)Get the label's text base on the label ID on the Window/Frame.- Parameters:
windowTitle- Title of the windowid- Label ID- Returns:
- The label's text
-
isWindowComboBoxEnabled
protected boolean isWindowComboBoxEnabled(java.lang.String windowTitle, java.lang.String id)Determines whether the combobox is enabled or not based on the combobox ID on the Window/Frame.- Parameters:
windowTitle- Title of the windowid- ComboBox ID- Returns:
trueif combobox is enabled,falseotherwise.
-
getWindowAllComboBoxItems
protected java.lang.String[] getWindowAllComboBoxItems(java.lang.String windowTitle, java.lang.String id)Get all the items in the combobox based on the combobox ID on the Window/Frame.- Parameters:
windowTitle- Title of the windowid- ComboBox ID- Returns:
- String array of all the items in the combobox
-
getWindowComboBoxSelectedItem
protected java.lang.String getWindowComboBoxSelectedItem(java.lang.String windowTitle, java.lang.String id)Get all the selected items in the combobox base on the combobox ID on the Window/Frame.- Parameters:
windowTitle- Title of the panelid- ComboBox ID- Returns:
- String array of all the selected items in the combobox
-
setWindowComboBoxSelectedItem
protected void setWindowComboBoxSelectedItem(java.lang.String windowTitle, java.lang.String id, java.lang.String text)Select item from combobox base on combobox ID and text on the Window/Frame.- Parameters:
windowTitle- Title of the panelid- ComboBox IDtext- Text that is to be selected from combobox
-
setWindowComboBoxSelectedItem
protected void setWindowComboBoxSelectedItem(java.lang.String windowTitle, java.lang.String id, int index)Select item from combobox base on combobox ID and index on the Window/Frame.- Parameters:
windowTitle- Title of the panelid- ComboBox IDindex- Index that is to be selected from combobox
-
-