Пример #1
0
    def get_keyword_documentation(self, name):
        if name != '__intro__':
            doc = SeleniumLibrary.get_keyword_documentation(self, name)
            return doc.replace('SeleniumLibrary', 'Selenium2Library')
        intro = SeleniumLibrary.__doc__
        intro = intro.replace('SeleniumLibrary', 'Selenium2Library')
        return """
---
*NOTE:* Selenium2Library has been renamed to SeleniumLibrary since version 3.0.
Nowadays Selenium2Library is just a thin wrapper to SeleniumLibrary that eases
with transitioning to the new project. See
[https://github.com/robotframework/SeleniumLibrary|SeleniumLibrary] and
[https://github.com/robotframework/Selenium2Library|Selenium2Library]
project pages for more information.
---
""" + intro
Пример #2
0
    def get_keyword_documentation(self, name):
        if name != '__intro__':
            doc = SeleniumLibrary.get_keyword_documentation(self, name)
            return doc.replace('SeleniumLibrary', 'Selenium2Library')
        intro = inspect.getdoc(SeleniumLibrary)
        intro = intro.replace('SeleniumLibrary', 'Selenium2Library')
        return """
---
*NOTE:* Selenium2Library has been renamed to SeleniumLibrary since version 3.0.
Nowadays Selenium2Library is just a thin wrapper to SeleniumLibrary that eases
with transitioning to the new project. See
[https://github.com/robotframework/SeleniumLibrary|SeleniumLibrary] and
[https://github.com/robotframework/Selenium2Library|Selenium2Library]
project pages for more information.
---
""" + intro
Пример #3
0
    def get_keyword_documentation(self, name):
        if name != '__intro__':
            doc = SeleniumLibrary.get_keyword_documentation(self, name)
            return doc.replace('SeleniumLibrary', 'Selenium2Library')
        intro = inspect.getdoc(SeleniumLibrary)
        intro = intro.replace('SeleniumLibrary', 'Selenium2Library')
        return """
---
*NOTE:* Selenium2Library has been renamed to SeleniumLibrary since version 3.0.
Nowadays Selenium2Library is just a thin wrapper to SeleniumLibrary that eases
with transitioning to the new project. See
[https://github.com/robotframework/SeleniumLibrary|SeleniumLibrary] and
[https://github.com/robotframework/Selenium2Library|Selenium2Library]
project pages for more information.
*注意:自从3版以来,Selenium2Library已经改名为SeleniumLibrary。
如今,Selenium2Library只是SeleniumLibrary的一个薄薄的包装物。
过渡到新项目。见
[https://github.com/robotframework/SeleniumLibrary|SeleniumLibrary] and
[https://github.com/robotframework/Selenium2Library|Selenium2Library]
项目页面获取更多信息。
---
""" + intro
 def test_parse_plugin_kw_doc(self):
     sl = SeleniumLibrary(
         plugins='{};arg1=Text1;arg2=Text2'.format(self.plugin_3))
     verify(sl.get_keyword_documentation('execute_javascript'),
            self.reporter)
 def test_parse_plugin_init_doc(self):
     sl = SeleniumLibrary(
         plugins='{};arg1=Text1;arg2=Text2'.format(self.plugin_3))
     verify(sl.get_keyword_documentation('__init__'), self.reporter)
 def test_create_toc(self):
     sl = SeleniumLibrary()
     verify(sl.get_keyword_documentation('__intro__'), self.reporter)
 def test_many_plugins(self):
     sl = SeleniumLibrary(plugins='%s, %s' % (self.plugin_1, self.plugin_2))
     verify(sl.get_keyword_documentation('__intro__'), self.reporter)
 def test_parse_plugin_kw_doc(self):
     sl = SeleniumLibrary(plugins=f"{self.plugin_3};arg1=Text1;arg2=Text2")
     verify(sl.get_keyword_documentation("execute_javascript"), self.reporter)
 def test_parse_plugin_init_doc(self):
     sl = SeleniumLibrary(plugins=f"{self.plugin_3};arg1=Text1;arg2=Text2")
     verify(sl.get_keyword_documentation("__init__"), self.reporter)
Пример #10
0
 def test_many_plugins(self):
     sl = SeleniumLibrary(
         plugins=f"{self.plugin_1}, {self.plugin_3};arg1=Text1;arg2=Text2"
     )
     verify(sl.get_keyword_documentation("__intro__"), self.reporter)