本文整理汇总了Python中salad.steps.browser.finders._get_element函数的典型用法代码示例。如果您正苦于以下问题:Python _get_element函数的具体用法?Python _get_element怎么用?Python _get_element使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_get_element函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _this_step
def _this_step(step, negate, first, last, find_pattern):
try:
_get_element(finder_function, first, last, find_pattern, expect_not_to_find=True)
except ElementDoesNotExist:
assert parsed_negator(negate)
else:
assert not parsed_negator(negate)
示例2: _this_step
def _this_step(step, file_name, first, last, find_pattern):
ele = _get_element(finder_function, first, last, find_pattern)
try:
ele.value = file_name
except Exception, e: # Zope
logger.exception(e)
ele._control.value = file_name
示例3: _this_step
def _this_step(step, first, last, find_pattern, text):
ele = _get_element(finder_function, first, last, find_pattern)
try:
ele.value = text
except:
try:
ele.type(text)
except:
ele._control.value = text
示例4: _this_step
def _this_step(step, first_hander, last_handler, drag_handler_pattern, first_target, last_target, drag_target_pattern):
handler = _get_element(finder_function, first_hander, last_handler, drag_handler_pattern)
target = _get_element(finder_function, first_target, last_target, drag_target_pattern)
handler.drag_and_drop(target)
示例5: get_element
def get_element(self):
element = _get_element(finder_function, None, pattern)
assert element is not None
return element
示例6: _this_step
def _this_step(step, negate, first, last, find_pattern, attr_name):
ele = _get_element(finder_function, first, last, find_pattern)
assert_with_negate(ele[attr_name] != None, negate)