Macaca 已支持 Java 与 Python,目前支持如下三大开发平台。
欢迎讨论,互相学习。
微博: http://weibo.com/xudafeng
Github: https://github.com/xudafeng
更新真快 棒
提一个小小小的建议啊 ,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
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
#14 楼 @lingcizhisheng py3.4 及以上
#16 楼 @lingcizhisheng 还在用 py2 的原因是什么?
python 文档点击不进去?