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
  • v23.3 Release Notes
    • Enhancements
    • Supports Appian version 23.3
    • Added functionality to interact with new site group headers
    • Updated to Selenium 4.11.0

  • Good Morning, 

    When will the update for Appian 23.3 be available?

  • How can we use clickOnSitePage to click on Top Nav Page link? It is giving error 

    org.openqa.selenium.ElementNotInteractableException: element not interactable

  • it is available from what i can see

      public void clickOnMenu(String tempoMenu) {
    TempoMenu.getInstance(settings).waitFor(tempoMenu);
    TempoMenu.getInstance(settings).click(tempoMenu);
    }

  • and even if i use REMOTE_CHROME option for browser type this is the error I get:

     

    2023-07-27 15:10:17,357 [main] DEBUG com.appiancorp.ps.automatedtest.fixture.BaseFixture - browser=REMOTE_CHROME
    Jul 27, 2023 3:10:17 PM com.appiancorp.ps.automatedtest.common.RemoteWebDriverBuilder createRemoteDriver
    INFO: Creating remote driver for browser 'REMOTE_CHROME'
    Jul 27, 2023 3:10:17 PM org.openqa.selenium.remote.tracing.opentelemetry.OpenTelemetryTracer createTracer
    INFO: Using OpenTelemetry for tracing
    Jul 27, 2023 3:10:17 PM org.openqa.selenium.remote.RemoteWebDriver checkNonW3CCapabilities
    WARNING: Support for Legacy Capabilities is deprecated; You are sending the following invalid capabilities: [chromeOptions]; Please update to W3C Syntax: https://www.seleni
    um.dev/blog/2022/legacy-protocol-support/
    Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

    Build info: version: '4.8.2', revision: '826dbfc730'
    System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '18'
    Driver info: org.openqa.selenium.remote.RemoteWebDriver
    Command: [null, newSession {capabilities=[Capabilities {chromeOptions: Capabilities {browserName: ...}]}]
    Capabilities {chromeOptions: Capabilities {browserName: ...}
  • does v23.2.1 support clickOnMenu() mehtod?

  • Hi,

    I am also facing the issue after upgrading to 23.2. We are facing issues in login, logout and clickOnButton methods

  • and if i use fitnesse option of remote_chrome there is a error 

    2023-07-20 12:08:09,069 [main] DEBUG com.appiancorp.ps.automatedtest.fixture.BaseFixture - browser=REMOTE_CHROME
    Jul 20, 2023 12:08:09 PM com.appiancorp.ps.automatedtest.common.RemoteWebDriverBuilder createRemoteDriver
    INFO: Creating remote driver for browser 'REMOTE_CHROME'
    Jul 20, 2023 12:08:09 PM org.openqa.selenium.remote.tracing.opentelemetry.OpenTelemetryTracer createTracer
    INFO: Using OpenTelemetry for tracing
    Jul 20, 2023 12:08:09 PM org.openqa.selenium.remote.RemoteWebDriver checkNonW3CCapabilities
    WARNING: Support for Legacy Capabilities is deprecated; You are sending the following invalid capabilities: [chromeOptions]; Please update to W3C Syntax: https://www.seleni
    um.dev/blog/2022/legacy-protocol-support/
    Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

  • modified code to 

    chrome_options = Selenium::WebDriver::Chrome::Options.new
    chrome_options.add_argument("--disable-extensions")
    chrome_options.add_argument("--no-sandbox")
    chrome_options.add_argument("--headless")
    chrome_options.add_argument(
    "--enable-features=NetworkService,NetworkServiceInProcess",
    )

    chrome_prefs = {
    'profile.default_content_settings.popups' => 0.to_s,
    'safebrowsing.enabled' => 'true'
    }
    chrome_options.add_preference('prefs', chrome_prefs)

    client = Selenium::WebDriver::Remote::Http::Default.new
    client.read_timeout = 120 # seconds

    $driver = Selenium::WebDriver.for :remote, url:"">http://localhost:4444", options: chrome_options, :http_client => client
    $driver.get($target_env)
    but still same error Disappointed
  • i am not able to move pass this stage with grid

    chrome_options = Selenium::WebDriver::Chrome::Options.new
    chrome_options.add_argument("--disable-extensions")
    chrome_options.add_argument("--no-sandbox")
    chrome_options.add_argument("--headless")

    chrome_prefs = {
    'profile.default_content_settings.popups' => 0.to_s,
    'safebrowsing.enabled' => 'true'
    }
    chrome_options.add_preference('prefs', chrome_prefs)
    $driver = Selenium::WebDriver.for(:remote, url:"">http://localhost:4444", options: chrome_options)
    error message 
    Net::ReadTimeout with #<TCPSocket:(closed)>
    Fatal exception in DebugThread loop: closed stream
    Backtrace:
    org/jruby/ext/socket/RubyTCPServer.java:153:in `accept'
    from: C:/jruby-9.4.3.0/lib/ruby/gems/shared/gems/ruby-debug-ide-0.7.3/lib/ruby-debug-ide.rb:176:in `block in _start_control_common'
    and how do i initiate the appian url with selenium appian api with this ? thanks for your help