本文整理匯總了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)