def create_or_replace_certificate(info): common.remove_all_elements('certificat', info['name']) common.open_url('certificat', 'add') input_name = world.browser.find_element_by_id('it-name') input_name.send_keys(info['name']) if 'autosigned' in info: checked = info['autosigned'] == "yes" Checkbox.from_id('it-autosigned').set_checked(checked) if 'certificate authority' in info: checked = info['certificate authority'] == "yes" Checkbox.from_id('it-is_ca').set_checked(checked) input_date = world.browser.find_element_by_id('it-validity-end') input_date.clear() date = datetime.datetime.now() if info['valid date in the future'] == "yes": date += datetime.timedelta(days=31) else: date -= datetime.timedelta(days=1) input_date.send_keys(date.strftime("%m/%d/%Y")) input_email = world.browser.find_element_by_id('it-subject-emailAddress') input_email.clear() input_email.send_keys(info['email'])
def when_i_desactivate_dhcpd_server(step): common.open_url('dhcp') Checkbox.from_id('it-active').uncheck() form.submit.submit_form() commonconf_action_webi.webi_exec_commonconf()
def when_i_activate_dhcpd_server(step): common.open_url('dhcp') Checkbox.from_id('it-active').check() dhcpd_action_webi.type_pool_start_end('192.168.32.20', '192.168.32.21') form.submit.submit_form() commonconf_action_webi.webi_exec_commonconf()
def when_i_disable_the_sccp_directmedia(step): common.open_url('sccpgeneralsettings') directmedia_checkbox = Checkbox.from_id( "it-sccpgeneralsettings-directmedia") directmedia_checkbox.uncheck() submit.submit_form()
def when_i_disable_the_sccp_directmedia(step): common.open_url('sccpgeneralsettings') directmedia_checkbox = Checkbox.from_id("it-sccpgeneralsettings-directmedia") directmedia_checkbox.uncheck() submit.submit_form()