当前位置: 首页>>代码示例>>Python>>正文


Python WebUI.input方法代码示例

本文整理汇总了Python中webui.WebUI.input方法的典型用法代码示例。如果您正苦于以下问题:Python WebUI.input方法的具体用法?Python WebUI.input怎么用?Python WebUI.input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在webui.WebUI的用法示例。


在下文中一共展示了WebUI.input方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: device_onboarding_not_deploy_policy

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def device_onboarding_not_deploy_policy():
    wui = WebUI()
    device = Devices(wui.d("visit.url"), wui.d("visit.title"))
    if wui.session_id:
        #---------------------------------device on boarding ------------------------------------
        wui.click(myHome.get('Devices_button'))
        wui.info('go to add device page', True)           
        
        wui.click(DeviceOnboarding.get('Add_device_button'))
        wui.info('go to add device page', True)
        
        wui.click(DeviceOnboarding.get('Add_real_device_button'))
        wui.info('go to enter SN page', True)
        
        wui.input(DeviceOnboarding.get('Input_SN_Textarea'), wui.d("device.ap_SN"))
        wui.info('enter SN', True)
        
        wui.click(DeviceOnboarding.get('Next_button_add_SN_page'))
        wui.info('click of add sn page', True)
        
        wui.click(DeviceOnboarding.get('Next_button_added_device_page'))
        wui.info('click of added device list page', True)
        
        wui.check(DeviceOnboarding.get('Do_not_deploy_policy'))
        wui.info('click do not deploy policy', True)
        
        wui.click(DeviceOnboarding.get('Next_button_build_policy_page'))
        wui.info('click next of build policy', True)
        
        wui.click(DeviceOnboarding.get('Finish_button_device_onboarding'))
        wui.info('click finish button of device onboarding', True)        
        
        ap_SN = wui.d("device.ap_SN")
        check_device_devicepage(wui, ap_SN)
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:36,代码来源:device_onboarding_not_deploy_policy.py

示例2: hshao_login

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def hshao_login():
    wui = WebUI()
    cloud = CLOUD(wui.d("visit.url"), wui.d("visit.title"), wui.d("visit.pre_url"))
    if wui.session_id:
        wui.click(myHome.get('Add_device_button'))
        wui.info('go to add device page', True)
        
        wui.input(myHome.get('Add_networkPolicy'), wui.d("visit.network_policy_name"))
        wui.info('go to add network policy page', True)
        
        wui.click(myHome.get('Next_button_networkPolicy'))
        wui.info('save network policy', True)
        
        wui.click(PolicyPage.get('Deploy_button'))
        wui.info('to device page', True)

        mac_element = DeployPolicyPage.get('Device_mac_xpath')
        checkbox_element = DeployPolicyPage.get('Device_checkbox_xpath')
        stat_element =  DeployPolicyPage.get('Device_stat_xpath')
        
        device_mac = wui.d("device.ap_mac")    
        i=1
        while 1:
            new_mac_element = (mac_element[0], mac_element[1] % i)
            new_checkbox_element = (checkbox_element[0], checkbox_element[1] % i)
            new_stat_element = (stat_element[0], stat_element[1] % i)
            try:
                wui.wait_until_element_displayed(new_mac_element)
                print new_mac_element
                if device_mac == wui.find_element(new_mac_element).text:
                    print wui.find_element(new_mac_element).text
                    try:
                        wui.wait_until_element_displayed(new_stat_element)
                    except Exception, e:
                        wui.error('this device status is false disconnect', True)
                        break
                    wui.click(new_checkbox_element)
                    wui.info('selected the checkbox success', True)
                    break
            except Exception, e:
                wui.error('device is not found in device list ', True)
                break
            i+=1        
        
        wui.click(monitor_cfg.Config_upload_button)
        wui.info('click upload to push complete config', True)
        
        wui.click(myHome.get('Devices_button'))
        wui.info('go to add device page', True)
        
        click_netpolicy_devicepage_filters(wui,wui.d("visit.network_policy_name"))
        wui.click(FiltersDevicepage.get('check_box_realdevice'))
        
        ap_mac = wui.d("device.ap_mac")
        print "the ap mac is :"
        print ap_mac
        check_device_devicepage(wui, ap_mac)
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:59,代码来源:global_filters_createfilter.py

