代码改变世界

robotframework添加自定义的API,在Lib\site-packages路径下放入写好的py文件。

2019-03-19 17:48  拂堤杨柳醉春烟  阅读(533)  评论(0编辑  收藏  举报

其格式有要求,但不明白为什么

 

 

import os.path
import subprocess
import sys


class LoginLibrary(object):

def __init__(self):
self._sut_path = os.path.join(os.path.dirname(__file__),
'..', 'sut', 'login.py')
self._status = ''

def print(self,msg):
print(msg)

 

 

文件放在