Class GUIAutomationFixture

  • All Implemented Interfaces:
    junit.framework.Test

    public class GUIAutomationFixture
    extends com.zerog.ia.test.fixtures.JavaFixture

    The GUIAutomationFixture class 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
    • Field Summary

      • Fields inherited from class com.zerog.ia.test.fixtures.JavaFixture

        SECONDS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void assertInstallerHasCompletedSuccessfully()
      Asserts that the launched InstallAnywhere installer has completed successfully.
      protected void assertJavaHasCompletedSuccessfully()
      Asserts that the launched java process has completed successfully.
      protected void assertUninstallerHasCompletedSuccessfully()
      Asserts that the launched InstallAnywhere uninstaller has completed successfully.
      protected void clearEventQueue()
      Clears the event queue.
      protected void clickButton​(java.lang.String panelTitle, java.lang.String id)
      Programmatically performs a click on the button based on the button ID.
      protected void clickCancel()
      Clicks the Cancel button of the Installer/Uninstaller, only if it is visible and enabled.
      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.
      protected void clickDone()
      Clicks the Done button of the Installer/Uninstaller, only if it is visible and enabled.
      protected void clickHelp()
      Clicks the Help button of the Installer/Uninstaller, only if it is visible and enabled.
      protected void clickInstall()
      Clicks the Install button of the Installer, only if it is visible and enabled.
      protected void clickNext()
      Clicks the Next button of the Installer/Uninstaller, only if it is visible and enabled.
      protected void clickPrevious()
      Clicks the Previous button of the Installer/Uninstaller, only if it is visible and enabled.
      protected void clickUninstall()
      Clicks the Uninstall button of the Uninstaller, only if it is visible and enabled.
      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.
      protected void delay​(int ms)
      Sleeps for the specified period of time.
      protected boolean foundEvent​(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.String getButtonText​(java.lang.String panelTitle, java.lang.String id)
      Get the button's text based on the button ID.
      protected java.lang.String getCheckBoxText​(java.lang.String panelTitle, java.lang.String id)
      Get the checkbox's text base on the checkbox ID.
      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.
      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.String getInstallDir​(java.lang.String productName)
      Looks for the InstallAnywhere installation directory of the specified product name.
      protected java.lang.String getLabelText​(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.String getPanelTitle()
      Get the title of the current panel.
      protected java.lang.String getProgramsDir()
      Looks for the system's programs directory.
      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.
      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.String getTextFieldText​(java.lang.String panelTitle, java.lang.String id)
      Get the textfield's text base on the textfield ID.
      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.
      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.
      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.
      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.String getWindowButtonText​(java.lang.String windowTitle, java.lang.String id)
      Get button's text based on the button ID from Window/Frame.
      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.
      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.
      protected boolean isAutomationDisabled()
      The isAutomationDisabled() method returns a boolean indicating whether the automation is disabled or not.
      protected boolean isAutomationEnabled()
      The isAutomationEnabled() method returns a boolean indicating whether the automation is enabled or not.
      protected boolean isButtonEnabled​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the button is enabled or not based on the button ID.
      protected boolean isButtonVisible​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the button is visible or not based on the button ID.
      protected boolean isCancelEnabled()
      Determines whether the Cancel button is enabled or not.
      protected boolean isCheckBoxEnabled​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the checkbox is enabled or not based on the checkbox ID.
      protected boolean isCheckBoxSelected​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the checkbox is selected or not based on the checkbox ID.
      protected boolean isCheckBoxVisible​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the checkbox is visible or not based on the checkbox ID.
      protected boolean isComboBoxEnabled​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the combobox is enabled or not based on the combobox ID.
      protected boolean isComboBoxVisible​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the combobox is visible or not based on the combobox ID.
      protected boolean isDoneEnabled()
      Determines whether the Done button is enabled or not.
      protected boolean isHelpEnabled()
      Determines whether the Help button is enabled or not.
      protected boolean isInstallEnabled()
      Determines whether the Install button is enabled or not.
      protected boolean isLabelVisible​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the label is visible or not based on the label ID.
      protected boolean isListBoxEnabled​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the listbox is enabled or not based on the listbox ID.
      protected boolean isListBoxVisible​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the listbox is visible or not based on the listbox ID.
      protected boolean isNextEnabled()
      Determines whether the Next button is enabled or not.
      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.
      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.
      protected boolean isPreviousEnabled()
      Determines whether the Previous button is enabled or not.
      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.
      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.
      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.
      protected boolean isTextFieldEnabled​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the textfield is enabled or not based on the textfield ID.
      protected boolean isTextFieldVisible​(java.lang.String panelTitle, java.lang.String id)
      Determines whether the textfield is visible or not based on the textfield ID.
      protected boolean isUninstallEnabled()
      Determines whether the Uninstall button is enabled or not.
      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.
      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.
      protected void launchBinary​(java.lang.String exePath)
      Launch the specific Installer/Uninstaller executable
      protected void launchInstaller​(java.lang.String installerPath)
      Launches the InstallAnywhere installer found in the specified path.
      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.
      protected void launchJava​(java.lang.String[] args)
      Launches the system default java runtime passing the specified parameters.
      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.
      protected void launchUninstaller​(java.io.File installDir, java.lang.String productName)
      Launches the InstallAnywhere uninstaller found at the specified installation directory.
      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.
      protected void launchUninstaller​(java.lang.String productName)
      Launches the InstallAnywhere uninstaller of the specified product name.
      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.
      protected void launchUninstaller​(java.lang.String installDirName, java.lang.String productName)
      Launches the InstallAnywhere uninstaller of the specified product name.
      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.
      protected void mouseClick​(java.awt.Point point)
      Presses the mouse buttom at the given screen coordinates.
      protected void pressEnter()
      Presses the ENTER key.
      protected void pressKey​(int key)
      Types the specified key and releases after the autoDelay time.
      protected void pressKey​(int key, boolean release)
      Types the specified key and specifies if the key should be released after the autoDelay time.
      protected void pressTab()
      Presses the TAB key.
      protected void printJavaOutput​(java.lang.String title)
      Prints the java process output to the system default output using the specified title.
      protected void releaseKey​(int key)
      Releases the specified key.
      protected void selectCheckBox​(java.lang.String panelTitle, java.lang.String id)
      Programmatically performs a click on the checkbox based on the checkbox ID.
      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.
      protected void setAutoDelay​(int ms)
      Sets the delay time between mouse and keyboard events for the specified time.
      protected void setComboBoxSelectedItem​(java.lang.String panelTitle, java.lang.String id, int index)
      Select item from combobox base on combobox ID and index
      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.
      protected void setListBoxSelectedItem​(java.lang.String panelTitle, java.lang.String id, int index)
      Select item from listbox base on listbox ID and index
      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.
      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.
      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.
      void setUp()
      This method initializes event notification listeners.
      protected void setWaitTimeout​(int ms)
      Sets the wait time for GUI events for the specified time.
      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.
      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.
      void tearDown()
      This method finalizes event notification listeners.
      protected void type​(java.lang.String text)
      Types the specified text string.
      protected EventLine waitForEvent​(java.lang.String id)
      Waits for the specified event to happen.
      protected void waitForInstallerToComplete()
      Waits for 180 seconds for the launched InstallAnywhere installer to complete.
      protected void waitForJavaToComplete​(int ms)
      Waits for the launched java process to complete.
      protected void waitForPanel​(java.lang.String title)
      Waits for the specified panel to appear.
      protected void waitForWindow​(java.lang.String title)
      Waits for the specified window to appear.
      protected void waitForWindowEx​(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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GUIAutomationFixture

        public GUIAutomationFixture()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception

        This method initializes event notification listeners. It should be called by overriding methods, otherwise test automation will be disabled.

        Overrides:
        setUp in class com.zerog.ia.test.fixtures.JavaFixture
        Throws:
        java.lang.Exception
        See Also:
        isAutomationEnabled(), isAutomationDisabled()
      • tearDown

        public void tearDown()
                      throws java.lang.Exception

        This method finalizes event notification listeners. It should be called by overriding methods.

        Overrides:
        tearDown in class com.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:
        launchJava in class com.zerog.ia.test.fixtures.JavaFixture
        Parameters:
        args - Launch parameters
      • assertJavaHasCompletedSuccessfully

        protected void assertJavaHasCompletedSuccessfully()

        Asserts that the launched java process has completed successfully.

        Overrides:
        assertJavaHasCompletedSuccessfully in class com.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:
        printJavaOutput in class com.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 path
        waitForDebugger - 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 name
        waitForDebugger - 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 directory
        productName - Product name
        waitForDebugger - 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 directory
        productName - Product name
        waitForDebugger - 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 directory
        productName - 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 directory
        productName - 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 directory
        productName - 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 directory
        productName - 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:
        waitForJavaToComplete in class com.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:
        launchJava in class com.zerog.ia.test.fixtures.JavaFixture
        Parameters:
        className - Class to launch
        appArgs - Launch parameters
        waitForDebugger - 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:
        true if Next button is enabled, false otherwise.
      • isPreviousEnabled

        protected boolean isPreviousEnabled()
        Determines whether the Previous button is enabled or not.
        Returns:
        true if Previous button is enabled, false otherwise.
      • isCancelEnabled

        protected boolean isCancelEnabled()
        Determines whether the Cancel button is enabled or not.
        Returns:
        true if Cancel button is enabled, false otherwise.
      • isHelpEnabled

        protected boolean isHelpEnabled()
        Determines whether the Help button is enabled or not.
        Returns:
        true if Help button is enabled, false otherwise.
      • isInstallEnabled

        protected boolean isInstallEnabled()
        Determines whether the Install button is enabled or not.
        Returns:
        true if Install button is enabled, false otherwise.
      • isUninstallEnabled

        protected boolean isUninstallEnabled()
        Determines whether the Uninstall button is enabled or not.
        Returns:
        true if Uninstall button is enabled, false otherwise.
      • isDoneEnabled

        protected boolean isDoneEnabled()
        Determines whether the Done button is enabled or not.
        Returns:
        true if Done button is enabled, false otherwise.
      • 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 panel
        id - 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 panel
        id - 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 panel
        id - Button ID
        Returns:
        true if button is enabled, false otherwise.
      • 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 panel
        id - Button ID
        Returns:
        true if button is visible, false otherwise.
      • 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 panel
        id - 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 panel
        id - Label ID
        Returns:
        true if label is visible, false otherwise.
      • 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 panel
        id - TextField ID
        Returns:
        true if textfield is enabled, false otherwise.
      • 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 panel
        id - TextField ID
        Returns:
        true if textfield is visible, false otherwise.
      • 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 panel
        id - 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 panel
        id - TextField ID
        text - 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 panel
        id - Password TextField ID
        Returns:
        true if password textfield is enabled, false otherwise.
      • 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 panel
        id - Password TextField ID
        Returns:
        true if password textfield is visible, false otherwise.
      • 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 panel
        id - Password TextField ID
        text - 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 panel
        id - CheckBox ID
        Returns:
        true if checkbox is enabled, false otherwise.
      • 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 panel
        id - CheckBox ID
        Returns:
        true if checkbox is visible, false otherwise.
      • 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 panel
        id - 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 panel
        id - 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 panel
        id - CheckBox ID
        Returns:
        true if checkbox is selected, false otherwise.
      • 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 panel
        id - Radio Button ID
        Returns:
        true if radio button is enabled, false otherwise.
      • 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 panel
        id - Radio Button ID
        Returns:
        true if radio button is visible, false otherwise.
      • 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 panel
        id - 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 panel
        id - 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 panel
        id - 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 panel
        id - Radio Button ID
        Returns:
        true if radio button is selected, false otherwise.
      • 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 panel
        id - ListBox ID
        Returns:
        true if listbox is enabled, false otherwise.
      • 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 panel
        id - ListBox ID
        Returns:
        true if listbox is visible, false otherwise.
      • 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 panel
        id - 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 panel
        id - 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 panel
        id - ListBox ID
        text - 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 panel
        id - ListBox ID
        index - 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 panel
        id - ComboBox ID
        Returns:
        true if combobox is enabled, false otherwise.
      • 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 panel
        id - ComboBox ID
        Returns:
        true if password combobox is visible, false otherwise.
      • 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 panel
        id - 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 panel
        id - 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 panel
        id - ComboBox ID
        text - 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 panel
        id - ComboBox ID
        index - 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:
        true if button is enabled, false otherwise.
      • 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 window
        id - 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 window
        id - ComboBox ID
        Returns:
        true if combobox is enabled, false otherwise.
      • 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 window
        id - 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 panel
        id - 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 panel
        id - ComboBox ID
        text - 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 panel
        id - ComboBox ID
        index - Index that is to be selected from combobox