示例3: hshao_login

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def hshao_login():
    wui = WebUI()
    cloud = CLOUD(wui.d("visit.url"), wui.d("visit.title"), wui.d("visit.pre_url"))
    if wui.session_id is None:
        wui.info('trying to access %s before login' % wui.d("visit.url"))
        cloud.try_again_get(wui.d("visit.url"), LoginPage.get('login_page_title'))


        wui.wait_until_element_displayed(LoginPage.get('login_btn'))
        wui.input(LoginPage.get('username_txt'), wui.d("login.username"))
        wui.input(LoginPage.get('password_txt'), wui.d("login.password"))
        wui.info('handle login form', True)
        wui.click(LoginPage.get('login_btn'))

        try:
            wui.wait_until_title_present(LoginSuccessfulPage.get('login_successful_page_title'), info=True)
            wui.info('login success', True)
        except Exception, e:
            wui.s.execute_script('return window.onbeforeunload=null')
            wui.warn('Fail to get login_successful_page after login, will try again', True)
            wui.s.refresh()
            wui.wait_until_title_present(LoginSuccessfulPopupPage.get('login_successful_popup_page_title'), info=True)
            
        #---------------------------------is device connected ------------------------------------
        wui.click(myHome.get('Devices_button'))
        wui.info('go to add device page', True)
        

        #ckeck if the device is connected and 
        ap_sn = wui.d("device.ap_SN")
        click_hostname_devicepage(wui, ap_sn)
         
        connection_status_element = myHome.get('Device_connect_status')
        new_connection_status_element = wui.find_element(connection_status_element).text
        device_connection_status_str = "Connected"
        if device_connection_status_str == new_connection_status_element:
            wui.info('The device status on is Connected', True)
        else:
            wui.error('The device status is not Connected', True)
             
        wui.click(myHome.get('Devices_button'))
        wui.info('go to add device page', True)
        
        remove_device_devicepage(wui, ap_sn)
        
        wui.click(myHome.get('Conform_to_remove_device_button'))
        wui.info('confirm to remove device', True)
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:49,代码来源:device_onboarding_is_device_connected.py

示例4: sw_monitor_config_push

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def sw_monitor_config_push():
    wui = WebUI()
    config = Configuration(wui.d("visit.url"), wui.d("visit.title"), wui.d("visit.pre_url"))
    if wui.session_id:
        config.to_url_home()
        config.to_menu(wui.d("policy.menu_name"))
        config.wait_until_to_menu_success(wui.d("policy.menu_name"))
        #go to configuration page to config network policy     
        wui.info('try to new a network policy....', True)
        wui.click(monitor_cfg.get('add_button'))
        wui.info('create new network policy....', True)
        policy_name = wui.d("sw_policy_name")
        wui.input(monitor_cfg.get('PolicyName_txt'), policy_name)
        wui.input(monitor_cfg.get('PolicyDesc_txt'), wui.d("NetworkPolicy.PolicyDesc"))
        wui.info('input policy name and description success', True)
        
        wui.click(monitor_cfg.Next_button)
        wui.info('create network policy success', True)
        
        wui.click(monitor_cfg.DeviceTemp_button)
        wui.info('go to device template creation page', True)
        
        wui.click(monitor_cfg.NewDevice_button)
        wui.click(monitor_cfg.NewDevice_sw_button)
        wui.click(monitor_cfg.NewDevice_sw_type_button)
        
#        switch_template_name = wui.d("TemplateName.switch_tmp_name") + str(random.randrange(1000))
        switch_template_name = wui.d("sw_template_name")
        wui.input(monitor_cfg.get('Device_template_name_txt'), switch_template_name)
        wui.info('input switch device template name success', True)
        
        wui.click(monitor_cfg.Device_template_save_button)
        wui.info('create device template success', True)
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:35,代码来源:sw_monitor_policy_push.py

