Dynamic Search Rectangles
Sometimes a GUI has numerous identical UI elements, but there is a requirement to interact with only certain instances of these elements. For example, in a file tree, it might be important to interact with specific nodes belonging to a particular folder while not interfering with other nodes in the tree.
A possible testing scenario might be to navigate to folder C:\Program Files (x86)\Adobe\Reader 11.0\Resource\SaslPrep
using the Windows Explorer file tree. Because the distance between the Folder name, folder icon, and node icon is often not static, it is important to limit the reference image to only the unique folder name. Even if this distance were static, capturing 2 images for each folder in the file path would be necessary: one for when the node is open and one when it is closed, so that the test doesn’t unintentionally open and close nodes.
The scenario would require 2 x 6 images, 12 images total, because the file path contains 6 folders.