Beispiel #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'))
Beispiel #2
0
 def mobile(context, name):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     el.clear()
Beispiel #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)
Beispiel #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"
Beispiel #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'))
Beispiel #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'
Beispiel #7
0
 def mobile(context, id):
     assert find_device_element_by_name_or_id(context, id) is None, u'Element was found'
Beispiel #8
0
 def mobile(context, id):
     assert find_device_element_by_name_or_id(
         context, id) is None, u'Element was found'
Beispiel #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()
Beispiel #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()
Beispiel #11
0
 def mobile(context, name):
     el = find_device_element_by_name_or_id(context, name)
     assert el, u'Element not found'
     el.clear()
Beispiel #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)
Beispiel #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"
Beispiel #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'
Beispiel #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()
Beispiel #16
0
 def mobile(context, id):
     assert find_device_element_by_name_or_id(context, id), u'Element not found'
Beispiel #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()
Beispiel #18
0
 def mobile(context, id):
     assert find_device_element_by_name_or_id(context,
                                              id), u'Element not found'