Exemplo n.º 1
0
def default_login(self):
    sheet = 'basic_conf'                      #数据存放的工作表名
    url = data.xls_data(sheet,3,1)              #路由器登录IP
    general_usr = data.xls_data(sheet,5,1)      #普通用户用户名
    general_pwd = data.xls_data(sheet,6,1)      #普通用户密码
    self.driver.get('http://%s'%url)
    login_control.set_user(self,general_usr,general_pwd)
    login_control.submit(self)
Exemplo n.º 2
0
#coding=utf-8

import unittest
from selenium import webdriver
from system.admin import admin_control,admin_business
from login import login_business,login_control
from data import data
import time


#########################################################
sheet = 'basic_conf'
url = data.xls_data(sheet,3,1)              #路由器登录IP
general_usr = data.xls_data(sheet,5,1)      #普通用户用户名
general_pwd = data.xls_data(sheet,6,1)      #普通用户密码
adv_usr = data.xls_data(sheet,7,1)          #高级用户用户名
adv_pwd = data.xls_data(sheet,8,1)          #高级用户密码
digit_pwd = '12345678'                    #纯数字密码
letter_pwd = 'abcdefgh'                   #纯英文密码
mini_pwd = '100msh'                       #6字节密码(最小有效值)
mini_pwd1 = '100ms'                       #5字节密码(低于最小值)
max_pwd = 'https.www.100msh.com'       #20字节密码(最大有效值)
max_pwd1 = 'https.www.100msh.com1'     #21字节密码(大于最大值)
china_pwd = u'百米生活'                   #中文密码
special_pwd = '100msh!@#$'               #含特殊字符密码

#########################################################


class LoginTest(unittest.TestCase):
    def setUp(self):
Exemplo n.º 3
0
#coding=utf-8

import unittest
from selenium import webdriver
from system.admin import admin_control,admin_business
from login import login_business,login_control
from data import data
from network.dmz import dmz_control,dmz_business
import time


#########################################################
sheet = 'basic_conf'
host1 = data.xls_data(sheet,4,1)        #测试主机IP(DMZ)
port1 = data.xls_data(sheet,13,1)       #DMZ端口
port2 = data.xls_data(sheet,14,1)       #DMZ端口
#########################################################


class DmzTest(unittest.TestCase):
    def setUp(self):
        #url = "http://192.168.11.1"
        #user = '******'
        #passwd = 'bm100@rut!%v2'
        self.driver = webdriver.Firefox()
        self.driver.implicitly_wait(10)
        #login_business.admin_login(self,url,user,passwd)
        login_business.default_login(self)
        dmz_control.dmz_menu(self)
        print u'DMZ页面已打开'