本文整理汇总了Python中robot.api.logger.debug方法的典型用法代码示例。如果您正苦于以下问题:Python logger.debug方法的具体用法?Python logger.debug怎么用?Python logger.debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类robot.api.logger
的用法示例。
在下文中一共展示了logger.debug方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def __init__(self, *args):
self.builtin = BuiltIn()
logger.debug("initializing PageObjects...")
importer = robot.utils.Importer()
for file_path in args:
try:
importer.import_class_or_module_by_path(os.path.abspath(file_path))
logger.debug("imported page object {}".format(file_path))
except Exception as e:
logger.warn(str(e))
self.current_page_object = None
# Start with this library at the front of the library search order;
# that may change as page objects are loaded.
try:
self.builtin.set_library_search_order("PageObjects")
except RobotNotRunningError:
# this should only happen when trying to load this library
# via the robot_libdoc task, in which case we don't care
# whether this throws an error or not.
pass
示例2: write
# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def write(msg, level="INFO", html=False, attachment=None):
"""Writes the message to the log file using the given level.
Valid log levels are ``TRACE``, ``DEBUG``, ``INFO`` (default since RF
2.9.1), ``WARN``, and ``ERROR`` (new in RF 2.9). Additionally it is
possible to use ``HTML`` pseudo log level that logs the message as HTML
using the ``INFO`` level.
Attachment should contain a dict with "name", "data" and "mime" values
defined. See module example.
Instead of using this method, it is generally better to use the level
specific methods such as ``info`` and ``debug`` that have separate
``html`` argument to control the message format.
"""
log_message = LogMessage(msg)
log_message.level = level
log_message.attachment = attachment
logger.write(log_message, level, html)
示例3: wait_for_angular
# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def wait_for_angular(self, timeout=None, error=None):
"""
An explicit wait allowing Angular queue to empty.
With the implicit wait functionality it is expected that most of the
situations where waiting is needed will be handled "automatically" by
the "hidden" implicit wait. Thus it is expected that this keyword will
be rarely used.
"""
# Determine timeout and error
timeout = timeout or self._s2l.get_selenium_timeout()
timeout = timestr_to_secs(timeout)
error = error or ('Timed out waiting for AngularJSLibrary to synchronize with ' +
'the page after specified timeout.')
try:
WebDriverWait(self._sldriver, timeout, 0.2)\
.until_not(lambda x: self._sldriver.execute_script(js_wait_for_angular, self.root_selector))
except TimeoutException:
pass
#if self.trackOutstandingTimeouts:
# timeouts = self._exec_js('return window.NG_PENDING_TIMEOUTS')
# logger.debug(timeouts)
#pendingHttps = self._exec_js(js_get_pending_http_requests)
#logger.debug(pendingHttps)
#raise TimeoutException(error)
示例4: _run_on_failure
# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def _run_on_failure(self):
if not self.keyword_on_failure:
return
try:
BuiltIn().run_keyword(self.keyword_on_failure)
except Exception as e:
LOGGER.debug(e)
LOGGER.warn('Failed to take a screenshot. '
'Is Robot Framework running?')
示例5: _normalize_result
# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def _normalize_result(self, elements):
if not isinstance(elements, list):
logger.debug("WebDriver find returned %s" % elements)
return []
return elements
示例6: _debug
# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def _debug(self, message):
if self._log_level in self.LOG_LEVEL_DEBUG:
logger.debug(message)
示例7: debug
# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def debug(msg, html=False, attachment=None):
"""Writes the message to the log file using the ``DEBUG`` level."""
write(msg, "DEBUG", html, attachment)
示例8: _debug
# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def _debug(self, message):
logger.debug(message)