当前位置: 首页 > 知识库问答 >
问题:

Appia-需要帮助:模拟器没有从ppium.app启动应用程序

孙斌
2023-03-14

运行Appium应用程序进行自动化移动应用程序测试时出现问题

以下工具版本我使用的是Appium版本:1.2.1 Xcode:5.1.1

以下是我正在做的步骤,

  1. 下载ppium.dmg
  2. 运行dmg文件,然后启动appium.app文件
  3. 从Xcode构建7.1模拟器的应用程序
  4. 在appium.app,启用'App Path'选项并提供. app文件路径"/用户/umairrashid/库/应用程序支持/iPhone模拟器/7.1/应用程序/878133B5-7078-4E92-B3A2-607A3A3C2AC3/Recipes.app"
  5. 在常规设置中,服务器地址:127.0.0.1,端口:4723
  6. 检查更新:启用
  7. 新命令超时:7200s

当我点击“启动”按钮时,一切似乎都很好。

当我点击检查员按钮,然后显示以下错误,

无法启动Appium检查器

无法启动新会话

通过使用Appium.App中的“App Path”参数(以及Android的package和activity)或通过连接selenium客户端并在所需的capabilities对象中提供该参数,确保Appium服务器运行时打开了一个应用程序。

在Appium控制台,我得到以下错误,

2014-08-21T17:57:57.789Z - info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium"}}

2014-08-21T17:57:57.792Z - info: <-- POST /wd/hub/session 500 3.235 ms - 286 



2014-08-21T17:57:57.772Z - debug: Request received with params: {}

2014-08-21T17:57:57.772Z - debug: Responding to client with success: {"status":0,"value":{"build":{"version":"1.2.0","revision":"e53f49c706a25242e66d36685c268b599cc18da5"}}}

2014-08-21T17:57:57.775Z - debug: Appium request initiated at /wd/hub/sessions

2014-08-21T17:57:57.775Z - debug: Request received with params: {}

2014-08-21T17:57:57.775Z - debug: Responding to client with success: {"status":0,"value":[]}

2014-08-21T17:57:57.789Z - debug: Appium request initiated at /wd/hub/session

2014-08-21T17:57:57.789Z - debug: Request received with params: {"desiredCapabilities":{"platformName":"iOS","platformVersion":"7.1","newCommandTimeout":"999999","automationName":"Appium"}}

2014-08-21T17:57:57.790Z - error: The following desired capabilities are required, but were not provided: deviceName

2014-08-21T17:57:57.790Z - debug: Got configuration error, not starting session

2014-08-21T17:57:57.791Z - debug: Cleaning up appium session

2014-08-21T17:57:57.791Z - error: Failed to start an Appium session, err was: Error: The following desired capabilities are required, but were not provided: deviceName

2014-08-21T17:57:57.791Z - debug: Error: The following desired capabilities are required, but were not provided: deviceName

    at Capabilities.checkValidity (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/server/capabilities.js:120:13)

    at Appium.configure (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:256:35)

    at Appium.start (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:100:10)

    at Object.exports.createSession [as handle] (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:159:16)

    at next_layer (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:103:13)

    at Route.dispatch (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/route.js:107:5)

    at /Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:213:24

    at Function.proto.process_params (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:286:12)

    at next (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:207:19)

    at next (/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:182:38)

2014-08-21T17:57:57.791Z - debug: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: deviceName)","origValue":"The following desired capabilities are required, but were not provided: deviceName"},"sessionId":null}



2014-08-21T17:58:08.130Z - info: --> GET /wd/hub/status {}



—————————————————



When Launching with ‘Prelaunch Application’:Enabled, got following errors



2014-08-21T18:00:55.417Z - debug: Attempting to retry launching instruments, this is retry #3

2014-08-21T18:00:55.418Z - debug: Killall iPhoneSimulator



2014-08-21T18:01:00.420Z - info: Launching instruments



2014-08-21T18:01:00.421Z - debug: Attempting to run app on iPhone Retina (4-inch) - Simulator - iOS 7.1



