本文整理汇总了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