创建本地库
- 在python的安装路劲 Lib—site-packages新建库文件夹
- 在文件夹里新建与库文件夹同名的py文件和初始文件__init__.py
- init.py配置为:
from FJComment import FJComment
__verison__ = "0.0.1"
class FJComment(FJComment):
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
- 库文件配置为:
class FJComment(FJComment):
def init(self):
pass
def test(self):
print ‘test success!’
注意保持所有名称相同 - 在任意路径加载自定义库文件的方法
详细参见:https://blog.youkuaiyun.com/leo1212/article/details/79053603
引入自建库报错解决方法
在tools中查看view ride log 看报错信息,是不是缺少模块