【发布时间】:2020-04-03 14:50:50
【问题描述】:
- Appium v1.15.1
- Mac 10.14.6
- Xcode 11.2.1
- Python 测试文件。
我可以在 iPhone 设备上成功运行测试,但在 iPhone 模拟器上不行。
错误:
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[HTTP] --> GET /status
[HTTP] {}
[debug] [HTTP] No route found. Setting content type to 'text/plain'
[HTTP] <-- GET /status 404 1 ms - 49
[HTTP]
[WD Proxy] Got an unexpected response with status 404: The URL '/status' did not map to a valid resource
这是 Appium 服务器的详细信息:
Welcome to Appium v1.15.1
[Appium] Non-default server args:
[Appium] address: 127.0.0.1
[Appium] port: 8100
[Appium] Appium REST http interface listener started on 127.0.0.1:8100
功能(Python):
def setUp(self):
app = ('/Users/...app')
self.driver = webdriver.Remote(
command_executor='http://127.0.0.1:8100/wd/hub',
desired_capabilities={
'app': app,
'platformName': 'iOS',
'platformVersion': '13.1',
'deviceName': 'iPhone Simulator',
"automationName": "XCUITest",
"xcodeOrgId": "XXXXXXXX",
"xcodeSigningId": "iPhone Developer"
}
)
有什么建议吗?
【问题讨论】:
-
您是否尝试使用默认端口 4723?
-
@SoorajSathianandan 使用端口 4723 和 UDID,它现在可以工作了!
标签: ios iphone testing appium simulator