Hi, I have been tasked with writing automated tests that need to use

Hi,

I have been tasked with writing automated tests that need to use (browse, enter texts, click buttons etc) objects on Appian pages. I’ve been looking at the DOM for a few of the early-release pages and have having difficulty identifying ways of performing object identification.

As an example, an Appian page I’m looking at has a number of inputs (text, dates, dropdows etc….). Picking two different textboxes at random I see:-

<input type="text" class="aui-TextInput" id="gwt-uid-245" aria-required="true" aria-invalid="false" style="text-align: left;">
and
<input type="text" class="aui-TextInput" id="gwt-uid-271" aria-required="true" aria-invalid="false" style="text-align: left;">

The wrapping/parent elements do not have anything that can be used and the id attributes change between page renderings. Is anyone else using Test Automation with Appian and if so, how are they doing robust object identification? Is there a way I can get the design...

OriginalPostID-163127

OriginalPostID-163127

  Discussion posts and replies are publicly visible

Parents
  • This is a common occurrence with gwt-based applications. Although there are not constant ids for the form inputs, you can still access the inputs in other ways.

    For example, if using Selenium you have the option of accessing css or xpath. Below are two examples:

    css:
    div.aui-Section:nth-child(0) div.column_panel:nth-child(0) div div div:nth-child(0) div.aui_FieldLayout input

    grabs the first field in the first column in the first section

    xpath:
    //label[contains(text(),'"fieldName"')]/parent::span/following-sibling::div/div/input

    grabs the input whose label is fieldName.

    It requires building some classes to handle the accessing and population of different Appian field types, but its certainly possible.
Reply
  • This is a common occurrence with gwt-based applications. Although there are not constant ids for the form inputs, you can still access the inputs in other ways.

    For example, if using Selenium you have the option of accessing css or xpath. Below are two examples:

    css:
    div.aui-Section:nth-child(0) div.column_panel:nth-child(0) div div div:nth-child(0) div.aui_FieldLayout input

    grabs the first field in the first column in the first section

    xpath:
    //label[contains(text(),'"fieldName"')]/parent::span/following-sibling::div/div/input

    grabs the input whose label is fieldName.

    It requires building some classes to handle the accessing and population of different Appian field types, but its certainly possible.
Children
No Data