我在Robot Framework的自定义库中定义了一个函数:
def close_browser(self):
'''
description: 关闭当前浏览器
params:
None
return:
None
'''
self.driver.quit()
但是当我在RIDE中搜索该函数时,该函数的注释显示如下:
description:\ xb9 \ xd8 \ xb1 \ xd5 \ xb5 \ xb1 \ xc7 \ xb0 \ xe4 \ xaf \ xc0 \ xc0 \ xc6 \ xf7 params:无返回:无
答案 0 :(得分:2)
在自定义库标题中声明此内容
# -*- coding: utf-8 -*-
大部分看起来像
# -*- coding: utf-8 -*-
class aaMyLibrary:
def stackover(self):
'''
description: 关闭当前浏览器
params:
None
return:
None'''
self.driver.quit()
会结果 this