robot自定义库

2018-09-21  本文已影响7人  heliping_peter

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")

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

上一篇 下一篇

猜你喜欢

热点阅读