Ejemplo n.º 1
0
def verify_text_in_element(text, element):
    driver = core.getOrCreateWebdriver()
    test_object = get_selenium_object(element, driver)
    logger.steps.append('Verify element \'{0}\' contains text \'{1}\''
                        .format(element[2], text))
    if text not in test_object.text:
        raise TextNotPresent("Text \'{0}\' was not found in element {1}"
                             .format(text, element[2]))
Ejemplo n.º 2
0
def send_keys(obj, text):
    driver = core.getOrCreateWebdriver()
    test_object = get_selenium_object(obj, driver)
    test_object.send_keys(text)
    logger.steps.append('Write \'{0}\' in element {1}'.format(text, obj[2]))
Ejemplo n.º 3
0
def click(obj):
    driver = core.getOrCreateWebdriver()
    test_object = get_selenium_object(obj, driver)
    test_object.click()
    logger.steps.append('Click {0}'.format(obj[2]))