netease / airtest Goto Github PK
View Code? Open in Web Editor NEWDeprecated, moved to http://airtest.netease.com
License: BSD 3-Clause "New" or "Revised" License
Deprecated, moved to http://airtest.netease.com
License: BSD 3-Clause "New" or "Revised" License
按照这些步骤来安装
git clone https://github.com/netease/airtest.git
cd airtest
python setup.py install
但是当我执行 python setup.py install时,
Traceback (most recent call last):
File "setup.py", line 45, in
''')
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 380, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 610, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 661, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 709, in process_distribution
[requirement], self.local_index, self.easy_install
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 830, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 1075, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 1087, in obtain
return installer(requirement)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 629, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 659, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 842, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1070, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1056, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 240, in run_setup
raise
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 164, in save_modules
saved_exc.resume()
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 139, in resume
compat.reraise(type, exc, self._tb)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 152, in save_modules
yield saved
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 237, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 267, in run
return func()
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 236, in runner
_execfile(setup_script, ns)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-1BsyvL/aircv-1.03/setup.py", line 4, in
import sys
File "/tmp/easy_install-1BsyvL/aircv-1.03/aircv.py", line 43, in
ImportError: No module named cv2
02/03/2016 14:22:45 INFO - Click C:/Users/Administrator/Documents/GitHub/customer_side\images\homepage/xxx.png point: (425, 72)
02/03/2016 14:22:46 DEBUG - delay after click: 0.50s
我的屏幕分辨率是768*1024,我截得是从左到右的横屏图片,但是这个click的位置有点问题吧,中间位置是384,它为什么click的是425,感觉click的位置有问题啊。。纵坐标也是的,airtest click的是图片最中间的位置,x,y平均值的中间位置么?
看了下报错,好像是在subprocess里面,通过adb命令操作什么。。。截图目前是通过adb去实现的吗?
同时进行多个设备的并发测试有没有遇到过什么问题?稳定性如何?
这是什么情况??
dir(app)
['class', 'delattr', 'dict', 'doc', 'format', 'getattr', 'getattribute',
'hash', 'init', 'module', 'new', 'reduce', 'reduce_ex', 'repr', 'seta
ttr', 'sizeof', 'str', 'subclasshook', 'weakref', '_clss', 'cron', 'logPerformance
', 'startMonitor', 'stopMonitor']
app.click()
Traceback (most recent call last):
File "", line 1, in
File "airtest\devsuit.py", line 75, in _wrapper
ret = v(_args, *_kwargs)
TypeError: click() takes at least 2 arguments (1 given)
web的截图工具不能保存成中文名啊。。
_<
能不能让device这个类也可以直接截屏等操作,这样可以操作主页面等其他的情况。
如题,键盘有没有方法能切换?到设置里面切换键盘?
如题。。
还没看代码,想问下这个问题。。
看了下,项目中将图片分辨率做修改用了cv2.resize函数,用的是余数的宽高比,但是比配的图片阈值并不高,但是我百度了一下,
用了nim = cv2.resize(imsrc, (768,1280), interpolation=cv2.INTER_CUBIC),直接带入,发现可以匹配到0.8以上阈值的图片,希望这部分能做下修改。: P
imsrc = cv2.imread('s1080full.png',cv2.IMREAD_UNCHANGED)
ow, oh = 768,1280
cw, ch = 1080,1920
(ratew, rateh) = cw/float(ow), ch/float(oh)
nim = cv2.resize(imsrc, (0, 0), fx=ratew, fy=rateh)imsch = imread('B.png')
result = find_all_template(nim, imsch)
templmatch_value(thresh:0.5) = 0.586
templmatch_value(thresh:0.5) = 0.574
templmatch_value(thresh:0.5) = 0.541
templmatch_value(thresh:0.5) = 0.532
templmatch_value(thresh:0.5) = 0.529
templmatch_value(thresh:0.5) = 0.524
templmatch_value(thresh:0.5) = 0.514
templmatch_value(thresh:0.5) = 0.504
templmatch_value(thresh:0.5) = 0.498imsrc = cv2.imread('s1080full.png',cv2.IMREAD_UNCHANGED)
nim = cv2.resize(imsrc, (768,1280), interpolation=cv2.INTER_CUBIC)imsch = imread('B.png')
result = find_all_template(nim, imsch)
templmatch_value(thresh:0.5) = 0.872
templmatch_value(thresh:0.5) = 0.743
templmatch_value(thresh:0.5) = 0.720
templmatch_value(thresh:0.5) = 0.666
templmatch_value(thresh:0.5) = 0.660
templmatch_value(thresh:0.5) = 0.657
templmatch_value(thresh:0.5) = 0.650
templmatch_value(thresh:0.5) = 0.643
templmatch_value(thresh:0.5) = 0.595
templmatch_value(thresh:0.5) = 0.593
templmatch_value(thresh:0.5) = 0.585
templmatch_value(thresh:0.5) = 0.581
templmatch_value(thresh:0.5) = 0.547
templmatch_value(thresh:0.5) = 0.524
templmatch_value(thresh:0.5) = 0.523
templmatch_value(thresh:0.5) = 0.519
templmatch_value(thresh:0.5) = 0.510
templmatch_value(thresh:0.5) = 0.508
templmatch_value(thresh:0.5) = 0.495
比如在统计UI打开时间时,需要将用于图像识别的时间剔除掉
drag是屏幕滑动的方法吗?如果是的话,在Genymotion模拟器不能滑动,一开始以为是两个图片的x坐标不一致,后来改成一致的x坐标,还是不行。
1.这个方法支持两个图片x或者y坐标不同的情况么?
2.是否是模拟器的原因,是驱动adb滑动屏幕?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.