@monkey 额 我写错了 是中断测试。网络切换,比如 2G 3G wifi 之间的切换 我目前还没有找到好的办法,你那有什么好的办法,分享一下,(__^) 嘻嘻……
#2 楼 @2023484665 企业证书 添加的 UDID,发现这种情况行不通 ,手机越狱之后 就没有问题了
重新梳理的该问题 请见http://testerhome.com/topics/701
@daydayup 改了之后任然超时错误 贴上 apium 的 log 看看能不能看出来什么?
info: App is an iOS bundle, will attempt to run as pre-existing
debug: Request received with params: {"desiredCapabilities":{"browserName":"iOS","platform":"Mac","version":"6.1","device":"iPhone Retina (4-inch)","app":"com.baidu.news.newstest"}}
info: Creating new appium session ae26adee-1e6f-475f-a1a7-807f9f43da0e
info: Removing any remaining instruments sockets
info: Cleaned up instruments socket /tmp/instruments_sock
info: Setting Xcode folder
info: Setting Xcode version
info: Setting iOS SDK Version
info: iOS SDK Version set to 7.1
info: Detecting automation tracetemplate
debug: Creating instruments
info: Not auto-detecting udid, running on sim
info: Localizable.strings is not currently supported when using real devices.
info: Not setting locale because we're using a real device
info: Not setting iOS and app preferences since we're on a real device
info: Starting iOS device log capture via idevicesyslog
info: Not setting device type since we're connected to a device
info: Installing ipa found at /Users/chuyaoyao/Desktop/newspages/baiduyuedu2.ipa
info: Creating iDevice object with udid 4a8e05203ae983e4c5f730a4b24ca02d72c6f814
debug: Nothing found on device, going ahead and installing.
debug: Starting instruments
info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Attempting to run app on real device with UDID 4a8e05203ae983e4c5f730a4b24ca02d72c6f814
info: 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 4a8e05203ae983e4c5f730a4b24ca02d72c6f814 com.baidu.news.newstest -e UIASCRIPT /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments
info: And extra without-delay env: {}
info: And launch timeouts (in ms): {"global":90000}
debug: Appium request initiated at /wd/hub/status
info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.18.0","revision":"17af02875e50682d6f1bdbd7885dad6e54e1c08a"}},"sessionId":"ae26adee-1e6f-475f-a1a7-807f9f43da0e"}
debug: Request received with params: {}
GET /wd/hub/status 200 1ms - 199b
攒
我觉得 app 文件只能用在模拟器上 ipa 文件能用在真机上 恩 好像是这样的
再补充一下:包安装上了 ,也拉起来了,出错在发生在启动 driver 时
问题更新一下
发现启动 driver 的时候就报错了
我用的是 ruby 请 ruby 高手来看一下
/Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/protocol.rb:158:in rescue in rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)
rbuf_fill'
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/protocol.rb:152:in
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/protocol.rb:134:in readuntil'
readline'
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/protocol.rb:144:in
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:39:in read_status_line'
read_new'
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:28:in
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:1406:in block in transport_request'
catch'
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:1403:in
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:1403:in transport_request'
request'
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:1376:in
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:1369:in block in request'
start'
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:852:in
from /Users/chuyaoyao/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:1367:in request'
response_for'
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/remote/http/default.rb:83:in
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/remote/http/default.rb:39:in request'
call'
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/remote/http/common.rb:40:in
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/remote/bridge.rb:634:in raw_execute'
create_session'
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/remote/bridge.rb:99:in
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/remote/bridge.rb:68:in initialize'
new'
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/common/driver.rb:33:in
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver/common/driver.rb:33:in for'
for'
from /Users/chuyaoyao/.rvm/gems/ruby-2.0.0-p451/gems/selenium-webdriver-2.41.0/lib/selenium/webdriver.rb:67:in
from build.rb:12:in `
*** LOCAL GEMS ***
appium_lib (0.24.1)
awesome_print (1.2.0)
bigdecimal (1.2.0)
blankslate (2.1.2.4)
bundler (1.6.1)
bundler-unload (1.0.2)
childprocess (0.5.2)
executable-hooks (1.3.1)
ffi (1.9.3)
gem-wrappers (1.2.4)
io-console (0.4.2)
json (1.8.1, 1.7.7)
minitest (4.3.2)
multi_json (1.9.2)
parslet (1.5.0)
posix-spawn (0.3.8)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
rubygems-bundler (1.4.3)
rubyzip (1.1.3)
rvm (1.11.3.9)
selenium-webdriver (2.41.0)
test-unit (2.0.0.0)
toml (0.1.1)
websocket (1.0.7)
https://github.com/appium/appium/issues/2276 跟你一样的问题 你看看
#6 楼 @lihuazhang 恩恩 ~ 按照你的步骤 安装成功了 多谢指点
Selendroid 有自带的工具 localhost:4444/inspector
#4 楼 @lihuazhang 不加 g 的话 好像没有装上 哦 。因为我输入 appium -v 的时候 没有输出版本号,/usr/local/bin 里面没有 appium 的相关命令 /usr/local/lib//node_modules 里面也没有 appium ,噶感觉没有装上哇。
看来当前文件夹下没有 authorize_ios 这个 task
那么执行 “sudo grunt /usr/local/lib/node_modules/appium/bin/authorize-ios.js”
竟然这样的错误:
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.
————————————————————————————————————————
在看一下 我的 node 是不是用 brew 安装的
chuyaoyaodeiMac:bin chuyaoyao$ ls -la
total 56
drwxrwxr-x 10 root admin 340 4 9 11:34 .
drwxrwxr-x 16 root admin 544 4 8 21:28 ..
lrwxr-xr-x 1 chuyaoyao admin 40 4 9 11:34 appium -> ../lib/node_modules/appium/bin/appium.js
lrwxr-xr-x 1 chuyaoyao admin 47 4 9 11:34 appium-doctor -> ../lib/node_modules/appium/bin/appium-doctor.js
lrwxr-xr-x 1 chuyaoyao admin 47 4 9 11:34 authorize_ios -> ../lib/node_modules/appium/bin/authorize-ios.js
-rwxr-xr-x 1 chuyaoyao admin 813 4 4 21:16 brew
lrwxr-xr-x 1 chuyaoyao admin 39 4 8 15:29 grunt -> ../lib/node_modules/grunt-cli/bin/grunt
lrwxr-xr-x 1 chuyaoyao admin 31 4 8 21:28 node -> ../Cellar/node/0.10.26/bin/node
drwxr-xr-x 3 chuyaoyao staff 102 4 8 16:23 node_modules
lrwxr-xr-x 1 chuyaoyao admin 38 4 8 21:29 npm -> ../lib/node_modules/npm/bin/npm-cli.js
@lihuazhang 按照你说的:
1.下载源码
2.到源码的文件夹里面执行 ‘npm install’。ps:但是不加 -g ,没有将命令添加到/urs/local/bin 下面 所以我在这里执行的是 “npm install -g”
3.在源码的文件夹下 执行 “sudo grunt authorize_ios ”
报错信息:
chuyaoyaodeiMac:appium chuyaoyao$ sudo grunt authorize_ios
Password:
Warning: Task "authorize_ios" not found. Use --force to continue.
Aborted due to warnings.
该问题 0.18 上任然存在呀
#1 楼 @lihuazhang 报 bug 了 得到的结论 This is fixed in master. It will appear if you clone from master or if you wait for the next release. Also, you must run authorize_ios with sudo.
希望父母身体健康,攒钱涨工资把父母接到身边照顾
弱弱的问一下 上行带宽 和下行带宽 在哪里设置的 ?