Appian Selenium API

Overview

The library contains methods which allow you to interact with Appian components in a browser. It can be used in a Java application or integrated directly into any Selenium or Java-based testing tool.

Appian Selenium API contains the methods that are at the core of both Cucumber for Appian and FitNesse for Appian. If you are familiar with either Appian’s FitNesse or Cucumber tools then you are already familiar with the methods provided by the Appian Selenium API. For example, the table below shows the corresponding FitNesse and Cucumber methods for the same underlying Appian Selenium API method.

Appian Selenium API

loginWithUsernameAndPassword(jString userName, String password)

FitNesse for Appian

| login with username | USERNAME | and password | PASSWORD |

Cucumber for Appian

Given I login with username "USERNAME" and password "PASSWORD"

Note: Java 11 required for plugin version 23.4

Key Features & Functionality

The Appian Selenium API plug-in package includes:

  • The Appian Selenium API jar
  • Javadocs
  • An example of how to use the API in a Java application
  • An example of how to use the API in a Cucumber test 

The Appian Selenium API plug-in supports both Chrome and Firefox browsers. See the Appian Playbook for more information: Automated Testing with Appian Selenium API

Note on Appian Versions:

With each Appian release, a new version of the plug-in is also released to support the latest Appian components. This plug-in is backwards compatible, ensuring that you do not need to update your test cases when upgrading to new Appian versions.

Anonymous
  • How do I select value from a drop down? I tried fixture.populateDropDownSearchBoxWith but it doesn't work.


    fixture.setTakeErrorScreenshotsTo(true);
    fixture.setupWithBrowser(TEST_BROWSER);
    fixture.setAppianUrlTo(TEST_SITE_URL);
    fixture.setTimeoutSecondsTo(TEST_TIMEOUT);
    fixture.setAppianVersionTo(TEST_SITE_VERSION);
    fixture.setAppianLocaleTo(TEST_SITE_LOCALE);
    fixture.loginWithUsername(TEST_USERNAME);
    fixture.clickOnMenu("AML");
    fixture.clickOnButton("New");
    fixture.verifyButtonIsPresent("New");
    fixture.populateDropDownSearchBoxWith("country",'nepal')
  • 4 June 2021 Release Notes
    • 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
  • I believe I may have found a bug in the latest version of the library; specifically in the getGridContents() method of the TempoGrid class. (See image below)

          WebElement accessibility = ((RemoteWebElement)headers.get(0)).findElementByClassName("GridHeaderCell---accessibilityhidden");
          if (accessibility != null) {
            headerText = headerText.replace(accessibility.getText(), "");
            headerText = headerText.replace("\n", "");
          }

    The above code expects findElementByClassName() to return null if the element is not found; however, the method instead throws a "org.openqa.selenium.NoSuchElementException".  Wrapping the code block in a try catch should resolve the issue. 

    try{
        WebElement accessibility = ((RemoteWebElement)headers.get(0)).findElementByClassName("GridHeaderCell---accessibilityhidden");
        if (accessibility != null) {
            headerText = headerText.replace(accessibility.getText(), "");
            headerText = headerText.replace("\n", "");
        }
    }catch(org.openqa.selenium.NoSuchElementException e){
    
    }

  • Thanks Appian, Few of the methods are not working. I will post those in comments. 

  • I was expecting an update to the F4ADepencies.jar, is this to be released as well?

  • Oct 21, 2020 Release Notes
    • Updating library for 20.3
  • There is a README.md in the main folder that has the getting started information.  As for upgrading, I can add more information but it's basically

    1. Update the pom

    2. Replace the appian jar with the latest from FitNesseFromAppian

  • Would help if there is a quick steps from Appian Corp to let know everyone how to utilize this and any steps which may be needed during version changes / upgrade. Definitely recommend to use this API for anyone developing Automation test suite for Appian.