I am using UI vision to automate inserting data into an application form. The form has several page transitions, and I am using a combination of waitForElementVisible (an element only found on the next page) followed by waitForElementNotVisible (waiting for loading spinner to disappear) to cleanly capture page transitions events.
However, on a particular page transition, waitForElementVisible randomly fails to detect a clearly visible element (a text input field), and simply waits for it to “appear” until it times out.
I have compared the expected and actual xpaths, and they are always identical. I am unsure how to debug this further…