-
-
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
feat: tvos 17 workaround with skipDeviceCheck
#2194
base: master
Are you sure you want to change the base?
Conversation
To me it looks like we are just trying to workaround a xcodebuild bug. Perhaps, it has also to do with appium/appium#19381 Maybe it would be better to just wait for a fix from Apple rather then adding workarounds thus increasing the tech debt? |
Yes, it's reasonable. Ideally, (and hopefully) Apple will expose udid to the macOS system wide as same as USB connected devices (as same as older tvOS versions such as 16). Or at least once Apple fixes |
I was thinking about doing something like
but even by having the above ugly workaround many other endpoints that work with udid would most likely fail |
Hey, thank you so much for publishing this workaround, it literally saved the start of my project. I also wanted to mention one thing that I noticed, maybe you will find it helpful. |
note: i wondered if we could get device info via WDA instead of host in some cases for |
@KazuCocoa this workaround would work with a physical device ? I am currently blocked with 17.2 on my apple tv |
This change itself yes, would work.
|
I don't really get what
|
Then, you could use this branch with local installation. e.g.
which is regular usage of Appium v2 |
@quidow are you able to start a session with the appium inspector on a physical device ? |
No, in order to use Appium Inspector I need to run WDA first. |
@quidow Can you help me out please?
I am using: |
|
I have added the appium:skipDeviceCheck and set it to true
checked out appium-xcuitest-driver |
@adriandumitrascu19 I see that you run WDA from this branch, but did you install the Appium driver from this branch as well?
|
|
regular usage of Appium v2 |
@adriandumitrascu19 so now it works? |
so with the actual setup (from above) I am able to start the appium session only if I remove the appium:bundleId. I can then start my app and inspect the elements but if I want to run a test suite that needs the bundleId it is not working. Any thoughts ? |
Should I set any additional capability if want to use this workaround to test in parallel? |
With |
I guess the black screen is when your WDA is running foreground. How did you start the process? For example when the WDA process restarted, such foreground behavior could occur I assume. |
Before every test I try to establish the session, and if it fails, I restart WDA with I don't understand how, but when 2 devices are working at the same time, it somehow affects the WDA behaviour on the devices. Every device is managed by a separate process. I tried to use the same Appium Server, separate servers, with and without |
|
[update Mar 1st, 2024]
This skip device check would reduce device preparation time by 1 sec on my local test, so it may be good to add as part of performance improvement for a real device that manages devices on its own.
Note that commands that need to communicate with the device directly (
usbmuxd
) do not work. This is expected. This PR aims to make tvOS work over WDA at least while it may have issues with communication method not via WDA.This is currently what we could do as a workaround for appium/appium#19343.
appium/appium#19343 (comment) is my findings for my local apple tv.
xcodebuild
itself did not work (was not able to find the network connected tvOS 17 device), thus the primary usage should be withwebDriverAgentUrl
For tvOS 17+: necessary caps:
btw, this skip reduces 1 sec or less's new session creation duration for real devices.
I wondered if this could be similar to
appium:skipDeviceInitialization
in uia2.[Update Mar 23th]
Frameworks/XC**
framework fromWebDriverAgentRunner_tvOS-Runner.app
Then, set
"appium:webDriverAgentUrl": "http://192.168.5.0:8001"
capability with this branch's caps. Then, we can start WDA without Xcode.9DA168DB-A406-4350-A1AF-125411E55394
is identifier byxcrun devicectl list devices
.The path to
WebDriverAgentRunner_tvOS-Runner.app
is the result of Xcode. It is signed properly already, so it should be already confirmed the build works on a tvOS device.