本文整理汇总了Python中xivo_lettuce.common.open_url函数的典型用法代码示例。如果您正苦于以下问题:Python open_url函数的具体用法?Python open_url怎么用?Python open_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了open_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_accessibility_to_any_host
def set_accessibility_to_any_host():
common.open_url('phonebook_settings')
multilist = form.PhonebookSettingsMultilist.from_id('accesslist')
multilist.remove_all()
multilist.add('0.0.0.0/1')
multilist.add('128.0.0.0/1')
form.submit.submit_form()
示例2: when_i_create_a_trunkcustom_with_name_and_trunk
def when_i_create_a_trunkcustom_with_name_and_trunk(step, name):
common.open_url('trunkcustom', 'add')
input_name = world.browser.find_element_by_id('it-protocol-name', 'trunkcustom form not loaded')
input_name.send_keys(name)
input_interface = world.browser.find_element_by_id('it-protocol-interface', 'trunkcustom form not loaded')
input_interface.send_keys('misdn//xivo')
form.submit.submit_form()
示例3: create_or_replace_certificate
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'])
示例4: unsearch_line
def unsearch_line():
common.open_url("line")
searchbox_id = "it-toolbar-search"
text_input = world.browser.find_element_by_id(searchbox_id)
text_input.clear()
submit_button = world.browser.find_element_by_id("it-toolbar-subsearch")
submit_button.click()
示例5: _add_ldap_filter
def _add_ldap_filter(**args):
common.open_url('ldapfilter', 'add')
_type_ldap_filter_name(args['name'])
_choose_ldap_server(args['server'])
if 'username' in args and 'password' in args:
_type_username_and_password(args['username'], args['password'])
_type_ldap_filter_base_dn(args['base_dn'])
if 'custom_filter' in args:
_type_ldap_custom_filter(args['custom_filter'])
if 'number_type' in args:
_select_phone_number_type(args['number_type'])
common.go_to_tab("Attributes")
for field in args.get('display_name', []):
_add_filter_display_name_field(field)
for field in args.get('phone_number', []):
_add_filter_phone_number_field(field)
form.submit.submit_form()
示例6: _toggle_live_reload
def _toggle_live_reload(state):
common.open_url("general_settings")
option = Checkbox.from_label("Live reload configuration")
if state == "enable":
option.check()
else:
option.uncheck()
form.submit.submit_form()
示例7: add_call_form_model
def add_call_form_model(call_form_name, variables):
common.remove_element_if_exist('sheet', call_form_name, column='Model')
common.open_url('sheet', 'add')
form.input.set_text_field_with_label('Name :', call_form_name)
common.go_to_tab('Sheet')
for variable in variables:
_add_sheet_variable(variable)
form.submit.submit_form()
示例8: search_line_number
def search_line_number(line_number):
common.open_url("line")
searchbox_id = "it-toolbar-search"
text_input = world.browser.find_element_by_id(searchbox_id)
text_input.clear()
text_input.send_keys(line_number)
submit_button = world.browser.find_element_by_id("it-toolbar-subsearch")
submit_button.click()
示例9: when_i_create_a_skill_rule
def when_i_create_a_skill_rule(step, skill_rule_name):
common.open_url('skill_rule', 'add')
skill_rule_action_webi.type_skill_rule_name(skill_rule_name)
skill_rule_config = step.hashes
for skill_rule_element in skill_rule_config:
rule = skill_rule_element['rule']
skill_rule_action_webi.add_rule(rule)
form.submit.submit_form()
示例10: add_boss_secretary_filter
def add_boss_secretary_filter(**data):
common.open_url('callfilter', 'add')
if 'entity' in data and data['entity']:
type_callfilter_entity(data['entity'])
type_callfilter_name(data['name'])
type_callfilter_boss(data['boss'])
add_secretary(data['secretary'])
submit.submit_form()
示例11: then_the_outcall_1_has_the_extension_patterns
def then_the_outcall_1_has_the_extension_patterns(step, outcall_name):
common.open_url('outcall', 'list')
common.edit_line(outcall_name)
common.go_to_tab('Exten')
for outcall_extension in step.hashes:
extension_pattern = outcall_extension['extension_pattern']
extension_pattern_input = outcall_action_webi.exten_line(extension_pattern).find_element_by_xpath(".//input[@name='dialpattern[exten][]']")
assert_that(extension_pattern_input, not_none())
示例12: add_or_replace_display
def add_or_replace_display(name, fields):
if common.element_is_in_list('cti_display_filter', name):
common.remove_line(name)
common.open_url('cti_display_filter', 'add')
_type_display_name(name)
for title, field_type, display in fields:
_add_display_field(title, field_type, display)
submit.submit_form()
示例13: _add_directory
def _add_directory(name, uri, direct_match, delimiter=None, reverse_match=None):
common.open_url('cti_directory', 'add')
input.set_text_field_with_label("Name", name)
if delimiter:
input.set_text_field_with_label("Delimiter", delimiter)
input.set_text_field_with_label("Direct match", direct_match)
if reverse_match:
input.set_text_field_with_label("Match reverse directories", reverse_match)
select.set_select_field_with_label("URI", uri)
示例14: then_i_see_errors
def then_i_see_errors(step, profile_label):
common.open_url('profile', 'list')
table_line = common.get_line(profile_label)
try:
table_line.find_element_by_xpath(".//a[@title='Delete']")
except NoSuchElementException:
pass
else:
raise Exception('CTI profile %s should not be removable' % profile_label)
示例15: when_i_create_configfiles_with_content
def when_i_create_configfiles_with_content(step, filename, content):
common.open_url('configfiles', 'add')
input_filename = world.browser.find_element_by_id('it-configfile-filename')
input_filename.clear()
input_filename.send_keys(filename)
input_description = world.browser.find_element_by_id('it-configfile-description')
input_description.clear()
input_description.send_keys(content)
form.submit.submit_form()