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 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.
I imported the JAR file, an example project in Eclipse IDE, and changed all configurations to test my application. Able to run the Appian application using Eclipse IDE. Do we have any component in Appian to directly call this API and trigger Selenium test scripts ?Appreciate your help
Does the Cucumber with Appian feature supports Selenium libraries. If the new release of Appian comes, how to handle the dynamci elements.
Two options:
Better option: the developer adds the label into the sail code, but sets the labelPosition to "COLLAPSED".
Worse option: try to find the field another way like absolute location on the form, e.g. populateFieldWithValue("[5]", "Nepal") would populate the 5th field on the form, or if it has a tooltip, placeholder, or instructions you could use those corresponding populateFieldWith<Placeholder/Instructions/Tooltip> methods.
Hi Michael,
You are correct. Its seems to be because of rich text. Where-
ever developer has used label are working fine but where-ever they have used rich text.. it is not identifying. Please suggest what is a workaround.
For 1, I checked with developer are putting rich text near inputs. How to handle this? Please suggest
For 2: Version is fine 21.2 for both i.e. version of Appian and appian-selenium-api.
Make sure:
1. The label on the interface is actually the label for that dropdown, sometimes developers will put rich text near inputs instead of the actual label
2. That you are using the correct version of the jar for your version of Appian (jar should be equal to or higher) and that you are setting it in TEST_SITE_VERSION.
What is the xpath that it is generating for the field? You can often test it directly in F12 with a Ctrl+F.
I tried already it didn't worked out. It times out. I debugged it, and the xpath that is generated by appian-selenium-api is not identifying the webelements.
Xpath is generated by taking constants from metadata.json (available within appian-selenium-api.jar) So, I don't have any control on that.
try populateFieldWith or populateFieldWithValue
How do I select value from a drop down? I tried fixture.populateDropDownSearchBoxWith but it doesn't work.