示例5: hive_profile_create

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def hive_profile_create():
    wui = WebUI()
    config = Configuration(wui.d("visit.url"), wui.d("visit.title"))
    if wui.session_id:
        config.to_url_home()
        config.to_menu(wui.d("policy.menu_name"))
        config.wait_until_to_menu_success(wui.d("policy.menu_name"))
        config.to_page_before_policy()
        config.create_network_policy(wui.d("policy.name"), wui.d("policy.Description"))
       
        # go to addtional setting to check kddr default status of the created network policy
        wui.click(DeviceDataCollection.additional_setting_button)
        try:
            wui.wait_until_element_displayed(DeviceDataCollection.ntp_elements)
            wui.info( 'go to additional settings page success' , True ) 
        except Exception, e:
            wui.error( 'go to additional settings page failed' , True )
       
        #check hive profile section
        wui.info('try to click the Hive button to go to hive profile config page...', True)
        wui.click(HiveConfig.get('hive_tab'))
        time.sleep(5)
        wui.wait_until_element_displayed(HiveConfig.get('hive_profile_title'))
        wui.info( 'success to go to hive profile page...' , True )
        #input hive name
        hive_name = wui.d( "hive.name") 
        wui.input(HiveConfig.get('new_hive_name'), hive_name)
        wui.info( 'input hive name successfully...' , True )
        #input encryption password
        wui.info('go to security section and turn on the switch for encryption password...', True)
        config.check_cloud_on(HiveConfig.get('encryption_switch_input'),HiveConfig.get('encryption_switch_div'))
        time.sleep(1)
        wui.info("turn on the switch successfully...", True)
        wui.info("try to click the button manual and input password...", True)
        config.click_cloud(HiveConfig.get('manual_pwd_btn_input'),HiveConfig.get('manual_pwd_btn_div'))
        time.sleep(1)
        wui.info('success to select the encryption type as manual...', True)
        wui.input(HiveConfig.get('manual_share_pwd'),wui.d("hive.key"))
        time.sleep(1)
        wui.info('input share password successfully', True)
        wui.input(HiveConfig.get('manual_cfm_pwd'),wui.d("hive.key"))
        time.sleep(1)
        wui.info('input confirm password successfully', True)
        
        wui.info('click save button to save the hive profile setting...', True)
        wui.click(HiveConfig.get('hive_profile_save_btn'))
        wui.wait_until_element_displayed(HiveConfig.get('hive_profile_success'))
        time.sleep(1)
        wui.info( 'save the hive profile setting successfully', True)
        
        wui.info('click next buttong to go to deploy config to device page....', True)
        wui.click(HiveConfig.get('hive_profile_next_btn'))
        time.sleep(1)
        wui.info('go to config deploy page success....', True)
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:56,代码来源:hive_config.py

示例6: mac_filter_configuration

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def mac_filter_configuration():
    wui = WebUI()
    config = Configuration(wui.d("visit.url"), wui.d("visit.title"))
    if wui.session_id:
        config.to_page_before_deployed_ssid()
        ssidname=wui.d("ssid.name")
        config.input_ssid_name(ssidname, ssidname)
        config.ssid_usage_settings('CUSTOM')

        #select to security method as wpa psk  
        psk_key="aerohive"      
        wui.info('will move scroll to access security...', True)
        wui.move_scroll_to_element(DeployedSSID.get('access_div'))
        wui.wait_until_element_displayed(DeployedSSID.get('psk_access_label'))
        wui.click(DeployedSSID.get('psk_access_span'))
        wui.wait_until_element_displayed(DeployedSSID.get('psk_key_value'))
        wui.input(DeployedSSID.get('psk_key_value'), psk_key)
        wui.wait_until_element_displayed(DeployedSSID.get('psk_confirm_value'))
        wui.input(DeployedSSID.get('psk_confirm_value'), psk_key)
        
        #select cwp tab to config cwp
        cwp_name = wui.d("ssid.cwp_name")
        wui.info('try to click captive web portal tab to enable cwp', True)
        wui.move_scroll_to_element_use_px(CWPConfig.get('ssid_tab'))
        wui.click(CWPConfig.get('cwp_tab'))
        wui.wait_until_element_displayed(CWPConfig.get('cwp_enable_switch'))
        wui.info('go to  cwp configuration section successfully...', True)
        #enable cwp switch
        wui.check(CWPConfig.get('cwp_enable_switch'))
        wui.info('enable cwp successfull....', True)
        
        #config cwp web directory name
        wui.info('try to move element to cwp name input line....', True)
        wui.move_scroll_to_element(CWPConfig.get('cwp_name_input_element'))
        wui.input(CWPConfig.get('cwp_to_use_input'),cwp_name)
        time.sleep(1)
        wui.info('input cwp name successfully', True)
        
        wui.info('try to click the save button to save the cwp object', True)
        wui.click(CWPConfig.get('cwp_to_use_save'))
        wui.wait_until_element_displayed(CWPConfig.get('new_cwp_title'))
        time.sleep(1)
        wui.info('go to new cwp page success...', True)
        
        wui.wait_until_element_displayed(CWPConfig.get('cwp_name'))
        wui.click(CWPConfig.get('new_cwp_save'))
        time.sleep(2)
        wui.info('try to move scroll to cwp section', True)
        wui.move_scroll_to_element(CWPConfig.get('cwp_name_input_element'))
        wui.info('create cwp successfully', True)
        
        # save the ssid level configuration
        wui.click(CWPConfig.get('new_ssid_save'))
        wui.wait_until_element_displayed(CWPConfig.get('new_ssid_success'))
        time.sleep(1)
        wui.info('Save ssid successfully', True)
        
        #go to deploy page, and push config
        wui.click(monitor_cfg.Deploy_policy_button)
        time.sleep(2)
        wui.info( 'go to deploy policy page success' , True )
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:63,代码来源:cwp_config.py

