Automated Testing with Appian Selenium API

Setup

The Appian Selenium API plug-in is a Java library which allows you to write automated tests for your Appian UIs. It contains methods which allow you to interact with Appian components in a browser. It provides methods and fixtures to interact with Appian applications in its various environments, e.g. Tempo or Sites. When writing tests, be sure to use methods from the correct fixture for the environment under test, e.g. use SitesFixture where possible to test Sites. Methods defined in fixtures that are intended for different environments are not guaranteed to work in future versions of the plugin.

It can be used in a Java application or integrated directly into any Selenium or Java-based testing tool.

Appian Selenium API contains the underlying Selenium methods used by Cucumber for Appian and FitNesse for Appian, but offers you more flexibility by allowing you to define your own automated test cases. You can create your own Cucumber Step Definitions, your own testNG test, or the Java Framework of your choosing. You are no longer tied to Cucumber for Appian or FitNesse for Appian yet you get the same ease and simplicity of those respective frameworks.

  • Appian 22.1 and above

  • Java Runtime Environment 11

  1. Open this project in an IDE, such as IntelliJ IDEA or Eclipse.
  2. Update configurations:
    1.  Open file configs/custom.properties
      1. Update automated.testing.home with the path to this installation. Examples:
        1. Windows: automated.testing.home=C:\\testFolder\\appian-selenium-api-example-java
        2. Mac: automated.testing.home=/Users/tester/Desktop/appian-selenium-api-example-java
      2. Update chrome.driver.home with the path to the Chrome driver that comes with this installation. Examples: * Windows: automated.testing.home=C:\\testFolder\\appian-selenium-api-example-java\\lib\\drivers\\chromedriver.exe * Mac: automated.testing.home=/Users/tester/Desktop/appian-selenium-api-example-java/lib/drivers/chromedriver-mac
    2. Open file configs/users.properties, for each username used in a test add a line in the format of <username>=<password> to this file.
      1. If you prefer not to disclose your password in plain text, you can also choose to use com.appiancorp.ps.automatedtest.fixture.BaseFixture.loginIntoWithUsernameAndPassword fixture method to login by passing in the password from a system property value.
  3. Open "src/main/java/com/appiancorp/example/HelloAppian.java":
    1. Update TEST_SITE_URL to your Appian URL, such as protected static String TEST_SITE_URL = "https://example.appiancloud.com/suite";
    2. Update TEST_USERNAME with a username, such as protected static String TEST_USERNAME = "tester.tester"; * Make sure this user exists in configs/users.properties
  4. Run the main() method of this class:
    1.  You should see that a Chrome browser will open up, and the fixture commands in HelloAppian.java will execute accordingly.
    2. Note that this test will fail since your site might not have an action "Create a Case" under menu "Actions" that opens up an interface that has a "Submit" button.

Features

Multiple browser support

  • Chrome
  • Firefox

Benefits

  • Define your own integration tests without being limited by a third-party testing tool
  • Selenium-based test scripts can be created for reusability throughout test suites
  • Methods created specifically to operate within Appian applications and Tempo
  • Test scripts do not need to be updated when upgrading between supported Appian versions
  • Test scripts are easily updated for new UI changes to a form or interface
  • Appian design knowledge is not required to create test scripts

Release Notes

November 2023 - Release 23.4

  • NOTE: Project has been updated to require Java 11 JRE
  • Enhancements
    • Support for Appian version 23.4
    • Add support for the side navigation menu in sites
    • Add support for downloading charts
    • Add support for buttons configured with custom colors
  • Bug Fixes
    • Honor the download directory given in custom.properties for Remote Drivers
    • Update dropdowns for versions greater than 23.3 to ignore the aria-checked value
    • Fixed Populate Record Type Data Range User Filter method

August 2023 - Release 23.3

  • NOTE: Project has been updated to require Java 11 JRE
  • Enhancements
    • Supports Appian version 23.3
    • Added functionality to interact with new site group headers
    • Updated to Selenium 4.11.0
  • Bug Fixes
    • Update checkboxes to support CARD style for 23.3 and later Appian versions

June 2023 - Release 23.2.1

  • NOTE: Updates to site navigation in the 23.2 product breaks the use of the clickOnMenu method defined in TempoFixtures for site environments. clickOnMenu, and other navigation methods defined in TempoFixtures, are guaranteed to work only in Tempo environments. Use the clickOnSitePage method defined in SitesFixtures instead
  • Bug Fixes
    • Update pickers to recognize selections with links (e.g. Record Pickers)

June 2023 - Release 23.2

  • Enhancements
    • Supports Appian version 23.2
      • NOTE: Updates to site navigation in the 23.2 product breaks the use of the clickOnMenu method defined in TempoFixtures for site environments. clickOnMenu, and other navigation methods defined in TempoFixtures, are guaranteed to work only in Tempo environments. Use the clickOnSitePage method defined in SitesFixtures instead

May 2023 - Release 23.1.2

  • Bug Fixes
    • Fixes an issue where Dropdowns with Search were not working
    • Fixes an Issue where verifyText did not work on multi-node components

February 2023 - Release 23.1

  • Enhancements
    • Supports Appian version 23.1
    • Updated locator for Dropdown class
  • Bug Fixes
    • Update CVEs
    • Update scripts (start.bat, start-mac.sh, start-unix.sh, runFitNesseTest.sh) to reference the new fitnesse-20221219-standalone.jar

August 2022 - Release 22.3

  • Appian Selenium API is released and supported
  • Removed support for 20.3

November 2021 - Release 21.4

  • Enhancements
    • Support new card choice components
  • Bug Fixes
    • Update CVEs

August 2021 - Release 21.3

  • Bug Fixes
    • Fix bug for radio button card
    • Fix bug for date picker

June 2021 - Release 21.2

  • Enhancements
    • Support new SectionLayout
    • Upgrade Selenium Server to 3.141.59
  • Bug Fixes
    • Fix bug for radio button card
    • Fix bug for icon link alt text

March 2021 - Release 21.1

  • Appian Selenium API is released and supported