主要记录自己遇到的相关问题、错误
安装后在RIDE中试运行时,提示如下:
command: robot.bat --argumentfile C:\Users\ZHANGY~1\AppData\Local\Temp\RIDEhs3akn2i.d\argfile.txt --listener "C:\Program Files\Python37\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:53872:False" F:\robot\测试项目
[WinError 2] 系统找不到指定的文件。
经回想安装过程,曾遇到提示“C:\Program"异常,怀疑是RIDE不支持”C:\Program Files\Python37“目录中有空格造成的。
所以重新安装了Python,放在C盘根目录
”C:\Python37“后就没这问题了
总结:路径空格不支持的Bug
C:\Users\zhangyongfu>npm install -g appium
npm WARN deprecated [email protected]: Not Ready For Production
C:\Users\zhangyongfu\AppData\Roaming\npm\authorize-ios -> C:\Users\zhangyongfu\A
ppData\Roaming\npm\node_modules\appium\node_modules\.bin\authorize-ios
C:\Users\zhangyongfu\AppData\Roaming\npm\appium -> C:\Users\zhangyongfu\AppData\
Roaming\npm\node_modules\appium\build\lib\main.js
> [email protected] install C:\Users\zhangyongfu\AppData\Roaming\npm\no
de_modules\appium\node_modules\appium-chromedriver
> node install-npm.js
[20:11:19] [Chromedriver Install] Installing Chromedriver version '2.46' for pla
tform 'win' and architecture '32'
[20:11:19] [Chromedriver Install] Opening temp file to write 'chromedriver_win32
' to...
[20:11:19] [Chromedriver Install] Opened temp file 'C:\Users\ZHANGY~1\AppData\Lo
cal\Temp\2019221-6372-1p4rgte.s9o6\chromedriver_win32.zip'
[20:11:19] [Chromedriver Install] Downloading https://chromedriver.storage.googl
eapis.com/2.46/chromedriver_win32.zip...
[20:11:25] [Chromedriver Install] Writing binary content to C:\Users\ZHANGY~1\Ap
pData\Local\Temp\2019221-6372-1p4rgte.s9o6\chromedriver_win32.zip...
[20:11:25] [Chromedriver Install] Extracting C:\Users\ZHANGY~1\AppData\Local\Tem
p\2019221-6372-1p4rgte.s9o6\chromedriver_win32.zip to C:\Users\ZHANGY~1\AppData\
Local\Temp\2019221-6372-1p4rgte.s9o6\chromedriver_win32
[20:11:25] [Chromedriver Install] Creating C:\Users\zhangyongfu\AppData\Roaming\
npm\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win...
[20:11:25] [Chromedriver Install] Copying unzipped binary, reading from C:\Users
\ZHANGY~1\AppData\Local\Temp\2019221-6372-1p4rgte.s9o6\chromedriver_win32\chrome
driver.exe...
[20:11:25] [Chromedriver Install] Writing to C:\Users\zhangyongfu\AppData\Roamin
g\npm\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chro
medriver.exe...
[20:11:25] [Chromedriver Install] C:\Users\zhangyongfu\AppData\Roaming\npm\node_
modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.ex
e successfully put in place
> [email protected] install C:\Users\zhangyongfu\AppData\Roaming\n
pm\node_modules\appium\node_modules\appium-selendroid-driver
> node ./bin/install.js
[20:11:31] Java version 1.7.0_80 found
[20:11:35] Ensuring C:\Users\zhangyongfu\AppData\Roaming\npm\node_modules\appium
\node_modules\appium-selendroid-driver\selendroid\download exists
[20:11:35] Downloading Selendroid standalone server version 0.17.0 from https://
repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-sta
ndalone-0.17.0-with-dependencies.jar --> C:\Users\zhangyongfu\AppData\Roaming\np
m\node_modules\appium\node_modules\appium-selendroid-driver\selendroid\download\
selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d
82.jar
[20:11:54] Writing binary content to C:\Users\zhangyongfu\AppData\Roaming\npm\no
de_modules\appium\node_modules\appium-selendroid-driver\selendroid\download\sele
ndroid-server.jar.tmp
[20:11:54] Selendroid standalone server downloaded
[20:11:54] Determining AndroidManifest location
[20:11:55] Determining server apk location
[20:11:55] Extracting manifest and apk to C:\Users\zhangyongfu\AppData\Roaming\n
pm\node_modules\appium\node_modules\appium-selendroid-driver\selendroid\download
[20:11:57] Copying manifest and apk to C:\Users\zhangyongfu\AppData\Roaming\npm\
node_modules\appium\node_modules\appium-selendroid-driver\selendroid
[20:11:57] Cleaning up temp files
[20:11:57] Fixing AndroidManifest icon bug
> [email protected] install C:\Users\zhangyongfu\AppData\Roaming\npm\n
ode_modules\appium\node_modules\appium-windows-driver
> node install-npm.js
info WinAppDriver You must use WinAppDriver version 1.1
info WinAppDriver Verifying WinAppDriver version 1.1 is installed via comparing
the checksum.
info WinAppDriver WinAppDriver.exe doesn't exist at the correct version 1.1, set
ting up
info WinAppDriver Opening temp file to write WinAppDriver to...
info WinAppDriver Will write to C:\Users\ZHANGY~1\AppData\Local\Temp\WinAppDrive
r.msi
info WinAppDriver Downloading https://github.com/Microsoft/WinAppDriver/releases
/download/v1.1/WindowsApplicationDriver.msi...
Error: connect ETIMEDOUT 54.231.98.72:443
WinAppDriver was not installed; please check your system and re-run npm install
if you need WinAppDriver
> [email protected] install C:\Users\zhangyongfu\AppData\Roaming\npm\node_modules\
appium\node_modules\heapdump
> node-gyp rebuild
C:\Users\zhangyongfu\AppData\Roaming\npm\node_modules\appium\node_modules\heapdu
mp>if not defined npm_config_node_gyp (node "D:\nodejs\node_modules\npm\node_mod
ules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" re
build ) else (node "D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-g
yp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Python37\python.EXE -c import sys; prin
t "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:259:5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\node_mod
ules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\zhangyongfu\AppData\Roaming\npm\node_modules\appium\node_m
odules\heapdump
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\app
ium\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
2.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ap
pium\node_modules\heapdump):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-g
yp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ [email protected]
added 568 packages from 394 contributors in 243.876s
C:\Users\Carlson>adb connect 192.168.98.112
missing port in specification: tcp:192.168.98.112
解决方法:
使用adb connect xxx.xxx.xxx.xxx:port(如adb connect 192.168.16.233:666)指定另外一个端口去连接,有时还会提示该错误,记得看测试机是否有允许调试的弹窗。
原因:
有可能是因为本机默认adb端口被占用,前后两台测试机均提示该问题。
在家遇到该问题,使用上述方法,出现以下问题
cannot connect to xxx.xxx.xxx.xxx:5555: 由于目标计算机积极拒绝,无法连接。 (10061)
而后分别输入
adb start-server
adb tcpip 5555
而后再次输入最初的ip+port的命令后成功连接。
原因:希望有人能告诉我,难道是需要指定通讯port?后续再了解一下
参考文档:
ADB使用 - triste_who的博客 - CSDN博客