VLWeb - Identifiable elements in the rendered HTML

Please log all suggestions for improvements and enhancements to Visual LANSA here. All entries will be acknowledged and added to the list for possible inclusion in later releases of Visual LANSA.
Post Reply
jyoung
Posts: 642
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

VLWeb - Identifiable elements in the rendered HTML

Post by jyoung » Tue Jul 17, 2018 3:38 am

I would really like there to be identifiable elements in the rendered HTML.

The main case for this is for automated end-to-end and regression testing.

Currently there is no way to identify an individual element for introspection by UI testing tools.

For example, this element

Code: Select all

<input spellcheck="false" class="vl-input-hideclear" type="text" tabindex="0" style="padding: 0px; white-space: pre; background: rgba(0, 0, 0, 0); position: absolute; overflow: auto; box-sizing: border-box; border-style: none; outline: none; border-width: 0px; cursor: text; resize: none; left: 0px; width: 217px; height: 21px; text-align: left; font-family: Roboto, verdana; font-size: 14px; font-weight: normal; font-style: normal; text-decoration: none; top: 0px; color: rgb(48, 48, 48);">
represents the Search element in this screen shot.
search.PNG
search.PNG (32.65 KiB) Viewed 9856 times
It would be nice to have the LANSA Control Name (or Indentifier) included in the HTML as either a class selector or as a data attribute. That would allow the control elements to be found with most modern UI testing tools.

We could then have a test that states something along these lines:
  1. Go to this url
  2. Find element #WK_SEARCH (done by using class selector or data attribute that contains field identifier)
  3. Type 'yancey' into element
  4. Find element #SEARCH_BUTTON (done by using class selector or data attribute that contains control name)
  5. Click element
  6. Find element #DATA_LIST (done by using class selector or data attribute that contains control name)
  7. Assert that 'Yancey, .....' is in #DATALIST
You can see something like this in Cypress.io but I don't think the tool matters as long as the elements are identifiable!

On a side note, this could be small step in the pursuit of a CD/CI pipeline, which could (hopefully) include a command line tool to interact with Visual LANSA without going through the UI (to trigger things like check out / readonly of lists, compliles, creating deployment packages etc.).

Post Reply