示例7: mac_filter_configuration

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def mac_filter_configuration():
    wui = WebUI()
    config = Configuration(wui.d("visit.url"), wui.d("visit.title"))
    if wui.session_id:
        config.to_url_home()
        config.to_menu(wui.d("policy.menu_name"))
        config.wait_until_to_menu_success(wui.d("policy.menu_name"))
        config.to_page_before_policy()
        config.create_network_policy(wui.d("policy.name"), wui.d("policy.Description"))
        wui.wait_until_element_displayed(SelectSSIDPage.get('new_btn'))
        wui.info('Get to SSID select page', True)
        wui.click(SelectSSIDPage.get('new_btn'))  
        #input ssid name
        ssidname=wui.d("ssid.name")
        wui.wait_until_element_displayed(ConfigSSIDPage.get('ssidname_input'))
        wui.info('Get to SSID configure page', True)
        wui.input(ConfigSSIDPage.get('ssidname_input'), ssidname)
        wui.clear(ConfigSSIDPage.get('ssidbroadname_input'))
        wui.input(ConfigSSIDPage.get('ssidbroadname_input'), ssidname)
        wui.info('Input SSID name successfully', True)
                
        #select customer checkbox
        wui.wait_until_element_displayed(DeployedSSID.get('custom_display'))
        wui.click(DeployedSSID.get('custom_span'))
        time.sleep(1)
        wui.info('Select custom option successfully', True)
        
        #select open auth checkbox
        wui.info("Enter to Open mode")
        wui.info('will move scroll to next access security section', True)
        wui.move_scroll_to_element(DeployedSSID.get('access_div'))
        wui.wait_until_element_displayed(DeployedSSID.get('open_access_label'))
        wui.click(DeployedSSID.get('open_access_span'))
        wui.info('Config open successfully', True)
        
        #check optional setting section for mac filter is displayed
        wui.info('will move scroll to bottom page', True)
        wui.move_scroll_bottom()
        wui.wait_until_element_displayed(MacFilter.get('optional_setting_desc_xpath'))
        
        #optional setting page title diplay
        wui.info('Try to click customize button to go to config page', True)
        wui.click(MacFilter.get('opt_customize_btn'))
        wui.info('go to optional setting config page successfully', True)
        
        #go to mac filter config sections
        #enable mac-filter function
        wui.click(MacFilter.get('mac_filter_checkbox'))
        wui.info('mac filter is enabled!', True)
        
        #check the default action is Permit
        global_default_action = "Permit"
        new_global_default_action = wui.find_element(MacFilter.get('mac_filter_default_action')).text
        if global_default_action == new_global_default_action:
            wui.info('the global default action is Permit, it is correct for default setting', True)
        else:
            wui.error('The default action is incorrect!', True)
            
        #click new to add an mac filter entry, for exmaple for apples devices
        wui.info('Try to move to add new mac filter entry section', True)
        wui.move_scroll_to_element_use_px(MacFilter.get('mac_filter_section'))
        wui.info('move to mac filter config section success', True)
        wui.click(MacFilter.get('mac_filter_entry_new_btn'))
        wui.wait_until_element_displayed(MacFilter.get('mac_filter_newentry_input_mac'))
        wui.info('the new mac filter section display success!', True)
        #select apple devices oui
        wui.click(MacFilter.get('mac_filter_newentry_select_mac_btn'))
        wui.wait_until_element_displayed(MacFilter.get('mac_entry_oui_apple'))
        wui.info('can show the mac list success!', True)
        wui.click(MacFilter.get('mac_entry_oui_apple'))
        wui.info('select the apple devices oui success!', True)
        #select the mac entry action as deny
        wui.click(MacFilter.get('mac_entry_action_btn'))
        wui.info('click the dropdown box success!', True)
        tmp_mac_entry_action=wui.find_element(MacFilter.get('mac_entry_action_deny')).text
        selected_mac_entry_action = tmp_mac_entry_action.upper()
        wui.click(MacFilter.get('mac_entry_action_deny'))
        wui.info('select the deny action success!', True)
        #add the mac entry
        wui.click(MacFilter.get('mac_entry_add_btn'))
        wui.info('add the mac entry success!', True)
        
        # click save button to save the config about optional settings
        
        new_mac_entry_oui = wui.find_element(MacFilter.get('added_mac_entry_oui_name')).text
        new_mac_entry_action = wui.find_element(MacFilter.get('added_mac_entry_action')).text


        if (new_mac_entry_oui == "Apple-iPhone") and (new_mac_entry_action == selected_mac_entry_action):
            wui.info('mac filter object is correct....', True)
        else:
            wui.error('mac-filter object is incorrect....', True)
            
        wui.click(MacFilter.get('optional_setting_save_btn'))
        
        # save the ssid level configuration
        wui.click(MacFilter.get('ssid_saved_btn'))
        wui.wait_until_element_displayed(MacFilter.get('ssid_saved_success'))
        wui.info('Save ssid successfully', True)
        
