KBI 311832 New Feature: Enhanced Element Selector To Dynamically Select First, Last, Or Any Rank Of The Element Collection

Version

Argent Advanced Technology 5.1A-2004-B and above

Date

Thursday, 7 May 2020

Summary

A customer’s web site might be updated once a while

For example, https://www.zurichticket.ch/ohz.webshop/ shows tickets for available events

Events are changing all the time

When recording normally, the Event id is actually recorded as the Ticket button

So, when the event is closed, the recorded script won’t work anymore

To implement an adaptive Web Session script, instead of using the id of the Ticket button, the script can be specified to use the first of all Ticket buttons

This can be done while recording:

The selector is specified as the first matching element with tag “A” and inner text “Tickets”

The resulting script is as follows:

      Click “A,Tickets[rank:first]”, 0

Technical Background

N/A

Resolution

Upgrade to Argent Advanced Technology 5.1A-2004-B or above