Macaca [基于 Node.js 的自动化测试-Macaca] - Macaca 支持 Node.js, Java 和 Python

达峰的夏天 · 2016年08月17日 · 最后由 datafu 回复于 2017年06月21日 · 3706 次阅读

上一篇 - 如何测试游戏引擎

Macaca 已支持 Java 与 Python,目前支持如下三大开发平台。

Java

Python

Macaca 用户开放服务


欢迎讨论,互相学习。

微博: http://weibo.com/xudafeng
Github: https://github.com/xudafeng

下一篇 - 如何测试命令行工具

共收到 17 条回复 时间 点赞
达峰的夏天 [该话题已被删除] 中提及了此贴 08月17日 22:16

更新真快 棒

提一个小小小的建议啊😁 ,python @classmethod 装饰的函数,一般第一个参数是用 cls。不建议使用 self 哦,sorry。

@classmethod
def setUpClass(self):
    self.driver = WebDriver(desired_caps, server_url)
    self.driver.init()

好棒 赞一下

顶一个,终于支持 python 了

很不错啊 支持 python 了 这会是下一个 appium 吗?

Collecting wd (from -r requirements.txt (line 1))
  Downloading wd-0.1.1.zip
Requirement already satisfied (use --upgrade to upgrade): requests in /Library/Python/2.7/site-packages/requests-2.10.0-py2.7.egg (from wd->-r requirements.txt (line 1))
Collecting retrying (from wd->-r requirements.txt (line 1))
  Downloading retrying-1.3.3.tar.gz
Collecting six>=1.7.0 (from retrying->wd->-r requirements.txt (line 1))
  Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, retrying, wd
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-rPKRKF-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

pip install -r requirements.txt 这步报错,请问是什么情况

有个问题,现在是 python2 和 python3 都支持吗?

#7 楼 @huang053117 7 楼的问题解决了,但是 py 运行出错

Traceback (most recent call last):
  File "/Users/huangzhigang/Documents/macaca-test-sample-python/macaca-desktop-sample.test.py", line 3, in <module>
    from macaca import WebDriver
  File "/Library/Python/2.7/site-packages/macaca/__init__.py", line 25, in <module>
    from .webdriver import WebDriver
  File "/Library/Python/2.7/site-packages/macaca/webdriver.py", line 697
    *, asserter=lambda x: x):
     ^
SyntaxError: invalid syntax

#10 楼 @xdf 可以帮忙看下这个问题吗

Traceback (most recent call last):
  File "/Users/huangzhigang/Documents/macaca-test-sample-python/macaca-desktop-sample.test.py", line 3, in <module>
    from macaca import WebDriver
  File "/Library/Python/2.7/site-packages/macaca/__init__.py", line 25, in <module>
    from .webdriver import WebDriver
  File "/Library/Python/2.7/site-packages/macaca/webdriver.py", line 697
    *, asserter=lambda x: x):
     ^
SyntaxError: invalid syntax

#12 楼 @xdf 支持 py2 不??

#15 楼 @xdf o.....No...mygod,好吧,看来我得切换到 py3 才能玩 macaca 了,最好支持一下 py2 噻

#16 楼 @lingcizhisheng 还在用 py2 的原因是什么?

达峰的夏天 [该话题已被删除] 中提及了此贴 09月26日 10:16

python 文档点击不进去?

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册