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

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

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)

文件放在

原文地址:https://www.cnblogs.com/1234abcdttttjy001/p/10560235.html