2014-08-21T18:01:00.422Z - debug: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPhone Retina (4-inch) - Simulator - iOS 7.1 /Users/umairrashid/Library/Application Support/iPhone Simulator/7.1/Applications/878133B5-7078-4E92-B3A2-607A3A3C2AC3/Recipes.app -e UIASCRIPT /Users/umairrashid/Library/Application Support/appium/bootstrap/bootstrap-7a459bb511e03f3b.js -e UIARESULTSPATH /tmp/appium-instruments

2014-08-21T18:01:00.422Z - debug: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}

2014-08-21T18:01:00.422Z - debug: And launch timeouts (in ms): {"global":90000}



2014-08-21T18:01:01.415Z - debug: [INST STDERR] Instruments Usage Error : Could not remove existing output document 'file:///Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace': Error Domain=NSCocoaErrorDomain Code=642 "You can’t save the file “instrumentscli0.trace” because the volume “Appium” is read only." UserInfo=0x7fac5e2d6100 {NSFilePath=/Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace, NSUnderlyingError=0x7fac5d92d760 "The operation couldn’t be completed. Read-only file system"}.





2014-08-21T18:01:01.483Z - debug: [INSTSERVER] Instruments exited with code 254



2014-08-21T18:01:01.483Z - debug: Killall instruments



2014-08-21T18:01:01.486Z - debug: Instruments crashed on startup

在这里,我希望当我从Appium点击Inspect按钮时,模拟器就会启动,我可以在那个视图中看到XPath等。

共有2个答案

袁康裕
2023-03-14

通过将Appium.app拖动到您的apps文件夹,您确定已安装Appium吗?

下面的错误消息表明您只是从DMG文件启动它。

Instruments Usage Error : Could not remove existing output document 'file:///Volumes/Appium/Appium.app/Contents/Resources/node_modules/appium/instrumentscli0.trace'
景靖琪
2023-03-14

>

  • 你确定你选择了苹果的图标吗(有时我们会做愚蠢的点击错误)

    如果您已选中“强制设备”,请取消选中。

    如果您仍然有问题,最好将您的appium gui截图发布在这里,这样我可以以更全面的方式提供帮助

  •  类似资料:
    • 进程:org.wit.assignment,PID:13760 java.lang.runtimeException:无法实例化活动组件信息{org.wit.assignment/org.wit.activities.placeMarkactivity}:java.lang.ClassNotFoundException:未在路径:dexpathList[[zip文件“/data/app/org.w

    • 我使用ACR122读卡器已经有一段时间了,它在读取Mifare 1K或Mifare Ultralight NFC卡时都没有问题。 将读卡器升级到最新版本(ACR1251)后,我的程序无法读取Mifare 1K卡的UID。 这是我用来阅读的片段: 使用新版rad阅读器: ResponseAPDU.getSW1()函数返回98 而getSW2()返回130 我试着在网上和读卡器文档中搜索响应代码的解释

    • 我不太明白我在做什么,我做错了什么。请帮我修改/完成我的代码。我应该用你选择的输入数据创建至少3个Student对象,以使用类的构造函数初始化Student对象的所有数据字段。声明ArrayList对象以保存学生对象。将学生对象添加到ArrayList对象。调用Student类的toString方法,使用ArrayList对象中的Student对象打印学生的全名,后跟出生日期和每个学生的地址。 如

    • 在我当前的项目中,我正在使用Maven和Spring。我目前正在使用SLF4J记录器来记录服务。代替它,我想使用OWASP-ESAPI记录器。我不想使用安全性,只是日志服务。有人能指导我如何使用记录器,用最少的努力替换slf4j记录器吗?我尝试了很多谷歌搜索,但没有任何帮助。我也会非常感谢一些链接来获得有关记录器的知识。

    • /**程序可以将十进制转换为二进制并报告是否使用了非法字符*程序不能将二进制转换为十进制*/import java.util.scanner; /***这个类包含一个完整的程序,只有一个main()方法,用于*将非负十进制整数(即以10为基数的整数)转换为*正二进制整数(即以2为基数的整数)。要*转换的值是从命令行读入的。*/public class BaseConversions2{public

    • 很抱歉打扰你们,我是编程新手,一直在这个程序上有问题。 谢了! *********编辑***************我从BMI中删除了int值,但有损转换错误仍然存在。有什么办法解决这个问题吗?