Multiple choice technology testing

Which of the following commands retrieves the number of items in the list for a weblist object

  1. GetList

  2. GetItem

  3. GetItemsCount

  4. GetRoProperty

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

GetRoProperty is a generic QTP method that retrieves any runtime property of an object, including 'items count' for a WebList. The other options (GetList, GetItem, GetItemsCount) are not standard QTP methods. GetRoProperty('items count') returns the number of items as a string or number.