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?
Usually, when I try to find an element
Uia.find_element
will return right away with either anil
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 returnsnil
~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 briefsleep
and then useUia.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?