#.........这里部分代码省略.........
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:103,代码来源:mac_filter_config.py

示例8: data_collect_default_config_push

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def data_collect_default_config_push():
    wui = WebUI()
    config = Configuration(wui.d("visit.url"), wui.d("visit.title"), wui.d("visit.pre_url"))
    if wui.session_id:
        config.to_url_home()
        config.to_menu(wui.d("policy.menu_name"))
        config.wait_until_to_menu_success(wui.d("policy.menu_name"))
           
        wui.click(monitor_cfg.Configuration_button)
        wui.info( 'go to configuration page success' , True )
       
        wui.click(monitor_cfg.add_button)
        wui.info( 'go to add network policy page success' , True )
       
        policyname = wui.d( "sw_policy_name")
        #policyname = "wwwu-2257"
        wui.input(monitor_cfg.get( 'PolicyName_txt'), policyname)
        wui.input(monitor_cfg.get( 'PolicyDesc_txt'), wui.d("NetworkPolicy.PolicyDesc" ))
        wui.info( 'input policy name and description success' , True )
       
        wui.click(monitor_cfg.Next_button)
        wui.info( 'create network policy success', True )
       
        # go to addtional setting to check kddr default status of the created network policy
        wui.click(DeviceDataCollection.additional_setting_button)
        try:
            wui.wait_until_element_displayed(DeviceDataCollection.ntp_elements)
            wui.info( 'go to additional settings page success' , True ) 
        except Exception, e:
            wui.error( 'go to additional settings page failed' , True )
       
        #check the sections of data collection displayed
        wui.click(DeviceDataCollection.data_collection_btn)
        #wui.wait_until_element_displayed(DeviceDataCollection.application_identify_switch)
        time.sleep(5)
    
        #change the application_identify switch as off
        wui.wait_until_element_displayed(DeviceDataCollection.get('application_identify_xpath'))
        wui.info( 'application visibility and control section displayed' , True )
        wui.check(DeviceDataCollection.get('application_identify_xpath'))
        time.sleep(2)
        wui.info('turn off switch for application identification success!', True)
    
        #change the section of statistic collection settings
        wui.wait_until_element_displayed(DeviceDataCollection.get('statistic_collection_xpath'))
        wui.info( 'statistic collection section displayed' , True )
        wui.check(DeviceDataCollection.get('statistic_collection_xpath'))
        time.sleep(2)
        wui.info('turn off switch for statistic collection success!', True)
        
        #change the section of kddr setting
        wui.move_scroll_bottom()
        wui.wait_until_element_displayed(DeviceDataCollection.get('kddr_name'))
        wui.wait_until_element_displayed(DeviceDataCollection.get('kddr_xpath'))
        #wui.check(DeviceDataCollection.get('kddr_xpath'))
        wui.click(DeviceDataCollection.get('kddr_xpath'))
        time.sleep(2)
        wui.info('turn on switch for kddr success', True)
       
        #click save button to save the configuration
        wui.click(DeviceDataCollection.data_collection_save_btn)
        wui.wait_until_element_displayed(DeviceDataCollection.data_collection_save_info)
        wui.info('the device data collection can be saved successfully', True )
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:65,代码来源:data_collect_full_config_check.py

