• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python common.open_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中xivo_lettuce.common.open_url函数的典型用法代码示例。如果您正苦于以下问题:Python open_url函数的具体用法?Python open_url怎么用?Python open_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了open_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:7,代码来源:phonebook.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:7,代码来源:trunk_custom_steps.py


示例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'])
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:30,代码来源:certificate_steps.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:7,代码来源:line.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:27,代码来源:ldap.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:8,代码来源:general_settings_xivo.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:8,代码来源:cti_helper.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:8,代码来源:line.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:8,代码来源:skillrules_steps.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:8,代码来源:callfilter.py


示例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())
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:outcall_steps.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:directory.py


示例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)
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:directory.py


示例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)
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:profile_steps.py


示例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()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:configfiles_steps.py


示例16: then_i_see_user_with_username_group1_group2_has_a_function_key

def then_i_see_user_with_username_group1_group2_has_a_function_key(step, firstname, lastname, extension):
    common.open_url('user', 'search', {'search': '%s %s' % (firstname, lastname)})
    common.edit_line("%s %s" % (firstname, lastname))
    common.go_to_tab('Func Keys')
    destination_field = world.browser.find_element_by_id('it-phonefunckey-custom-typeval-0')
    assert destination_field.get_attribute('value') == extension
    type_field = Select(world.browser.find_element_by_id('it-phonefunckey-type-0'))
    assert type_field.first_selected_option.text == "Customized"
    common.open_url('user', 'search', {'search': ''})
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:user_steps.py


示例17: uninstall_plugins

def uninstall_plugins(plugin_name):
    common.open_url('provd_plugin')
    # uninstalling more than 1 plugins can't done in one step or selenium will raise a StaleElementReferenceException
    plugin_names = []
    for plugin_line in common.find_lines(plugin_name):
        plugin_names.append(plugin_line.find_element_by_xpath('.//td[2]').text)
    for plugin_name in plugin_names:
        plugin_line = common.get_line(plugin_name)
        _uninstall_plugin(plugin_line)
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:provd_plugins.py


示例18: then_i_see_a_user_with_infos

def then_i_see_a_user_with_infos(step):
    user_expected_properties = step.hashes[0]
    fullname = user_expected_properties['fullname']
    common.open_url('user', 'search', {'search': '%s' % fullname})
    user_actual_properties = user_action_webi.get_user_list_entry(fullname)
    assert_that(fullname, equal_to(user_expected_properties['fullname']))
    for user_field, user_value in user_expected_properties.iteritems():
        assert_that(user_actual_properties[user_field], equal_to(user_value))
    common.open_url('user', 'search', {'search': ''})
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:user_steps.py


示例19: update_plugin_list

def update_plugin_list(url, check_confirmation=True):
    provd_general_action_webi.update_plugin_server_url(url)
    common.open_url('provd_plugin')
    world.browser.find_element_by_id('toolbar-bt-update').click()
    wait_time = 7
    if check_confirmation:
        _check_for_confirmation_message(wait_time)
    else:
        time.sleep(wait_time)
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:provd_plugins.py


示例20: remove_call_limits

def remove_call_limits(call_limits):
    common.open_url('general_iax')
    common.go_to_tab('Call limits')
    for call_limit in call_limits:
        lines = find_call_limit_lines(call_limit['address'], call_limit['netmask'])
        for line in lines:
            delete_button = line.find_element_by_xpath(".//a[@title='Delete this limit']")
            delete_button.click()
        form.submit.submit_form()
开发者ID:jaunis,项目名称:xivo-acceptance,代码行数:9,代码来源:general_settings_iax.py



注:本文中的xivo_lettuce.common.open_url函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python event.add_callback函数代码示例发布时间:2022-05-26
下一篇:
Python agid.register函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap