执行此命令后出现错误
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=' test
xcodebuild:错误:无法找到与提供的目标说明符匹配的目标: { id: }
The requested device could not be found because no available devices matched the request.
Available destinations for the "WebDriverAgentRunner" scheme:
{ platform:macOS, arch:x86_64, variant:Mac Catalyst, id:00B9EE23-6C05-53C6-8661-775B8F1E5F68 }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:macOS, variant:Mac Catalyst, name:Any Mac }
{ platform:iOS, id:b8f8c7bb18de6b9fa6793f33c4f5604e7cf0763e, name:Vandana’s iPhone }
{ platform:iOS Simulator, id:FA976777-3880-453C-9659-B4E0856BF6FB, OS:16.2, name:iPad (10th generation) }
{ platform:iOS Simulator, id:4F04B104-BDCF-475A-BEE8-346D4B5958D9, OS:16.2, name:iPad Air (5th generation) }
{ platform:iOS Simulator, id:7645AE63-1328-4134-868C-97F2DA4E2089, OS:16.2, name:iPad Pro (11-inch) (4th generation) }
{ platform:iOS Simulator, id:7AAC0380-D6B2-4A7E-9F2A-78203131BD96, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }
{ platform:iOS Simulator, id:2F27669B-0E15-4475-B6BA-2EC78C01905E, OS:16.2, name:iPad mini (6th generation) }
{ platform:iOS Simulator, id:0E74D044-4FC1-4A35-B9F2-D6121E3928F7, OS:16.2, name:iPhone 14 }
{ platform:iOS Simulator, id:2B2547A2-C806-457B-A81D-42F5D0FFB86E, OS:16.2, name:iPhone 14 Plus }
{ platform:iOS Simulator, id:D58E417C-E580-495F-A3BA-9F4508AD57D4, OS:16.2, name:iPhone 14 Pro }
{ platform:iOS Simulator, id:8AB9C689-C7A7-444F-AD39-06604B34D922, OS:16.2, name:iPhone 14 Pro Max }
{ platform:iOS Simulator, id:14AE8049-E49A-417A-A8AA-3F03C9373130, OS:16.2, name:iPhone SE (3rd generation) }
想要将设备连接到系统但收到此错误。 使用 MACos:monterey 代码:14.2 ios:15.7.5
您将
id=
(即空“id”)传递给 destination
参数。例如,该参数应包含您要执行测试的操作系统和模拟器名称。例如:
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'platform=iOS Simulator,name=iPhone 14 Pro Max,OS=16.4' test
可用目的地显示在错误输出中。
这是有关该主题的文档页面。