示例9: HM

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
class HM(object):
    def __init__(self):
        self.w = WebUI()
        self.mode = None
        self.configer = Configuration()
    
    def admin_mode(self):
        self.mode = 'admin'
    
    def vhm_mode(self):
        self.mode = 'vhm'
    
    def is_admin_mode(self):
        return self.mode == 'admin'
    
    def is_vhm_mode(self):
        return self.mode == 'vhm'
      
    def _login(self, server, user, passwd):
        self.server = server
        self.user = user
        self.passwd = passwd
        
        self.w.info('trying to login %s as %s:%s' % (self.server, self.user, self.passwd))
        
        self.w.get(self.server)
        self.w.wait_until_element_displayed(LoginPage.get('login_btn'))
        self.w.check_title(LoginPage.get('login_page_title'), 'check title after open')
        
        self.w.input(LoginPage.get('username_txt'), self.user)
        self.w.input(LoginPage.get('password_txt'), self.passwd)
        
        self.w.info('login', True)
        self.w.click(LoginPage.get('login_btn'))

    def login(self, server, user, passwd):
        self.admin_mode()
        
        self._login(server, user, passwd)
        self.w.wait_until_element_displayed(MainPage.get('monitor_lnk'))
        
        self.w.register_cleanup(self.logout)

    def login_by_vhm(self, server, vhm_user, vhm_passwd, hive_name=None, hive_mgt_passwd=None, quick_ssid_passwd=None):
        self.vhm_mode()
        
        self._login(server, vhm_user, vhm_passwd)
        def __tmp(w):
            return w.s.title != LoginPage.get('login_page_title')
        self.w.wait_until(__tmp, msg='login page navigated')
        if self.w.title == EULAPage.get('eula_page_title'):
            self.w.wait_until_element_displayed(EULAPage.get('agree_btn'))
            self.w.info('agree with EUAL', True)
            self.w.click(EULAPage.get('agree_btn'))
            self.w.wait_until_element_displayed(WelcomePage.get('continue_btn'))
            self.w.check_title(WelcomePage.get('welcome_page_title'))
        
            self.w.input(WelcomePage.get('hive_name_txt'), hive_name)
            self.w.input(WelcomePage.get('hive_mgt_passwd_txt'), hive_mgt_passwd)
            self.w.input(WelcomePage.get('hive_mgt_passwd_confirm_txt'), hive_mgt_passwd)
            self.w.check(WelcomePage.get('enterprise_mode_radio'))
            self.w.wait_until_element_displayed(WelcomePage.get('quick_ssid_passwd_txt'))
            self.w.input(WelcomePage.get('quick_ssid_passwd_txt'), quick_ssid_passwd)
            self.w.input(WelcomePage.get('quick_ssid_passwd_confirm_txt'), quick_ssid_passwd)
            
            self.w.info('handle initial configuration', True)
            self.w.click(WelcomePage.get('continue_btn'))
            self.w.check_title(MainPage.get('main_page_title'), 'check title after login')
            
            time.sleep(5)
            
        self.w.register_cleanup(self.logout)

    def to_hiveaps_table(self, type='all'):
        self.w.click(MainPage.get('monitor_lnk'))
        self.w.wait_until_title_present(HiveAPsPage.get('allAPs_page_title'))

        if type == 'all':
            self.w.click(HiveAPsPage.get('hive_aps_lnk'))
            self.w.wait_until_title_present(HiveAPsPage.get('hiveAPs_page_title'))

            self.w.click(HiveAPsPage.get('auto_refresh_off'))
            selecter = self.w.get_selecter(HiveAPsPage.get('device_per_page_sel'))
            if selecter.first_selected_option.text != '500':
                selecter.select_by_value('500')
                self.w.debug('after select page size', True)
        elif type == 'rogue':
            self.w.click(RogueAPsPage.get('rogue_aps_lnk'))
            self.w.wait_until_title_present(RogueAPsPage.get('rogueAPs_page_title'))

            selecter = self.w.get_selecter(RogueAPsPage.get('device_per_page_sel'))
            if selecter.first_selected_option.text != '500':
                selecter.select_by_value('500')

    def select_ap(self, text='', by='default'):
        if by == 'default':
            try:
                self.w.wait_until_element_displayed(APsTablePage.locate_checkbox(text))
            except Exception, e:
                self.w.warn('Cannot find: %s' % text, True)
