Windows 上对 appium 的 iOS 支持 [英] iOS support for appium on windows

查看:105
本文介绍了Windows 上对 appium 的 iOS 支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在连接到我的 Windows 机器的 iPHONE 5 上运行我的脚本.我收到以下错误:

<块引用>

错误:调试:Appium 请求在/wd/hub/session 发起信息:配置 Safari 会话错误:调试:收到的请求带有参数:{"desiredCapabilities":{"browserName":"Safari","device":"iPhone 5s white"}}信息:尝试使用移动 Safari,版本 18信息:寻找内置应用 MobileSafari错误:错误:xcode-select 抛出错误错误:命令失败:xcode-select"未被识别为内部或外部命令,错误:可运行的程序或批处理文件.错误:信息:出现配置错误,未启动会话错误:错误:Stderr:'xcode-select' 未被识别为内部或外部命令,错误:可运行的程序或批处理文件.错误:错误:错误:标准输出:错误:错误:无法准备版本为18"的移动 Safari:错误:xcode-select 引发错误错误:错误:无法启动 Appium 会话,错误是:错误:xcode-select 抛出错误信息:清理 appium 会话信息:错误:xcode-select 抛出错误在 D:\QM_Work\AppiumForWindows-1.0.0\AppiumForWindows\node_modules\appium\lib\helpers.js:523:10在 ChildProcess.exithandler (child_process.js:641:7)在 ChildProcess.EventEmitter.emit (events.js:98:17)在maybeClose (child_process.js:743:16)在 Process.ChildProcess._handle.onexit (child_process.js:810:5)信息:响应客户端错误:{"status":33,"value":{"message":"无法创建新会话.(原始错误:xcode-select 抛出错误)","origValue":"xcode-select 抛出错误"},"sessionId":null}POST/wd/hub/session 500 1379ms - 204b

解决方案

可以从 Windows 机器上运行测试,但不是您想的那样.你仍然需要一台 mac.以下是要求:

网络上运行 Appium 服务器的 mac是否正确安装了 Appium 环境机器上有.app如果您满足了这三个要求,并且没有防火墙阻止对 mac 的网络访问,那么您就可以做到.您必须在 Windows 机器上进行实际测试,但不是在 setup 方法中指定 127.0.0.1:8080 作为 Appium 服务器的 IP 地址,而是将其替换为: yourmacsipaddress:8080 并且这应该正确执行测试.

请记住,您必须在 Windows 机器上运行的测试中指定 .app 的路径.但问题是路径必须是 mac 中 .app 的路径,而不是 Windows 机器上的路径.

因此测试将在您的 Windows 机器上运行,但应用程序的安装、自动化和测试将在 mac 上完成,但您将在 Windows 机器上获得通过"或失败"更新.

I am trying to run my script on iPHONE 5 which is connected to my windows machine. I am getting below error:

ERROR: debug: Appium request initiated at /wd/hub/session info: Configuring Safari session ERROR: debug: Request received with params: {"desiredCapabilities":{"browserName":"Safari","device":"iPhone 5s white"}} info: Trying to use mobile safari, version 18 info: Looking for built in app MobileSafari ERROR: error: xcode-select threw error Error: Command failed: 'xcode-select' is not recognized as an internal or external command, ERROR: operable program or batch file. ERROR: info: Got configuration error, not starting session ERROR: error: Stderr: 'xcode-select' is not recognized as an internal or external command, ERROR: operable program or batch file. ERROR: ERROR: error: Stdout: ERROR: error: Could not prepare mobile safari with version '18': Error: xcode-select threw an error ERROR: error: Failed to start an Appium session, err was: Error: xcode-select threw an error info: Cleaning up appium session info: Error: xcode-select threw an error at D:\QM_Work\AppiumForWindows-1.0.0\AppiumForWindows\node_modules\appium\lib\helpers.js:523:10 at ChildProcess.exithandler (child_process.js:641:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Process.ChildProcess._handle.onexit (child_process.js:810:5) info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: xcode-select threw an error)","origValue":"xcode-select threw an error"},"sessionId":null} POST /wd/hub/session 500 1379ms - 204b

解决方案

It is possible to run the tests from a windows machine but not the way you are probably thinking. You will still need a mac. Here are the requirements:

A mac on your network with Appium server running Has Appium environment installed properly Has the .app on the machine If you have these three reqirements fulfilled and there is no firewall blocking network access to the mac then you can do it. You will have to actual tests on the windows machine but instead of specifying 127.0.0.1:8080 in the setup method as the IP address of Appium server you will replace it with this: yourmacsipaddress:8080 and this should execute the test properly.

Remember that you have to specify the path of the .app in the test which is running from your windows machine. But the catch is that the path has to be the path of the .app in the mac and not on your windows machine.

So the tests will run from your Windows machine but the installation of the app, the automation, and the testing will be done on the mac but you will get the "pass" or "fail" update on your Windows machine.

这篇关于Windows 上对 appium 的 iOS 支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