Comment 3 for bug 1270177

Revision history for this message
obiwan-92 (obiwan-92) wrote :

Hello.

Well, maybe we can do it like this :

# It's just a suggestion
def selectDropList(img1, img2):
    click(img1) # Open the drop down list
    reg = some function to find the region where some pixels change, corresponding where the drop down list
    while not reg.exists(img2): # Put the time-out to 0 : don't wait each time
        type(Key.PAGE_DOWN)
        if reg.change(): # check if some pixel change in the region
            return False # we reach the end of the list without find the item (img2)
    click(img2)
    return True # we find and click on the item

The most difficult thing to do for me, is to determine the region of the drop down list.
The second difficult point, is to create a function to see if some pixels change in a region, I suppose we can do it with the observe methods.

Hope it's help.
Regards.