northwoodspd / uia

A ruby gem for interacting with automation elements in Windows
MIT License
17 stars 4 forks source link

#find_element does not always return right away #12

Open enkessler opened 6 years ago

enkessler commented 6 years ago

Usually, when I try to find an element Uia.find_element will return right away with either a nil if the element doesn't exist or an element object if the element does exist. Sometimes, however, Uia.find_element does not return immediately and instead returns nil ~25 seconds later (it's quite consistent in this duration) even though the element might have appeared during those 25 seconds. If I drop in a brief sleep and then use Uia.find_element after the element is present then it works fine and if the element is never going to exist it works fine. It gets hung up on transitions, I guess when the element is going to exist but perhaps hasn't finished existing yet?

leviwilson commented 6 years ago

What locators are you using?