Exemplo n.º 1
0
def goto_list():
    bt.click_element(bt.find_by_id("return-to-top"))
    time.sleep(1)
    bt.click_element(bt.find_by_xpath('//*[@id="result-tabs"]/li[1]/a'))

    pantalla_carga()
    bt.wait_invisible(bt.find_by_class('loading-animation'))
Exemplo n.º 2
0
def agregar_sala(sala):
    btnAgregar = bt.find_by_class('add-to-cart', sala)
    bt.click_element(btnAgregar)
    bt.click_element(bt.find_by_xpath('//*[@id="setup--add-modal-save"]'))
    #bt.wait_element_id("toaster")
    esperar_agregada('selected-rooms-container', 'div')
    time.sleep(1)
Exemplo n.º 3
0
def book_now():
    bt.load_site(config.urls['reservations'])
    #bt.wait_element_id("sidebar-wrapper")
    bt.wait_element_clickable(
        '//*[@id="templates-grid"]/div/div[1]/div[2]/button[1]')
    bt.click_element(
        bt.find_by_xpath(
            '//*[@id="templates-grid"]/div/div[1]/div[2]/button[1]'))
Exemplo n.º 4
0
def completar_capacidad(datos):
    #loading_img = bt.find_by_id('page-loading-overlay')
    element = bt.wait_element_xpath(
        '//*[@id="filter-container"]/div[1]/div[3]/div[2]/input')
    bt.write_into(element, datos['People'])
    pantalla_carga()
    bt.click_element(
        bt.find_by_xpath('//*[@id="filter-container"]/div[2]/button'))
    pantalla_carga()
Exemplo n.º 5
0
def completar_confirmacion(datos):
    bt.click_element(bt.find_by_xpath('//*[@id="main-tabs"]/li[3]/a'))
    bt.write_into(bt.find_by_id("event-name"), datos['EID'])
    bt.select_in(bt.find_by_id("event-type"), "Workspace")
    bt.write_into(
        bt.find_by_xpath(
            '//*[@id="reservation-details-billing"]/div/div[2]/div/div[1]/div/div/input'
        ), "DS79400D")  #"DS79400D")
    bt.click_element(
        bt.find_by_xpath('//*[@id="details"]/div[3]/div/span[2]/button'))
    #time.sleep(2)
    pantalla_carga()
Exemplo n.º 6
0
def resultado_reserva():
    element = bt.wait_element_xpath('//*[@id="toaster"]/div/span[2]')
    #pantalla_carga()
    if element != None:
        resultado = element.text
    else:
        element = bt.wait_element_class('MsoNormal')
        if element != None and element.is_displayed():
            resultado = "OK"  #element.text
            bt.click_element(bt.wait_element_id('help-text-close-btn'))
        else:
            resultado = "Ups! There was an error completing the reservation."

    return resultado
Exemplo n.º 7
0
def completar_location(datos):
    bt.click_element(
        bt.find_by_xpath('//*[@id="location-filter-container"]/div[1]/div/a'))
    element = bt.wait_element_xpath(
        '//div[starts-with(@id, "filter-main")]/div[1]/div[2]/div/input')
    time.sleep(3)
    bt.write_into(element, datos['Location'])
    time.sleep(1)
    bt.click_element(
        bt.find_by_xpath(
            '//div[starts-with(@id, "filter-main")]/div[2]/div[1]/div/label/input'
        ))
    bt.click_element(
        bt.find_by_xpath('//*[@id="filterModal"]/div/div/div[3]/button[1]'))
    pantalla_carga()