#.........这里部分代码省略.........
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:103,代码来源:__init__.py

示例10: ppsk_manual_create_user

# 需要导入模块: from webui import WebUI [as 别名]
# 或者: from webui.WebUI import input [as 别名]
def ppsk_manual_create_user():
    wui = WebUI()
    config = Configuration(wui.d("visit.url"), wui.d("visit.title"), wui.d("visit.pre_url"))
    if wui.session_id:
        config.to_page_before_deployed_ssid()
        #---------------------------------add a user group ------------------------------------

        wui.input(SsidPage.get('Input_ssid_textarea'), wui.d("ssid.ssid_name"))
        wui.input(SsidPage.get('Input_ssid_boardcast_textarea'), wui.d("ssid.ssid_boardcast_name"))
        wui.info('handle input the name of ssid boardcast name', True)

        wui.info('will move scroll to access security...', True)
        wui.move_scroll_to_element(DeployedSSID.get('access_div'))
        wui.wait_until_element_displayed(DeployedSSID.get('access_8021x_label'))
        wui.click(SsidPage.get('Select_PPSK'))
        wui.info('select access security is private psk end.', True)
        
        wui.click(SsidPage.get('Add_user_group_button'))
        wui.info('ge to select user group page', True)
        
        wui.click(SsidPage.get('new_user_group_button'))
        wui.info('ge to create user group page', True)
        config.wait_deploy_element(1)
        
        wui.input(SsidPage.get('Input_user_group_name_textarea'), wui.d("ssid.user_group_name"))
        wui.info('input the name of user group name', True)
        config.wait_deploy_element(1)
        
        wui.click(SsidPage.get('Save_button_new_user_group_page'))
        wui.info('save the created user group', True)
        config.wait_deploy_element(1)
        
        click_to_add_user_of_usergroup(wui, wui.d("ssid.user_group_name"))
        wui.wait_until_element_displayed(SsidPage.get('user_account_list'))
        #---------------------------------add user to user group---------------------------------------------
        wui.click(SsidPage.get('Add_user_to_user_group_button'))
        wui.info('add user to user group', True)

        wui.input(SsidPage.get('Input_user_name_textarea'), wui.d("ssid.user_name"))
        wui.info('input the name of user', True)
        
        wui.input(SsidPage.get('Input_password_textarea'), wui.d("ssid.user_password"))
        wui.info('input the password of user', True)
        
        wui.input(SsidPage.get('Input_user_password_confirm_textarea'), wui.d("ssid.user_password"))
        wui.info('confirm the password of user', True)
        
        wui.click(SsidPage.get('Save_user_button'))
        wui.info('save the user', True)
        config.wait_deploy_element(1)
        wui.click(SsidPage.get('Cancel_button_of_user_in_user_group_page'))
        wui.info('to select usergroup page', True)

        config.wait_deploy_element(1)
        add_user_group_to_ssid_and_save(wui, wui.d("ssid.user_group_name"))
        wui.info('select the defiend user group and save', True)
        
        config.wait_deploy_element(1)
        wui.info('handle create a new ppsk ssid pic', True)
        wui.click(DeployedSSID.get('save_btn'))
开发者ID:gvsurenderreddy,项目名称:AerohiveAuto,代码行数:62,代码来源:ppsk_manual_create_user.py


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