蒲公英专家测试 现在开始在用蒲公英做内测分发测试,之前用的 fir,fir 对应用下载数量有限制,所以转投蒲公英了
不要用 sendKeys,用 set_text 看看了
其实看 appium 中的日志可以知道,他会自动调用消除方法的,但为什么清除不了就不知道原因了
#2 楼 @sanlengjingvv 的意思看看你的 setUp 和 tearDown
谢谢 @strayeagle 的回复,我开始还以为这个模块是系统的了
from common.testCaseBase import desired_capabilities
#6 楼 @strayeagle 你这个模块是自己写的吗?
我根据例子里面的 import desired_capabilities 引入报没有这个模块
import unittest
from appium import webdriver
from appium.common.exceptions import NoSuchContextException
import desired_capabilities
import desired_capabilities
ImportError: No module named desired_capabilities
支持一下
#1 楼 @xiaomayi0323
cleartext 成功了,但 Sending plain text to element 的值是累加的
我把 send_keys 改为 set_text 后没有出现这个问题了,情况不明
非常感谢@anikikun 同学的分享
支持,后面试试看
试了下用模拟器模拟 4.4.2
desired_caps['device'] = 'Android' #Selendroid
desired_caps['version'] = '4.4.2'
成功执行所有操作
但如果
desired_caps['device'] = 'Selendroid'
设置成 Selendroid 还是会有 8080 的问题,出现一样的错误,是在这个模式下要设置些什么东西?
#4 楼 @lihuazhang 我把 APK 放到 C 盘就没有出现这个错误了,可以正常安装和打开应用,但又出现了新的错误,打开应用后就停在那里不动了
我看这里怎么变成 8080 端口了?
info: Found an apk we want to keep at /data/local/tmp/b2d2916bb5388e1dc281ec3e71
ef1234.apk
debug: executing: "E:\AndroidSdk\sdk\platform-tools\adb.exe" -s 5dd37976 shell r
m "/data/local/tmp/mq_1385110084.apk" && rm "/data/local/tmp/mq_1387864898.apk"
&& rm "/data/local/tmp/mq_1387865010.apk" && rm "/data/local/tmp/mq_1389000903.a
pk" && rm "/data/local/tmp/mq_1397224934.apk"
warn: killed=false, code=1, signal=null
debug: executing: "E:\AndroidSdk\sdk\platform-tools\adb.exe" -s 5dd37976 shell "
pm install -r /data/local/tmp/b2d2916bb5388e1dc281ec3e71ef1234.apk"
info: [ADB] Forwarding system:8080 to device:8080
debug: executing: "E:\AndroidSdk\sdk\platform-tools\adb.exe" -s 5dd37976 forward
tcp:8080 tcp:8080
debug: Pushing unlock helper app to device...
debug: executing: "E:\AndroidSdk\sdk\platform-tools\adb.exe" -s 5dd37976 install
"C:\Users\hubiao\AppData\Roaming\npm\node_modules\appium\build\unlock_apk\unloc
k_apk-debug.apk"
debug: executing: "E:\AndroidSdk\sdk\platform-tools\adb.exe" -s 5dd37976 shell "
dumpsys window"
info: Writing dumpsys output to C:\Users\hubiao\AppData\Roaming\npm\node_modules
\appium\.dumpsys.log
debug: Screen already unlocked, continuing.
debug: executing: "E:\AndroidSdk\sdk\platform-tools\adb.exe" -s 5dd37976 shell "
am instrument -e main_activity 'com.example.android.contactmanager.ContactManage
r' com.example.android.contactmanager.selendroid/io.selendroid.ServerInstrumenta
tion"
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status
","method":"GET"}
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Waited 20 secs for sel
endroid server and it never showed up
info: Error: Waited 20 secs for selendroid server and it never showed up
at C:\Users\hubiao\AppData\Roaming\npm\node_modules\appium\lib\devices\andro
id\selendroid.js:258:14
at Request._callback (C:\Users\hubiao\AppData\Roaming\npm\node_modules\appiu
m\lib\devices\common.js:103:5)
at self.callback (C:\Users\hubiao\AppData\Roaming\npm\node_modules\appium\no
de_modules\request\request.js:129:22)
at Request.EventEmitter.emit (events.js:95:17)
at ClientRequest.self.clientErrorHandler (C:\Users\hubiao\AppData\Roaming\np
m\node_modules\appium\node_modules\request\request.js:239:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:415:13)
info: Responding to client with error: {"status":33,"value":{"message":"A new se
ssion could not be created. (Original error: Waited 20 secs for selendroid serve
r and it never showed up)","origValue":"Waited 20 secs for selendroid server and
it never showed up"},"sessionId":null}
POST /wd/hub/session 500 43722ms - 268b
#4 楼 @lihuazhang 我在公司里是在同一个目录也会出这个问题,是不是要同 node.js 同一个目录才行? 我 node.js 安装在 C 盘的
谢谢 @monkey @lihuazhang 光临
monkey 蛋疼的地方还情况明示_^