Select last item in list

Best practices, code snippets for common functionality, examples, and guidelines.
belugaliu
Posts: 1
Joined: Thu Dec 06, 2012 8:26 pm

Select last item in list

Post by belugaliu » Thu Dec 06, 2012 8:30 pm

Hi,

I'm using the trial version and encountered the following issue.
This is a web browser application, that uses flash.
There is a UI that list items. This list changes every minute. (Items are added and removed).
How can i automate (via record and playback) to select always the last item in the list?

I've recorded the action of selecting the last item, but upon playback, the newer last item is not selected.

HELP??

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Select last item in list

Post by Support Team » Fri Dec 07, 2012 9:27 am

Hi,

In order to identify the last element you could use the last() function in your RxPath:
yourRxPathToTheSpecificElement/yourElement[last()='True']
Regards,
Markus
.
Image