当前位置: 首页>>代码示例>>Python>>正文


Python BuiltIn.print_to_console_log方法代码示例

本文整理汇总了Python中robot.libraries.BuiltIn.BuiltIn.print_to_console_log方法的典型用法代码示例。如果您正苦于以下问题:Python BuiltIn.print_to_console_log方法的具体用法?Python BuiltIn.print_to_console_log怎么用?Python BuiltIn.print_to_console_log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在robot.libraries.BuiltIn.BuiltIn的用法示例。


在下文中一共展示了BuiltIn.print_to_console_log方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: comment

# 需要导入模块: from robot.libraries.BuiltIn import BuiltIn [as 别名]
# 或者: from robot.libraries.BuiltIn.BuiltIn import print_to_console_log [as 别名]
    def comment(self,*msg):
        '''
        this keyword displays the given messages in the log file as keyword arguments, look for telnet instance to invoke print_to_console_log, and print the comment messages to log

        Note:
        - Given arguments are resolved so thoroughly that they can not contain non-existing variables
        - Given arguments must be string or other type that has len or str/repr method,If you are interested about variable values of other types, you can use the `Log` or `Log Many` keywords
        - these messages will not send to console,so you can only find these messages in the keyword Close Console
        - when import Library MyTelnet,please rename it Telnet,for example: Library ../lib/MyTelnet.py  WITH NAME  Telnet

        This keyword does nothing with the arguments it receives, but as they
        are visible in the log, this keyword can be used to display simple
        messages.
        '''
        try:
            my_telnet = BuiltIn().get_library_instance('Telnet')
            my_telnet.print_to_console_log(*msg)
        except Exception,ex:
            #raise RuntimeError(unicode(ex))
            pass
开发者ID:liuleic,项目名称:DCNRobot,代码行数:22,代码来源:Tools.py


注:本文中的robot.libraries.BuiltIn.BuiltIn.print_to_console_log方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。