Commit 97398030 authored by libin's avatar libin
Browse files

20190822

parent b6477954
......@@ -22,7 +22,7 @@ SER_PASSWD = "wafer.com"
SER_PORT = '22'
COMPANY_NAME = "autotest"
COMPANY_URL = "autotest.com"
COMPANY_ID = "39"
COMPANY_ID = "6"
COMPANY_URL_NEW = "autotest2.com"
COMPANY_URL_EMPTY = "waferxa.com"
......@@ -93,6 +93,7 @@ ATTRIBUTE_ARIA_DISABLED = "aria-disabled"
PLEASE_SELECT_TEXT = "请选择"
ADD_SUCCESS_MSG = u'添加成功'
CHANGE_SUCCESS_MSG = u"修改成功"
EREA_SMALL_MSG = u"区域面积小于工位总面积,请扩展区域"
CHANGE_FAILD_MSG = u"操作失败"
EMAIL_FORMAT_ERROR = u'邮箱格式不正确!'
SAVE_BTN_MSG = u"保 存"
......@@ -317,7 +318,7 @@ BUILD_UPLOAD_FILE_PATH="\\img\\AIO_machine.jpg"
PRE_ATTRIBUTE_VALUE = 'value'
PRE_ATTRIBUTE_TITLE = 'title'
PRE_PARK_NAME = "西安软件园"
PRE_PARK_ID = "114"
PRE_PARK_ID = "3"
PRE_TIMEZONE = '北京'
PRE_CITY = "中国 / 陕西省 / 西安市"
PRE_MORNING_START_TIME = "09:00"
......@@ -331,27 +332,27 @@ PRE_ALL_DAY_END = "18:00"
预置的部门数据
'''
PRE_DEPARTMENT_NAME = "产品测试部"
PRE_DEPARTMENT_ID = "898"
PRE_DEPARTMENT_FATHER_ID = "897"
PRE_DEPARTMENT_ID = "110"
PRE_DEPARTMENT_FATHER_ID = "109"
'''预置的楼宇数据'''
PRE_BUILD_NAME ="零壹广场"
PRE_BUILD_ID ="80"
PRE_BUILD_ID ="3"
PRE_BUILD_BUILDTOKEN ="autotest001"
'''预置楼层信息'''
PRE_FLOOR_NAME = "3"
PRE_FLOOR_NAME = "2"
PRE_FLOOR_ID = "62"
'''预制区域信息'''
PRE_AREA_NAME = "东区"
PRE_AREA_ID = "137"
PRE_AREA_ID = "3"
'''
预置的用户数据
'''
PRE_USER_NAME = "autotest"
PRE_USER_ID = "886"
PRE_USER_ID = "378"
PRE_USER_JOB_NUMBER = "autotest"
PRE_USER_CARD_NUMBER = "autotest"
PRE_USER_EMAIL = "at@autotest.com"
......@@ -362,7 +363,7 @@ PRE_USER_WORKSTATION_NUMBER = "FS001"
'''
系统默认的角色数据
'''
COMMON_USER_ROLE_ID = "149"
COMMON_USER_ROLE_ID = "31"
COMMON_USER_ROLE_NAME = u"普通用户"
COMMON_USER_DEPARTMENT = u"所有部门"
# COMMON_USER_MENU = '{"backMenu":"1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,44,48,50,51,52,53,54,55,56,57,58","webMenu":"30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,53"}'
......@@ -370,7 +371,7 @@ COMMON_USER_DEPARTMENT = u"所有部门"
# COMMON_USER_ROLEURL = '1,2,3,4,5,6,7,8,11,13,15,16,17,18,19,20,21,22,26,27,28,29,31,32,33,34,35,36,37,38,39,45,46,50,51,52,53,55,57,58,62,63,64,65,66,67,68,69,70,71,90,91,92,93,94,98,99,100,101,102,106,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133'
# COMMON_USER_RANGE = "Pre_Xi'an_SoftWare_Park"
SPECIAL_USER_ROLE_NAME = u"特殊预约用户"
SPECIAL_USER_ROLE_ID = "150"
SPECIAL_USER_ROLE_ID = "32"
SPECIAL_USER_DEPARTMENT = u"所有部门"
# SPECIAL_USER_MENU = '{"backMenu":"1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,44,48,50,51,52,53,54,55,56,57,58","webMenu":"30,31,32,33,34,35,36,37,38,39,40,42,43,46,47,53"}'
# SPECIAL_USER_SCOPES = '{"scopes":[{"scopeType":-1,"tableIds":0}]}'
......@@ -378,8 +379,8 @@ SPECIAL_USER_DEPARTMENT = u"所有部门"
# SPECIAL_USER_RANGE = "Pre_Xi'an_SoftWare_Park"
'''预置的工位数据'''
PRE_MOBILE_STATION_ID = "532"
PRE_FIXED_STATION_ID = "533"
PRE_MOBILE_STATION_ID = "89"
PRE_FIXED_STATION_ID = "90"
PRE_MOBILE_STATION_NAME = "PM001"
PRE_FIXED_STATION_NAME = "PF001"
PRE_STATION_PARK = PRE_PARK_NAME
......
......@@ -84,8 +84,8 @@ ASSERT_OF_MAG_NUM = ".//*[@id='main']/div/div[2]/div/div/div/ul/li[1]"
ASSERT_OF_NO_MAG = ".//*[@id='main']/div/div[2]/div/div/div/div/div/div/div[2]"
BUTTON_OF_BDYY_ROW1 = 'icon-tianjiayonghu_0' # NAME
BUTTON_OF_BDYY_ROW2 = 'icon-tianjiayonghu_1' # NAME
BUTTON_OF_ZWGL_ROW1 = "icon-zuowei_0" # NAME
BUTTON_OF_ZWGL_ROW2 = "icon-zuowei_1" # NAME
BUTTON_OF_ZWGL_ROW1 = ".ant-table-fixed-right .ant-table-fixed tbody tr:first-child i:last-child" # NAME
BUTTON_OF_ZWGL_ROW2 = ".ant-table-fixed-right .ant-table-fixed tbody tr:nth-child(2) i:last-child" # NAME
WINDOW_NAME_INPUT = "[name='search'] .ant-input"
CLOSE_BDYG_BUTTON = "html/body/div[2]/div/div[2]/div/div[1]/button"
CANCEL_BDYG_BUTTON = "html/body/div[2]/div/div[2]/div/div[1]/div[3]/button[1]"
......
......@@ -30,8 +30,8 @@ USER_DEPARTMENT = "ul[class='form-group']>li>[name='page.filter.dept']"
USER_ROLE = "ul[class='form-group']>li>[name='user.import.role']"
USER_DEPARTMENT_CHECK = "/html/body/div[3]/div/div/div/ul/li[2]/span[2]"
USER_DEPARTMENT_CHECK1 = "/html/body/div[4]/div/div/div/ul/li[2]/span[2]"
USER_ROLE_GENERAL_USER = ".//*[@class = 'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft' ]/div[1]/ul[1]/li[2]"
USER_ROLE_SPECIAL_USER = ".//*[@class = 'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft' ]/div[1]/ul[1]/li[3]"
USER_ROLE_GENERAL_USER = ".//*[@class = 'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft' ]/div[1]/ul[1]/li[3]"
USER_ROLE_SPECIAL_USER = ".//*[@class = 'ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft' ]/div[1]/ul[1]/li[2]"
USER_WORKSTATION = "/html/body/div[2]/div/div[2]/div/div[1]/div[2]/ul/li[7]/div/span"
USER_WORKSTATION_NUMBER = ".//*[@class='ant-select-selection__rendered']/div[2]/div[1]"
USER_INFORMATION_TEXT = ".//*[@id='main']/div/div[1]"
......
......@@ -124,7 +124,7 @@ def reset_building():
# 重置预置区域
def reset_area():
update_sql = '''UPDATE `floorarea` f
SET f.`areaAge`=1000000
SET f.`areaAge`=100000.00
WHERE id=%s AND domainId=%s;'''%(test_data.PRE_AREA_ID, test_data.COMPANY_ID)
execute_sql(update_sql)
......@@ -145,8 +145,7 @@ def reset_commoon_role():
# update_sql1 = '''UPDATE `role` r SET r.`menu`='%s',
# r.`roleName`='%s',r.`roleType`=0,r.`roleFlag`=0,r.`scopes`='%s',
# r.`defaultRole`=0,r.`speReser`=0 WHERE id = %s;'''%(test_data.COMMON_USER_MENU, test_data.COMMON_USER_ROLE_NAME, test_data.COMMON_USER_SCOPES, test_data.COMMON_USER_ROLE_ID)
update_sql1 = '''UPDATE `role` r SET r.`roleName`='%s',r.`roleType`=0,r.`roleFlag`=0,r.`defaultRole`=0,r.`speReser`=0 WHERE id = %s;''' % (
test_data.COMMON_USER_ROLE_NAME,test_data.COMMON_USER_ROLE_ID)
update_sql1 = '''UPDATE `role` r SET r.`roleName`='%s' WHERE id = %s;''' % (test_data.COMMON_USER_ROLE_NAME,test_data.COMMON_USER_ROLE_ID)
execute_sql(update_sql1)
# 重置预置特殊预约角色
......@@ -154,8 +153,7 @@ def reset_special_role():
# update_sql2 = '''UPDATE `role` r SET r.`menu`='%s',
# r.`roleName`='%s',r.`roleType`=0,r.`roleFlag`=0,r.`scopes`='%s',
# r.`defaultRole`=1,r.`speReser`=1 WHERE id =%s;'''%(test_data.SPECIAL_USER_MENU, test_data.SPECIAL_USER_ROLE_NAME, test_data.SPECIAL_USER_SCOPES, test_data.SPECIAL_USER_ROLE_ID)
update_sql2 = '''UPDATE `role` r SET r.`roleName`='%s',r.`roleType`=0,r.`roleFlag`=0,r.`defaultRole`=1,r.`speReser`=1 WHERE id =%s;''' % (
test_data.SPECIAL_USER_ROLE_NAME,test_data.SPECIAL_USER_ROLE_ID)
update_sql2 = '''UPDATE `role` r SET r.`roleName`='%s' WHERE id =%s;''' % (test_data.SPECIAL_USER_ROLE_NAME,test_data.SPECIAL_USER_ROLE_ID)
execute_sql(update_sql2)
# 重置工位信息
......
......@@ -13,6 +13,7 @@ class UploadingStationMap(unittest.TestCase):
self.browser = web_client.WebClient(test_data.MANAGE_URL)
deal_db_data.clear_area()
deal_db_data.reset_area()
# 插入“区域”数据
insert_area = '''INSERT INTO `floorarea`(domainId,floorAreaNum,floorAreaStatus,floorId,floorNum,officeBuildingId,parkId,areaAge,height,width)
VALUES({di},'A1',0,{fi},'{fn}',{bi},{pi},0,1080,1920);''' \
......@@ -107,12 +108,12 @@ class UploadingStationMap(unittest.TestCase):
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #点击“上传地图和缩略图”按钮
self.browser.assert_mark_msg(gwwh_gwdt.ADD_MAP_BOX_TITLE, test_data.ADD_STATION_MAP_TEXT, By.CLASS_NAME) #断言弹出框的标题是“添加地图”
area = "-20"
default_value = "0.00"
default_value = "1.00"
self.browser.clear_elem_text(gwwh_gwdt.AREA_OF_REGION_INPUT, By.CSS_SELECTOR) #删除“区域面积”输入框中的值
self.browser.sendkeys_to_element(gwwh_gwdt.AREA_OF_REGION_INPUT, area, By.CSS_SELECTOR) #在输入框中输入-20
self.browser.click_element(gwwh_gwdt.CONFIRM_BTN) #点击“确定”按钮
self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.CHANGE_SUCCESS_MSG) #检查出现动态提示文本:修改成功
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #再次点击“上传地图和缩略图”按钮
self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.EREA_SMALL_MSG)
# self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #再次点击“上传地图和缩略图”按钮
self.browser.assert_attribute_msg(gwwh_gwdt.AREA_OF_REGION_INPUT, test_data.ATTRIBUTE_VALUE, default_value, By.CSS_SELECTOR) #断言“区域面积”输入框中显示默认值
'''
......@@ -121,7 +122,7 @@ class UploadingStationMap(unittest.TestCase):
function:地图面积<0.01
'''
def test_uploading_station_map_006(self):
'''上传地图和缩略图,地图面积小于1(只能输入两位小数,小于1报错)'''
'''上传地图和缩略图,地图面积小于工位总面积'''
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #点击“上传地图和缩略图”按钮
self.browser.assert_mark_msg(gwwh_gwdt.ADD_MAP_BOX_TITLE, test_data.ADD_STATION_MAP_TEXT, By.CLASS_NAME) #断言弹出框的标题是“添加地图”
area = "0.00005"
......@@ -129,9 +130,9 @@ class UploadingStationMap(unittest.TestCase):
self.browser.clear_elem_text(gwwh_gwdt.AREA_OF_REGION_INPUT, By.CSS_SELECTOR) #删除“区域面积”输入框中的值
self.browser.sendkeys_to_element(gwwh_gwdt.AREA_OF_REGION_INPUT, area, By.CSS_SELECTOR) #在输入框中输入0.00005
self.browser.click_element(gwwh_gwdt.CONFIRM_BTN) #点击“确定”按钮
self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.CHANGE_SUCCESS_MSG) #检查出现动态提示文本:修改成功
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #再次点击“上传地图和缩略图”按钮
self.browser.assert_attribute_msg(gwwh_gwdt.AREA_OF_REGION_INPUT, test_data.ATTRIBUTE_VALUE, default_value, By.CSS_SELECTOR) #断言“区域面积”输入框中显示默认值
self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.EREA_SMALL_MSG) #检查出现动态提示文本:修改成功
# self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #再次点击“上传地图和缩略图”按钮
# self.browser.assert_attribute_msg(gwwh_gwdt.AREA_OF_REGION_INPUT, test_data.ATTRIBUTE_VALUE, default_value, By.CSS_SELECTOR) #断言“区域面积”输入框中显示默认值
'''
author:曹英群
......@@ -140,54 +141,52 @@ class UploadingStationMap(unittest.TestCase):
'''
def test_uploading_station_map_007(self):
'''上传地图和缩略图,地图面积为1位小数(只能输入两位小数,小于1报错)'''
raise Exception("input不能清空")
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #点击“上传地图和缩略图”按钮
self.browser.assert_mark_msg(gwwh_gwdt.ADD_MAP_BOX_TITLE, test_data.ADD_STATION_MAP_TEXT, By.CLASS_NAME) #断言弹出框的标题是“添加地图”
area = "0.5"
area = "100.5"
self.browser.clear_elem_text(gwwh_gwdt.AREA_OF_REGION_INPUT, By.CSS_SELECTOR) #删除“区域面积”输入框中的值
self.browser.sendkeys_to_element(gwwh_gwdt.AREA_OF_REGION_INPUT, area, By.CSS_SELECTOR) #在输入框中输入0.5
self.browser.click_element(gwwh_gwdt.CONFIRM_BTN) #点击“确定”按钮
self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.CHANGE_SUCCESS_MSG) #检查出现动态提示文本:修改成功
'''
author:曹英群
createtime:2017.09.22
function:地图面积大于两位小数
'''
def test_uploading_station_map_008(self):
'''上传地图和缩略图,地图面积大于两位小数,入(只能输入两位小数,小于1报错)'''
raise Exception("input不能清空")
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #点击“上传地图和缩略图”按钮
self.browser.assert_mark_msg(gwwh_gwdt.ADD_MAP_BOX_TITLE, test_data.ADD_STATION_MAP_TEXT, By.CLASS_NAME) #断言弹出框的标题是“添加地图”
area = "0.758"
default_value = "0.76"
self.browser.clear_elem_text(gwwh_gwdt.AREA_OF_REGION_INPUT, By.CSS_SELECTOR) #删除“区域面积”输入框中的值
self.browser.sendkeys_to_element(gwwh_gwdt.AREA_OF_REGION_INPUT, area, By.CSS_SELECTOR) #在输入框中输入0.758
self.browser.click_element(gwwh_gwdt.CONFIRM_BTN) #点击“确定”按钮
self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.CHANGE_SUCCESS_MSG) #检查出现动态提示文本:修改成功
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #再次点击“上传地图和缩略图”按钮
self.browser.assert_attribute_msg(gwwh_gwdt.AREA_OF_REGION_INPUT, test_data.ATTRIBUTE_VALUE, default_value, By.CSS_SELECTOR) #断言“区域面积”输入框中显示0.76
#输不进去大于2位
# '''
# author:曹英群
# createtime:2017.09.22
# function:地图面积大于两位小数
# '''
# def test_uploading_station_map_008(self):
# '''上传地图和缩略图,地图面积大于两位小数,入(只能输入两位小数,小于1报错)'''
# self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #点击“上传地图和缩略图”按钮
# self.browser.assert_mark_msg(gwwh_gwdt.ADD_MAP_BOX_TITLE, test_data.ADD_STATION_MAP_TEXT, By.CLASS_NAME) #断言弹出框的标题是“添加地图”
# area = "0.758"
# default_value = "0.76"
# self.browser.clear_elem_text(gwwh_gwdt.AREA_OF_REGION_INPUT, By.CSS_SELECTOR) #删除“区域面积”输入框中的值
# self.browser.sendkeys_to_element(gwwh_gwdt.AREA_OF_REGION_INPUT, area, By.CSS_SELECTOR) #在输入框中输入0.758
# self.browser.click_element(gwwh_gwdt.CONFIRM_BTN) #点击“确定”按钮
# self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.CHANGE_SUCCESS_MSG) #检查出现动态提示文本:修改成功
# self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #再次点击“上传地图和缩略图”按钮
# self.browser.assert_attribute_msg(gwwh_gwdt.AREA_OF_REGION_INPUT, test_data.ATTRIBUTE_VALUE, default_value, By.CSS_SELECTOR) #断言“区域面积”输入框中显示0.76
'''
author:曹英群
createtime:2017.09.22
function:地图面积大于两位小数
'''
def test_uploading_station_map_009(self):
'''上传地图和缩略图,地图面积大于两位小数,舍(只能输入两位小数,小于1报错)'''
raise Exception("input不能清空")
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #点击“上传地图和缩略图”按钮
self.browser.assert_mark_msg(gwwh_gwdt.ADD_MAP_BOX_TITLE, test_data.ADD_STATION_MAP_TEXT, By.CLASS_NAME) #断言弹出框的标题是“添加地图”
area = "0.754"
default_value = "0.75"
self.browser.clear_elem_text(gwwh_gwdt.AREA_OF_REGION_INPUT, By.CSS_SELECTOR) #删除“区域面积”输入框中的值
self.browser.sendkeys_to_element(gwwh_gwdt.AREA_OF_REGION_INPUT, area, By.CSS_SELECTOR) #在输入框中输入0.758
self.browser.click_element(gwwh_gwdt.CONFIRM_BTN) #点击“确定”按钮
self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.CHANGE_SUCCESS_MSG) #检查出现动态提示文本:修改成功
self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #再次点击“上传地图和缩略图”按钮
self.browser.assert_attribute_msg(gwwh_gwdt.AREA_OF_REGION_INPUT, test_data.ATTRIBUTE_VALUE, default_value, By.CSS_SELECTOR) #断言“区域面积”输入框中显示0.75
# '''
# author:曹英群
# createtime:2017.09.22
# function:地图面积大于两位小数
# '''
# def test_uploading_station_map_009(self):
# '''上传地图和缩略图,地图面积大于两位小数,舍(只能输入两位小数,小于1报错)'''
# self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #点击“上传地图和缩略图”按钮
# self.browser.assert_mark_msg(gwwh_gwdt.ADD_MAP_BOX_TITLE, test_data.ADD_STATION_MAP_TEXT, By.CLASS_NAME) #断言弹出框的标题是“添加地图”
# area = "0.754"
# default_value = "0.75"
# self.browser.clear_elem_text(gwwh_gwdt.AREA_OF_REGION_INPUT, By.CSS_SELECTOR) #删除“区域面积”输入框中的值
# self.browser.sendkeys_to_element(gwwh_gwdt.AREA_OF_REGION_INPUT, area, By.CSS_SELECTOR) #在输入框中输入0.758
# self.browser.click_element(gwwh_gwdt.CONFIRM_BTN) #点击“确定”按钮
# self.browser.assert_mark_msg(gwwh_gwdt.DYNAMIC_MSG, test_data.CHANGE_SUCCESS_MSG) #检查出现动态提示文本:修改成功
# self.browser.click_element(gwwh_gwdt.UPLOADING_STATION_MAP_BTN) #再次点击“上传地图和缩略图”按钮
# self.browser.assert_attribute_msg(gwwh_gwdt.AREA_OF_REGION_INPUT, test_data.ATTRIBUTE_VALUE, default_value, By.CSS_SELECTOR) #断言“区域面积”输入框中显示0.75
def tearDown(self):
......
......@@ -152,96 +152,96 @@ class AvaliableFixed(unittest.TestCase):
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘确认’按钮
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_NO_MAG, test_data.ASSERT_OF_NO_MAG) # 数据栏显示‘暂无数据’
'''连续空闲空位为空时,绑定员工,点击‘X’按钮'''
def test_search_station_006(self):
self.driver.clear_elem_text(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, By.NAME)
self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT,"111114", By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.CLOSE_BDYG_BUTTON)
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
'''连续空闲空位为空时,绑定员工,点击‘取消’按钮'''
def test_search_station_007(self):
self.driver.clear_elem_text(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, By.NAME)
self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.CANCEL_BDYG_BUTTON)
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
'''连续空闲空位为空时,绑定员工,点击‘确认’按钮'''
def test_search_station_008(self):
self.driver.clear_elem_text(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, By.NAME)
self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.ENSURE_BDYG_BUTTON)
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_ONE) # 判断页脚信息‘共1条’
'''连续空闲空位为1时,绑定员工,点击‘X’按钮'''
def test_search_station_009(self):
self.driver.set_value(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT,'1', By.NAME) # 连续空闲工位数量输入‘1’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘确认’按钮
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT,"111114", By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.CLOSE_BDYG_BUTTON)
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
'''连续空闲空位为1时,绑定员工,点击‘取消’按钮'''
def test_search_station_010(self):
self.driver.set_value(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, '1', By.NAME) # 连续空闲工位数量输入‘1’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘确认’按钮
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.CANCEL_BDYG_BUTTON)
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
'''连续空闲空位为1时,绑定员工,点击‘确认’按钮'''
def test_search_station_011(self):
self.driver.set_value(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, '1', By.NAME) # 连续空闲工位数量输入‘1’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘确认’按钮
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.ENSURE_BDYG_BUTTON)
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘查询’按钮
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_ONE) # 判断页脚信息‘共1条’
'''连续空闲空位为2时,绑定员工,点击‘确认’按钮'''
# '''连续空闲空位为空时,绑定员工,点击‘X’按钮'''
# def test_search_station_006(self):
# self.driver.clear_elem_text(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, By.NAME)
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
# self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
# self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT,"111114", By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.CLOSE_BDYG_BUTTON)
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
def test_search_station_012(self):
self.driver.set_value(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, '2', By.NAME) # 连续空闲工位数量输入‘1’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘查询’按钮
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
self.driver.click_element(gwwh_gwdt.ENSURE_BDYG_BUTTON) # 点击‘确认’按钮
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘查询’按钮
self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_NO_MAG, test_data.ASSERT_OF_NO_MAG) # 数据栏显示‘暂无数据’
# '''连续空闲空位为空时,绑定员工,点击‘取消’按钮'''
#
# def test_search_station_007(self):
# self.driver.clear_elem_text(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, By.NAME)
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
# self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
# self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.CANCEL_BDYG_BUTTON)
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
#
# '''连续空闲空位为空时,绑定员工,点击‘确认’按钮'''
#
# def test_search_station_008(self):
# self.driver.clear_elem_text(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, By.NAME)
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
# self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
# self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.ENSURE_BDYG_BUTTON)
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_ONE) # 判断页脚信息‘共1条’
#
# '''连续空闲空位为1时,绑定员工,点击‘X’按钮'''
# def test_search_station_009(self):
# self.driver.set_value(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT,'1', By.NAME) # 连续空闲工位数量输入‘1’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘确认’按钮
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
# self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
# self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT,"111114", By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.CLOSE_BDYG_BUTTON)
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
#
# '''连续空闲空位为1时,绑定员工,点击‘取消’按钮'''
#
# def test_search_station_010(self):
# self.driver.set_value(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, '1', By.NAME) # 连续空闲工位数量输入‘1’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘确认’按钮
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
# self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
# self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.CANCEL_BDYG_BUTTON)
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
#
# '''连续空闲空位为1时,绑定员工,点击‘确认’按钮'''
#
# def test_search_station_011(self):
# self.driver.set_value(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, '1', By.NAME) # 连续空闲工位数量输入‘1’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘确认’按钮
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
# self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
# self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.ENSURE_BDYG_BUTTON)
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘查询’按钮
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_ONE) # 判断页脚信息‘共1条’
#
# '''连续空闲空位为2时,绑定员工,点击‘确认’按钮'''
#
# def test_search_station_012(self):
# self.driver.set_value(gwwh_gwdt.AVAILABLE_NUM_AVAILABLE_INPUT, '2', By.NAME) # 连续空闲工位数量输入‘1’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘查询’按钮
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_BDYY_ROW1, By.NAME)
# self.driver.click_element(gwwh_gwdt.WINDOW_NAME_INPUT, By.CSS_SELECTOR)
# self.driver.set_value(gwwh_gwdt.WINDOW_NAME_INPUT, "111114", By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.STATION_LIST_111114, By.CSS_SELECTOR)
# self.driver.click_element(gwwh_gwdt.ENSURE_BDYG_BUTTON) # 点击‘确认’按钮
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_MAG_NUM, test_data.ASSERT_OF_MAG_TWO) # 判断页脚信息‘共2条’
# self.driver.click_element(gwwh_gwdt.BUTTON_OF_ENSURE) # 点击‘查询’按钮
# self.driver.assert_mark_msg(gwwh_gwdt.ASSERT_OF_NO_MAG, test_data.ASSERT_OF_NO_MAG) # 数据栏显示‘暂无数据’
'''工位地图编辑'''
def test_search_station_013(self):
self.driver.click_element(gwwh_gwdt.BUTTON_OF_ZWGL_ROW1,By.NAME)
self.driver.click_element(gwwh_gwdt.BUTTON_OF_ZWGL_ROW1,By.CSS_SELECTOR)
self.driver.assert_mark_msg(gwwh_gwdt.TOTAL_OF_ZWGL, '座位管理', By.CSS_SELECTOR)
def tearDown(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment