appium踩过的坑
来源:互联网 发布:杯子知乎 编辑:程序博客网 时间:2024/04/28 20:19
运行appium报错:Appium will not work if used or installed with sudo
bixiaopeng@bixiaopengtekiMacBook-Pro ~$ error: Appium will not work if used or installed with sudo. Please rerun/install as a non-root user. If you had to install Appium using `sudo npm install -g appium`, the solution is to reinstall Node using a method (Homebrew, for example) that doesn't require sudo to install global npm packages.[1]+ Exit 1 appium
出错原因:
权限问题,无法使用sudo来运行appium
解决办法:
步骤1. 改变node的所有者
cd /usr/local/libsudo chown -R 普通用户名 node_modules
找到 .npm,cd进入后执行:
sudo chown -R 普通用户名 .npm
步骤2. 卸载appium
npm uninstall appium -g
步骤3. 重新安装appium
npm install -g appium
步骤4. 启动
appium &
步骤5. 查看是否运行成功
浏览器打开:
http://0.0.0.0:4723/
显示:
That URL did not map to a valid JSONWP resource
说明成功
Appium踩过的坑二:
运行iOS用例报错:We don't have write access to /Applications/Xcode.app..
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: We don't have write access to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/Applications/MobileSafari.app, please re-run authorize as bixiaopeng) (WARNING: The server did not provide any stacktrace information)Command duration or timeout: 308 millisecondsBuild info: version: '2.41.0', revision: '3192d8a6c4449dc285928ba024779344f5423c58', time: '2014-03-27 11:29:39'---------com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:202) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)Process finished with exit code 255
问题原因:
又是权限问题
解决办法:更改Xcode.app的权限
bixiaopeng@bixiaopengtekiMacBook-Pro Applications$ sudo chown -R bixiaopeng Xcode.appPassword:
再次运行:
OK
0 0
- appium踩过的坑
- appium踩过的坑
- appium踩过的坑(持续更新..)
- Appium 一些踩过的坑
- 趟过Appium的坑
- 趟过Appium的坑(1 Chrome version must be >= 43.0.2357.0)
- 踩过的坑
- 踩过的坑
- 踩过的坑
- Appium学习遇到的坑
- appium碰到的一些坑
- 我踩过的听过的那些坑
- Phonegap踩过的坑
- Phonegap踩过的坑
- Kendo踩过的坑
- Phonegap踩过的坑
- googleplay踩过的坑
- dispatch_group_t踩过的坑
- Android资源图片存放问题
- Appinions:2014年全球智能手表调查报告
- android 运用线程
- Linux 学习笔记 -- 第二部分 Linux 文件、目录与磁盘格式 -- 第7章 Linux 文件与目录管理
- 最迷你wifi智能插座
- appium踩过的坑
- Myeclipse的workspace配置文件浅谈 .
- Head First装饰模式(Decorator)
- chapter11 separate Compilition and Namespaces(part1)
- android模拟器按键对应的键盘按键
- 改错题_102
- 在嵌入式Linux系统(OK6410)中移植Boa 服务器
- Luasocket 服务器,客户端简单实例
- 好久没做asp了,这个天都在做asp,今天做asp操作xml,找了些资料才做出来