我有一个Java Jar文件,我可以在我的selenium框架中成功使用。我想在Ruby自动化中使用相同的jar文件。谁能帮我 ? 注意:我使用的是PDF-util jar文件(比较两个pdf' s,像素到像素)
答案 0 :(得分:0)
如果你真的想使用那个jar,那么你可以使用%x()或反引号通过调用$ pip
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 659, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 967, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 858, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pip 9.0.1 (/usr/local/lib/python3.5/site-packages), Requirement.parse('pip==8.1.1'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mobiglas/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3017, in <module>
@_call_aside
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3003, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3030, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 661, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 674, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 853, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==8.1.1' distribution was not found and is required by the application
来测试你的jar。
您也可以查看ImageMagick gem,它可能会满足您的需求。
如果它足以比较二进制文件,原始文件和您可以在测试中下载的二进制文件,您可以比较它们的哈希值并且它应该足够了。