美文网首页
robot自定义库

robot自定义库

作者: heliping_peter | 来源:发表于2018-09-21 15:32 被阅读7次

1.文档结构,文件夹名使用库名,初始化文件使用库名,但是继承实现类


image.png

2.初始化函数

from .myseleniumKeywords import myseleniumKeywords


class myselenium(myseleniumKeywords):
    """ this is init info
    """

    ROBOT_LIBRARY_SCOPE = 'GLOBAL'

注意此处的注释就是库介绍
3.实现函数

class myseleniumKeywords(object):
    """
    my class info
    """
    ROBOT_LIBRARY_SCOPE = 'Global'
    def myopen(self):
        """
        my funciont info
        """
        print("hello")

方法里面的注释就是关键词的介绍

相关文章

网友评论

      本文标题:robot自定义库

      本文链接:https://www.haomeiwen.com/subject/toaanftx.html