Replies: 2 comments 1 reply
-
I don't think your interval is the problem. I've noticed sometimes that with newer versions of iOS web content isn't accessible until the user interacts with the webview. You could try tapping somewhere in the webview before attempting to find contexts, to see if that makes it more reliable. And of course, using the latest Appium 2 compatible XCUITest driver might help, since there might be updated webview connection logic. |
Beta Was this translation helpful? Give feedback.
-
Thanks for a hint with tapping somewhere on WebView. Should that occur after loading has finished, or doesn't really matter? |
Beta Was this translation helpful? Give feedback.
-
Hey there 👋
To give you a little overview:
Sometimes I need to switch into
WEBVIEW_ID
context to ensure that page loading has finished, or to check the current URL and here comes the strange behavior - sometimes it takes few seconds to fetch complete list of contexts but it also happens that I am polling for contexts list and all I got back is[ NATIVE_APP ]
for like 4 minutes! Can the interval polling for contexts might be that important here? I am calling w WebdriverIO.waitUntil
function here like:Actually I am not sure if it is WDA or our app causing this 🤔 Each time I start tests WDA is rebuilding, and sometimes the problem described occurs sometimes not, which is frustrating.
I am still using Appium 1, but I think I saw that behavior with v2 too while working on version bump PR (still waiting for merge as you can guess)
Do you think that using prebuilt WDA app could make a change here? Definitely it'd speed up startup time as it won't need to build each time I start a session.
I will carefully inspect the
appium.log
while this situation occurs to get more insight on what is happening, stay tuned.Regards,
Kris.
Beta Was this translation helpful? Give feedback.
All reactions