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…
I recommend replacing waitForElementVisible by visualAssert. This command waits until the image is found/appears. This bypasses dealing with page internals and XPath.
If you want to keep using waitForElementVisible (which has the advantage that it can run in the background): Can you post a test macro here?
in this case:
waitForElementToAppear (xpath)
waitForElementToDisappear (xpath)
i’m not certain why but i think this issue may be related to a spinner (the target xpath) appearing for a second or less… waitForElementToAppear runs and “passes”, but then waitForElementToDisappear hangs even though the element is not visible.
This will be running in the background so visualAssert may not be useful. Thank you for your input though.