Skip to main content
Skip table of contents

Environment setup and customization

Setup

The setup for the UI automation tests is similar to the setup for the regular metadata unit tests and uses the same infrastructure.

You will need to include the latest Selenium WebDriver in your in third-party folder.

  • For developers, this setting already defaults to the directory specified by the eclipse classpath variable THIRD_PARTY.
  • Otherwise, specify a root folder which contains all folders prefixed with selenium-webdriver-* from \sv-build-file\3rd Party\packages.

As of NexJ CRM 9.5, UI automation has been upgraded to use Selenium WebDriver 3. With the upgrade to Selenium WebDriver 3, and in some cases, scripts that use plain text "\r\n" or "\n" will need to be updated to use "\r" for line breaks.

General procedure for automation

  1. Create or find the appropriate .utest file in your finance or relevant project.
  2. Launch the AFL portal.
  3. Use the automation recorder (Ctrl + F11) to perform the use case you want to automate.
  4. Export the recorded script.
  5. Add assertions.
  6. Run the tests in the unit test player, and make fixes if they fail.
  7. Once the tests pass, have your code reviewed.

Customizations

The following table represents the properties NexJ uses to customize the UI test runs in NexJ Finance Portal.

PropertyDescriptionDefault Value
uitest.defaultBrowserThe browser type.CH
uitest.browsersThe list of valid browser types, defined in the properties file.IE, CH, FF
uitest.maximumWaitThe timeout for a Selenium wait in milliseconds.15000
uitest.screenshotsEnabledTake a screenshot when the test is completed.Defaults to true if uitest.screenshotDir is specified, or false otherwise
uitest.headlessRuns the test in headless mode.true
uitest.screenshotDirRoot folder that screenshots should be stored into.null
uitest.webdriverDirPath to the executable web driver file.A setting controlled by NexJ Studio preferences. This is the only required setting to run UI automation.
uitest.localeSets browser locale.
The following runs the test(s) in French: -Dnexj.uitest.locale="fr"
Default system language
uitest.time

Sets the time used by the automation application for actions.

-Dnexj.uitest.time="2022-01-06 07:00:00"

null
uitest.timezone

Sets the timezone used by the automation application for actions.

-Dnexj.uitest.timezone="America/Toronto"

null
uitest.chrome.binaryLocation of the chrome application if not default.null


To change any of these property values from NexJ Studio Tool Settings:

  1. Select Window > Preferences > NexJ Studio > Launch Settings > Tool Settings > Run Unit Tests.
  2. In the VM arguments field, enter:
    -Dnexj.[property] = value


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.