示例#1
0
 def mobile(context, name, value):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     assert str(
         el.get_attribute('value')
     ) == value, "Values do not match, expected %s but got %s" % (
         value, el.get_attribute('value'))
示例#2
0
 def mobile(context, name):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     el.clear()
示例#3
0
 def android(context, name, value):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     el.click()  # workaround for failing send_keys call
     el.send_keys(value)
示例#4
0
 def mobile(context, attr_name, name, value):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     assert str(el.get_attribute(attr_name)) == value, "Values do not match"
示例#5
0
 def mobile(context, name, value):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     assert str(el.get_attribute('value')) == value, "Values do not match, expected %s but got %s" % (value, el.get_attribute('value'))
示例#6
0
 def mobile(context, id, timeout):
     assert _retry(lambda: not find_device_element_by_name_or_id(context, id), timeout), u'Element was found'
示例#7
0
 def mobile(context, id):
     assert find_device_element_by_name_or_id(context, id) is None, u'Element was found'
示例#8
0
 def mobile(context, id):
     assert find_device_element_by_name_or_id(
         context, id) is None, u'Element was found'
示例#9
0
 def android(context, name):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     if el.get_attribute('checked') == u'true':
         el.click()
示例#10
0
 def ios(context, name):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     if el.get_attribute('value') == 1:
         el.click()
示例#11
0
 def mobile(context, name):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     el.clear()
示例#12
0
 def android(context, name, value):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     el.click()  # workaround for failing send_keys call
     el.send_keys(value)
示例#13
0
 def mobile(context, attr_name, name, value):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     assert str(el.get_attribute(attr_name)) == value, "Values do not match"
示例#14
0
 def mobile(context, id, timeout):
     assert _retry(
         lambda: not find_device_element_by_name_or_id(context, id),
         timeout), u'Element was found'
示例#15
0
 def android(context, name):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     if el.get_attribute('checked') == u'false':
         el.click()
示例#16
0
 def mobile(context, id):
     assert find_device_element_by_name_or_id(context, id), u'Element not found'
示例#17
0
 def ios(context, name):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     if el.get_attribute('value') == 1:
         el.click()
示例#18
0
 def mobile(context, id):
     assert find_device_element_by_name_or_id(context,
                                              id), u'Element not found'