-
-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Do not try to set the default URL using the remote debugger on iOS 17+ #2447
Conversation
@KazuCocoa Could you please try this on a real device? |
Hm, it looks like... opening a url via deeplink failed to load the content frequently rather than the existing one... After this deeplink behavior, commands like |
This meant the content load bar in Safari didn't progress less than half. This occurred while the default page in appium. |
mm, I think we should revert https://github.com/appium/WebDriverAgent/pull/929/files#diff-7debbf48ac1513ec716fc7d72a09c224118ac2d4835e8f3d0517d457ee39c9acR180-R191 as well. The default page also had the same behavior. When I started a safari session with this and the WDA change (8.8.0) 10 times, this behavior occurred over half while 10 times had no issue with today's implementation with WDA 8.7.0 I also noticed Safari's open url behavior after deeplink looked weird. After the deeplink start and open a URL via |
@KazuCocoa Could you please add the failed logs? |
Might it also be a race condition? What if we add idle check delay (fb_waitUntilStableWithTimeout) after we load the default URL in WDA using deeplink? |
Not helpful logs to see the behavior in the log level, but https://gist.github.com/KazuCocoa/37e01e713f7e51f4c257ff800b275fe0 is no response so long against |
Potentially... after the deeplink command, do we need the waiting page stuff like https://github.com/appium/appium-remote-debugger/blob/414f1b56f9e9c68fab476a6d7ea2c191bc731ccf/lib/mixins/navigate.js#L148 ...? I guess... the deeplink command itself does not help to wait for the page content load, so it just launches Safari with URL, that's it. |
If it worked well on the Simulators (I haven't tested well on simulators)... then (not ideal, of course, but) we might need to have separate methods for simulators and real devices until real devices get stable implementation in XCTest...? Just a note.. |
@KazuCocoa Could you please try the same with the patch at appium/WebDriverAgent#930 ? |
Sure, I'll try it out/debug it tonight |
Hm, while I set Then, the session went to https://github.com/appium/appium-xcuitest-driver/pull/2447/files#diff-ed3c013edbc896bd87ef62539626fcdc8930a31f3cee7ecb37438e172af2c8e0R676-R680 as below logs, but the browser kept default health check page. It looks like this unexpected behavior (the
I also noticed the deep link method in WDA 8.8.0 opened Safari's new tab when the Safari process ended? and launched Safari with a new page? while existing method kept using the focused page every time basically. |
appium/WebDriverAgent#930 itself did not change the behavior, btw. |
So, starting a Safari session without any existing tabs worked well with WDA 8.8.0 and this PR (deep link method) on my local, but if Safari already has open pages, the weird behavior I met before could occur frequently at least. The number of new tabs also could keep increasing with the deeplink method as well. This weird behavior is probably because current selected page via remote-debugger is different from the newly opened tab via the deeplink behavior in WDA 8.8.0. (Current guess) For example, when I start a new safari session with a fresh safari and end it, then start another session without removing the existing safari tab, this behavior could occur. This scenario is a common case of repeating automation sessions against one real device. We have no methods to close all existing tabs without UI interactions in a real device, so this increasing tabs behavior also could be stressful for users who run multiple automation sessions. Maybe... we need to find a way to delete tabs without UI interactions and tweak page selection method for this behavior before making the deeplink method replacement default. For the page selection, I haven't tried but I guess switching context to WEBVIEW after opening a url via deeplink and waiting a bit while would help....? Like below steps would help to improve this weird behavior after the deeplink. Maybe the context selection needed to be improved?
However, increasing a new tab here would not be nice compared to the existing behavior with WDA 8.7.0 in terms of running multiple automation sessions repeatedly though. |
Many thanks for checking it @KazuCocoa |
Based on appium/WebDriverAgent#929