Is there a way to identify changes in UI under test? - DropDown list

I am testing application in SUT. I found that, in my application using Search rectangle does work great for almost 90% of script. but for some steps the drop down list goes beyond Search Rectangle. So my question is, Is there a way to capture such dropdown lists which extend beyond search rectangle? And it should be dynamic to make the script Generic. As there are few more cases where dropdown list extends beyond search rectangle.
OR do we have a way out to capture the UI changes after certain click event?
Example - When I click a particular dropdown list, the change in UI is the new dropdown list and everything else is same.
Please suggest.

I have solved this problem in the past by capturing an image that consistently reflects the bottom right corner of the dropdown list. I will then dynamically create a SearchRectangle based on an area between the FoundImageLocation() of the dropdown arrow and the bottom right corner of the dropdown list. The code might look like this:
set tmpSearchAreaUL to ImageLocation(image:“myDropDownArrow”) - (100,10) – Create the upper left corner 100 pixels to the left of and 10 pixels above the dropdown arrow image’s hotspot
set tmpSearchAreaBR to ImageLocation(image:“myDropDownListCorner”) - Looks for an image of the bottom right hand corner of the dropdown list
click text:“myDropDownText”,SearchRectangle:(tmpSearchAreaUL,tmpSearchAreaBR)

Hope this helps.

Hello Dave,
Thank you for your reply.
Yes I have also used similar solution to use image reference of drop down list corners.
But the problem that I face using this method is, we have similar corners on multiple locations in our application UI. So have tried playing around with capturing multiple images, changing definition of images like Tolerant to background, but unfortunately method works for some dropdown list. So was ultimately thinking if we have a solution to detect UI changes between steps. :slight_smile:

Also, I have one more method in my mind.
What I will do is,

  1. CaptureScreen on a step before opening a dropdown list
  2. Then click event to open dropdown list
  3. Again CaptureScreen after opening list
  4. then compare and identify the UI changes.

here in my application I am sure that when I am opening a list, there are no other UI changes happening, so I think it should work.

Thanks for your help.

Finally. I went with only possible solution, as mentioned above. Now its working. Created a dynamic search rectangle. For every dropdownlist I have stored some common and unique edge/corner line images of the list and it does recognise those images. Using the image rectangle function to capture the rectangle co or of image, then using those end points as new search rectangle.