How to use refresh_page method in SeleniumBase

Best Python code snippet using SeleniumBase

test_c_type.py

Source:test_c_type.py Github

copy

Full Screen

1import pytest2from data.type_data import TypeData3# 改变输出结果4create_type_ids = [5 "测试:{}->[预期:{}]".6 format(data["case"], data["expected"]) for data in TypeData.create_type_data7]8create_type_chineseName_ids = [9 "测试:{}->[预期:{}]".10 format(data["case"], data["expected"]) for data in TypeData.create_type_chineseName_data11]12create_type_EnglishName_ids = [13 "测试:{}->[预期:{}]".14 format(data["case"], data["expected"]) for data in TypeData.create_type_EnglishName_data15]16create_type_englishName_ids = [17 "测试:{}->[预期:{}]".18 format(data["case"], data["expected"]) for data in TypeData.create_type_englishName_data19]20create_type_numberName_ids = [21 "测试:{}->[预期:{}]".22 format(data["case"], data["expected"]) for data in TypeData.create_type_numberName_data23]24create_type_halfSymbolName_ids = [25 "测试:{}->[预期:{}]".26 format(data["case"], data["expected"]) for data in TypeData.create_type_halfSymbolName_data27]28create_type_entireSymbolName_ids = [29 "测试:{}->[预期:{}]".30 format(data["case"], data["expected"]) for data in TypeData.create_type_entireSymbolName_data31]32create_type_superLongName33_ids = [33 "测试:{}->[预期:{}]".34 format(data["case"], data["expected"]) for data in TypeData.create_type_superLongName33_data35]36create_type_superLongName32_ids = [37 "测试:{}->[预期:{}]".38 format(data["case"], data["expected"]) for data in TypeData.create_type_superLongName32_data39]40name_none_ids = [41 "测试:{}->[预期:{}]".42 format(data["case"], data["expected"]) for data in TypeData.name_none_data43]44name_halfSpace_ids = [45 "测试:{}->[预期:{}]".46 format(data["case"], data["expected"]) for data in TypeData.name_halfSpace_data47]48name_entireSpace_ids = [49 "测试:{}->[预期:{}]".50 format(data["case"], data["expected"]) for data in TypeData.name_entireSpace_data51]52create_type_sameName_ids = [53 "测试:{}->[预期:{}]".54 format(data["case"], data["expected"]) for data in TypeData.create_type_sameName_data55]56create_type_directSave_ids = [57 "测试:{}->[预期:{}]".58 format(data["case"], data["expected"]) for data in TypeData.create_type_directSave_data59]60file_none_ids = [61 "测试:{}->[预期:{}]".62 format(data["case"], data["expected"]) for data in TypeData.file_none_data63]64fileCode_none_ids = [65 "测试:{}->[预期:{}]".66 format(data["case"], data["expected"]) for data in TypeData.fileCode_none_data67]68create_type_samefile_ids = [69 "测试:{}->[预期:{}]".70 format(data["case"], data["expected"]) for data in TypeData.create_type_samefile_data71]72create_type_renameFile_ids = [73 "测试:{}->[预期:{}]".74 format(data["case"], data["expected"]) for data in TypeData.create_type_renameFile_data75]76create_type_sameFilename_ids = [77 "测试:{}->[预期:{}]".78 format(data["case"], data["expected"]) for data in TypeData.create_type_sameFilename_data79]80cancel_type_ids = [81 "测试:{}->[预期:{}]".82 format(data["case"], data["expected"]) for data in TypeData.cancel_type_data83]84search_type_Chinese_ids = [85 "测试:{}->[预期:{}]".86 format(data["case"], data["expected"]) for data in TypeData.search_type_Chinese_data87]88search_type_english_ids = [89 "测试:{}->[预期:{}]".90 format(data["case"], data["expected"]) for data in TypeData.search_type_english_data91]92search_type_English_ids = [93 "测试:{}->[预期:{}]".94 format(data["case"], data["expected"]) for data in TypeData.search_type_English_data95]96search_type_number_ids = [97 "测试:{}->[预期:{}]".98 format(data["case"], data["expected"]) for data in TypeData.search_type_number_data99]100search_type_halfSymbol_ids = [101 "测试:{}->[预期:{}]".102 format(data["case"], data["expected"]) for data in TypeData.search_type_halfSymbol_data103]104search_type_entireSymbol_ids = [105 "测试:{}->[预期:{}]".106 format(data["case"], data["expected"]) for data in TypeData.search_type_entireSymbol_data107]108delete_type_single_ids = [109 "测试:{}->[预期:{}]".110 format(data["case"], data["expected"]) for data in TypeData.delete_type_single_data111]112delete_type_noSelect_ids = [113 "测试:{}->[预期:{}]".114 format(data["case"], data["expected"]) for data in TypeData.delete_type_noSelect_data115]116delete_type_allSelect_ids = [117 "测试:{}->[预期:{}]".118 format(data["case"], data["expected"]) for data in TypeData.delete_type_allSelect_data119]120delete_type_employ_ids = [121 "测试:{}->[预期:{}]".122 format(data["case"], data["expected"]) for data in TypeData.delete_type_employ_data123]124delete_type_multipleChoice_ids = [125 "测试:{}->[预期:{}]".126 format(data["case"], data["expected"]) for data in TypeData.delete_type_multipleChoice_data127]128#导入添加文件类型数据129route_name = TypeData.test_file_type_data130@pytest.mark.loginTest131class Test_Type(object):132 """文件类型管理测试"""133 type_data = TypeData134 @pytest.mark.parametrize("data", type_data.cancel_type_data, ids=cancel_type_ids)135 def test_create_type_cancel(self, login,refresh_page, data):136 """创建文件类型管理测试,取消"""137 type_page = login[3]138 type_page.add_type_process_cancel()139 result = type_page.cancel_type_text()140 assert data["expected"] in result, "创建失败, 断言失败"141 @pytest.mark.parametrize("data", type_data.create_type_chineseName_data, ids=create_type_chineseName_ids)142 def test_create_type_ChineseName(self, login,refresh_page, data):143 """创建文件类型管理测试,中文名称"""144 type_page = login[3]145 type_page.add_type_process(route_name[1][0],route_name[1][1])146 result = type_page.save_type_text()147 assert data["expected"] in result, "创建成功, 断言成功"148 @pytest.mark.parametrize("data", type_data.create_type_EnglishName_data, ids=create_type_EnglishName_ids)149 def test_create_type_EnglishName(self, login,refresh_page, data):150 """创建文件类型管理测试,名称英文大写"""151 type_page = login[3]152 type_page.add_type_process(route_name[2][0],route_name[2][1])153 result = type_page.save_type_text()154 assert data["expected"] in result, "创建成功, 断言成功"155 @pytest.mark.parametrize("data", type_data.create_type_englishName_data, ids=create_type_englishName_ids)156 def test_create_type_englishName(self, login,refresh_page, data):157 """创建文件类型管理测试,名称英文小写"""158 type_page = login[3]159 type_page.add_type_process(route_name[3][0],route_name[3][1])160 result = type_page.save_type_text()161 assert data["expected"] in result, "创建成功, 断言成功"162 @pytest.mark.parametrize("data", type_data.create_type_numberName_data, ids=create_type_numberName_ids)163 def test_create_type_numberName(self, login,refresh_page, data):164 """创建文件类型管理测试,名称数字"""165 type_page = login[3]166 type_page.add_type_process(route_name[4][0],route_name[4][1])167 result = type_page.save_type_text()168 assert data["expected"] in result, "创建成功, 断言成功"169 @pytest.mark.parametrize("data", type_data.create_type_halfSymbolName_data, ids=create_type_halfSymbolName_ids)170 def test_create_type_halfSymbolName(self, login,refresh_page, data):171 """创建文件类型管理测试,名称半角符号"""172 type_page = login[3]173 type_page.add_type_process(route_name[5][0],route_name[5][1])174 result = type_page.save_type_text()175 assert data["expected"] in result, "创建成功, 断言成功"176 @pytest.mark.parametrize("data", type_data.create_type_entireSymbolName_data, ids=create_type_entireSymbolName_ids)177 def test_create_type_entireSymbolName(self, login,refresh_page, data):178 """创建文件类型管理测试,名称全角符号"""179 type_page = login[3]180 type_page.add_type_process(route_name[6][0],route_name[6][1])181 result = type_page.save_type_text()182 assert data["expected"] in result, "创建成功, 断言成功"183 @pytest.mark.parametrize("data", type_data.create_type_superLongName33_data, ids=create_type_superLongName33_ids)184 def test_create_type_superLongName33(self,login,refresh_page,data):185 """创建文件类型管理测试,名称超长字符33位"""186 type_page = login[3]187 type_page.add_type_process_superLongName(route_name[7][0], route_name[7][1])188 result = type_page.Tips_text()189 assert data["expected"] in result, "创建失败, 断言成功"190 @pytest.mark.parametrize("data", type_data.create_type_superLongName32_data, ids=create_type_superLongName32_ids)191 def test_create_type_superLongName32(self, login,refresh_page, data):192 """创建文件类型管理测试,名称超长字符32位"""193 type_page = login[3]194 type_page.add_type_process_superLongName(route_name[8][0], route_name[8][1])195 result = type_page.save_type_text()196 assert data["expected"] in result, "创建成功, 断言成功"197 @pytest.mark.parametrize("data", type_data.name_none_data, ids=name_none_ids)198 def test_create_type_noneName(self, login,refresh_page, data):199 """创建文件类型管理测试,名称为空"""200 type_page = login[3]201 type_page.add_type_process_noneName(route_name[0][0])202 result = type_page.Tips_text()203 assert data["expected"] in result, "创建失败, 断言失败"204 @pytest.mark.parametrize("data", type_data.name_halfSpace_data, ids=name_halfSpace_ids)205 def test_create_type_halfSpaceName(self, login,refresh_page, data):206 """创建文件类型管理测试,名称为半角空格"""207 type_page = login[3]208 type_page.add_type_process_spaceName(route_name[0][0]," ")209 result = type_page.Tips_text()210 assert data["expected"] in result, "创建失败, 断言失败"211 @pytest.mark.parametrize("data", type_data.create_type_renameFile_data, ids=create_type_renameFile_ids)212 def test_create_type_renameFile(self, login, refresh_page, data):213 """创建文件类型管理测试,同一文件但文件名不同"""214 type_page = login[3]215 type_page.add_type_process(route_name[9][0], route_name[9][1])216 result = type_page.save_type_text()217 assert data["expected"] in result, "创建失败, 断言失败"218 @pytest.mark.xfail(condition=2>1,reason='提示信息不够准确')219 @pytest.mark.parametrize("data", type_data.create_type_sameName_data, ids=create_type_sameName_ids)220 def test_create_type_sameName(self, login,refresh_page, data):221 """创建文件类型管理测试,相同名称但类型不同"""222 type_page = login[3]223 type_page.add_type_process(route_name[10][0],route_name[10][1])224 result = type_page.save_type_text()225 assert data["expected"] in result, "创建失败, 断言失败"226 @pytest.mark.parametrize("data", type_data.name_entireSpace_data, ids=name_entireSpace_ids)227 def test_create_type_entireSpaceName(self, login,refresh_page, data):228 """创建文件类型管理测试,名称为全角空格"""229 type_page = login[3]230 type_page.add_type_process_spaceName(route_name[0][0]," ")231 result = type_page.Tips_text()232 assert data["expected"] in result, "创建失败, 断言失败"233 @pytest.mark.parametrize("data", type_data.create_type_directSave_data, ids=create_type_directSave_ids)234 def test_create_type_directSave(self, login,refresh_page, data):235 """创建文件类型管理测试,直接保存"""236 type_page = login[3]237 type_page.add_type_process_directSave()238 result = type_page.Tips_text()239 assert data["expected"] in result, "创建失败, 断言失败"240 @pytest.mark.parametrize("data", type_data.file_none_data, ids=file_none_ids)241 def test_create_type_noneFile(self, login,refresh_page, data):242 """创建文件类型管理测试,不选择文件保存"""243 type_page = login[3]244 type_page.add_type_process_nonefile(route_name[0][1])245 result = type_page.save_type_text()246 assert data["expected"] in result, "创建失败, 断言失败"247 @pytest.mark.parametrize("data", type_data.fileCode_none_data, ids=fileCode_none_ids)248 def test_create_type_noneFileCode(self, login,refresh_page, data):249 """创建文件类型管理测试,选择文件不生成特征码保存"""250 type_page = login[3]251 type_page.add_type_process_nonefileCode(route_name[0][0],route_name[0][1])252 result = type_page.save_type_text()253 assert data["expected"] in result, "创建失败, 断言失败"254 @pytest.mark.parametrize("data", type_data.create_type_samefile_data, ids=create_type_samefile_ids)255 def test_create_type_samefile(self, login, refresh_page, data):256 """创建文件类型管理测试,相同文件但名称不同"""257 type_page = login[3]258 type_page.add_type_process(route_name[1][0], route_name[0][1])259 result = type_page.save_type_text()260 assert data["expected"] in result, "创建失败, 断言失败"261 @pytest.mark.parametrize("data", type_data.create_type_sameFilename_data, ids=create_type_sameFilename_ids)262 def test_create_type_sameFilename(self, login, refresh_page, data):263 """创建文件类型管理测试,不同类型文件但文件名相同"""264 type_page = login[3]265 type_page.add_type_process(route_name[11][0], route_name[11][1])266 result = type_page.save_type_text()267 assert data["expected"] in result, "创建失败, 断言失败"268 @pytest.mark.parametrize("data", type_data.search_type_Chinese_data, ids=search_type_Chinese_ids)269 def test_search_type_Chinese(self, login, refresh_page, data):270 """搜索文件类型管理测试,中文搜索"""271 type_page = login[3]272 type_page.search_type_process(route_name[1][1])273 result = type_page.search_type_text()274 assert data["expected"] in result, "搜索成功, 断言成功"275 @pytest.mark.parametrize("data", type_data.search_type_English_data, ids=search_type_English_ids)276 def test_search_type_English(self, login, refresh_page, data):277 """搜索文件类型管理测试,英文大写搜索"""278 type_page = login[3]279 type_page.search_type_process(route_name[2][1])280 result = type_page.search_type_text()281 assert data["expected"] in result, "搜索成功, 断言成功"282 @pytest.mark.parametrize("data", type_data.search_type_english_data, ids=search_type_english_ids)283 def test_search_type_english(self, login, refresh_page, data):284 """搜索文件类型管理测试,英文小写搜索"""285 type_page = login[3]286 type_page.search_type_process(route_name[3][1])287 result = type_page.search_type_text()288 assert data["expected"] in result, "搜索成功, 断言成功"289 @pytest.mark.parametrize("data", type_data.search_type_number_data, ids=search_type_number_ids)290 def test_search_type_number(self, login, refresh_page, data):291 """搜索文件类型管理测试,数字搜索"""292 type_page = login[3]293 type_page.search_type_process(route_name[4][1])294 result = type_page.search_type_text()295 assert data["expected"] in result, "搜索成功, 断言成功"296 @pytest.mark.parametrize("data", type_data.search_type_halfSymbol_data, ids=search_type_halfSymbol_ids)297 def test_search_type_halfSymbol(self, login, refresh_page, data):298 """搜索文件类型管理测试,半角符号搜索"""299 type_page = login[3]300 type_page.search_type_process(route_name[5][1])301 result = type_page.search_type_text()302 assert data["expected"] in result, "搜索成功, 断言成功"303 @pytest.mark.parametrize("data", type_data.search_type_entireSymbol_data, ids=search_type_entireSymbol_ids)304 def test_search_type_entireSymbol(self, login, refresh_page, data):305 """搜索文件类型管理测试,全角符号搜索"""306 type_page = login[3]307 type_page.search_type_process(route_name[6][1])308 result = type_page.search_type_text()309 assert data["expected"] in result, "搜索成功, 断言成功"310 @pytest.mark.parametrize("data", type_data.delete_type_noSelect_data, ids=delete_type_noSelect_ids)311 def test_delete_type_noSelect(self, login, refresh_page, data):312 """删除文件类型管理测试,不选择列表"""313 type_page = login[3]314 type_page.delete_type_noSelect()315 result = type_page.Tips_text()316 assert data["expected"] in result, "创建失败, 断言失败"317 @pytest.mark.parametrize("data", type_data.delete_type_single_data, ids=delete_type_single_ids)318 def test_delete_type_single(self, login,refresh_page, data):319 """删除文件类型管理测试,单选删除,没有被任务使用"""320 type_page = login[3]321 type_page.delete_type_single()322 result = type_page.save_type_text()323 assert data["expected"] in result, "创建失败, 断言失败"324 @pytest.mark.xfail(condition=2>1,reason="任务未建立")325 @pytest.mark.parametrize("data", type_data.delete_type_employ_data, ids=delete_type_employ_ids)326 def test_delete_type_singleEmploy(self, login,refresh_page, data):327 """删除文件类型管理测试,单选删除被任务使用"""328 type_page = login[3]329 type_page.delete_type_singleEmploy()330 result = type_page.save_type_text()331 assert data["expected"] in result, "创建失败, 断言失败"332 @pytest.mark.parametrize("data", type_data.delete_type_multipleChoice_data, ids=delete_type_multipleChoice_ids)333 def test_delete_type_multipleChoice(self, login,refresh_page, data):334 """删除文件类型管理测试,多选删除"""335 type_page = login[3]336 type_page.delete_type_multipleChoice()337 result = type_page.save_type_text()338 assert data["expected"] in result, "创建失败, 断言失败"339 @pytest.mark.parametrize("data", type_data.delete_type_allSelect_data, ids=delete_type_allSelect_ids)340 def test_delete_type_allSelect(self, login,refresh_page, data):341 """删除文件类型管理测试,全选删除"""342 type_page = login[3]343 type_page.delete_type_allSelect()344 result = type_page.save_type_text()345 assert data["expected"] in result, "创建失败, 断言失败"346if __name__ == "__main__":...

Full Screen

Full Screen

test_d_suffix.py

Source:test_d_suffix.py Github

copy

Full Screen

1import pytest2from data.suffix_data import SuffixData3# 改变输出结果4add_suffix_Chinese_ids = [5 "测试:{}->[预期:{}]".6 format(data["case"], data["expected"]) for data in SuffixData.add_suffix_Chinese_data7]8add_suffix_English_ids = [9 "测试:{}->[预期:{}]".10 format(data["case"], data["expected"]) for data in SuffixData.add_suffix_English_data11]12add_suffix_english_ids = [13 "测试:{}->[预期:{}]".14 format(data["case"], data["expected"]) for data in SuffixData.add_suffix_english_data15]16add_suffix_number_ids = [17 "测试:{}->[预期:{}]".18 format(data["case"], data["expected"]) for data in SuffixData.add_suffix_number_data19]20add_suffix_halfSymbol_ids = [21 "测试:{}->[预期:{}]".22 format(data["case"], data["expected"]) for data in SuffixData.add_suffix_halfSymbol_data23]24add_suffix_entireSymbol_ids = [25 "测试:{}->[预期:{}]".26 format(data["case"], data["expected"]) for data in SuffixData.add_suffix_entireSymbol_data27]28add_suffix_superLong64_ids = [29 "测试:{}->[预期:{}]".30 format(data["case"], data["expected"]) for data in SuffixData.add_suffix_superLong64_data31]32add_suffix_superLong65_ids = [33 "测试:{}->[预期:{}]".34 format(data["case"], data["expected"]) for data in SuffixData.add_suffix_superLong65_data35]36search_suffix_English_ids = [37 "测试:{}->[预期:{}]".38 format(data["case"], data["expected"]) for data in SuffixData.search_suffix_English_data39]40search_suffix_number_ids = [41 "测试:{}->[预期:{}]".42 format(data["case"], data["expected"]) for data in SuffixData.search_suffix_number_data43]44search_suffix_halfSymbol_ids = [45 "测试:{}->[预期:{}]".46 format(data["case"], data["expected"]) for data in SuffixData.search_suffix_halfSymbol_data47]48search_suffix_entireSymbol_ids = [49 "测试:{}->[预期:{}]".50 format(data["case"], data["expected"]) for data in SuffixData.search_suffix_entireSymbol_data51]52none_suffix_ids = [53 "测试:{}->[预期:{}]".54 format(data["case"], data["expected"]) for data in SuffixData.none_suffix_data55]56cancel_suffix_ids = [57 "测试:{}->[预期:{}]".58 format(data["case"], data["expected"]) for data in SuffixData.cancel_suffix_data59]60delete_suffix_noSelect_ids = [61 "测试:{}->[预期:{}]".62 format(data["case"], data["expected"]) for data in SuffixData.delete_suffix_noSelect_data63]64delete_suffix_single_ids = [65 "测试:{}->[预期:{}]".66 format(data["case"], data["expected"]) for data in SuffixData.delete_suffix_single_data67]68delete_suffix_employ_ids = [69 "测试:{}->[预期:{}]".70 format(data["case"], data["expected"]) for data in SuffixData.delete_suffix_employ_data71]72delete_suffix_multipleChoice_ids = [73 "测试:{}->[预期:{}]".74 format(data["case"], data["expected"]) for data in SuffixData.delete_suffix_multipleChoice_data75]76delete_suffix_allSelect_ids = [77 "测试:{}->[预期:{}]".78 format(data["case"], data["expected"]) for data in SuffixData.delete_suffix_allSelect_data79]80#导入文件后缀名数据81suffix_name = SuffixData.test_suffix_data82@pytest.mark.loginTest83class Test_Suffix(object):84 """文件后缀名过滤测试"""85 suffix_data = SuffixData86 @pytest.mark.parametrize("data", suffix_data.cancel_suffix_data, ids=cancel_suffix_ids)87 def test_create_suffix_cancel(self, login, refresh_page, data):88 """添加文件后缀名过滤测试,取消"""89 suffix_page = login[4]90 suffix_page.add_suffix_cancel()91 result = suffix_page.cancel_suffix_text()92 assert data["expected"] in result, "添加失败, 断言失败"93 @pytest.mark.parametrize("data", suffix_data.add_suffix_Chinese_data, ids=add_suffix_Chinese_ids)94 def test_create_suffix_Chinese(self, login, refresh_page, data):95 """添加文件后缀名过滤测试,中文后缀"""96 suffix_page = login[4]97 suffix_page.add_suffix_process(suffix_name[0])98 result = suffix_page.add_suffix_exception_text()99 assert data["expected"] in result, "添加失败, 断言失败"100 @pytest.mark.parametrize("data", suffix_data.add_suffix_English_data, ids=add_suffix_English_ids)101 def test_create_suffix_English(self, login, refresh_page, data):102 """添加文件后缀名过滤测试,英文大写后缀"""103 suffix_page = login[4]104 suffix_page.add_suffix_process(suffix_name[1])105 result = suffix_page.add_suffix_exception_text()106 assert data["expected"] in result, "添加失败, 断言失败"107 @pytest.mark.parametrize("data", suffix_data.add_suffix_english_data, ids=add_suffix_english_ids)108 def test_create_suffix_english(self, login, refresh_page, data):109 """添加文件后缀名过滤测试,英文小写后缀"""110 suffix_page = login[4]111 suffix_page.add_suffix_process(suffix_name[2])112 result = suffix_page.add_suffix_text()113 assert data["expected"] in result, "添加成功, 断言成功"114 @pytest.mark.parametrize("data", suffix_data.add_suffix_number_data, ids=add_suffix_number_ids)115 def test_create_suffix_number(self, login, refresh_page, data):116 """添加文件后缀名过滤测试,数字后缀"""117 suffix_page = login[4]118 suffix_page.add_suffix_process(suffix_name[3])119 result = suffix_page.add_suffix_text()120 assert data["expected"] in result, "添加成功, 断言成功"121 @pytest.mark.parametrize("data", suffix_data.add_suffix_halfSymbol_data, ids=add_suffix_halfSymbol_ids)122 def test_create_suffix_halfSymbol(self, login, refresh_page, data):123 """添加文件后缀名过滤测试,半角符号后缀"""124 suffix_page = login[4]125 suffix_page.add_suffix_process(suffix_name[4])126 result = suffix_page.add_suffix_text()127 assert data["expected"] in result, "添加成功, 断言成功"128 @pytest.mark.parametrize("data", suffix_data.add_suffix_entireSymbol_data, ids=add_suffix_entireSymbol_ids)129 def test_create_suffix_entireSymbol(self, login, refresh_page, data):130 """添加文件后缀名过滤测试,全角符号后缀"""131 suffix_page = login[4]132 suffix_page.add_suffix_process(suffix_name[5])133 result = suffix_page.add_suffix_text()134 assert data["expected"] in result, "添加成功, 断言成功"135 @pytest.mark.parametrize("data", suffix_data.add_suffix_superLong64_data, ids=add_suffix_superLong64_ids)136 def test_create_suffix_superLong64(self, login, refresh_page, data):137 """添加文件后缀名过滤测试,超长后缀64位字符"""138 suffix_page = login[4]139 suffix_page.add_suffix_process(suffix_name[6])140 result = suffix_page.add_suffix_text()141 assert data["expected"] in result, "添加成功, 断言成功"142 @pytest.mark.parametrize("data", suffix_data.add_suffix_superLong65_data, ids=add_suffix_superLong65_ids)143 def test_create_suffix_superLong65(self, login, refresh_page, data):144 """添加文件后缀名过滤测试,超长后缀65位字符"""145 suffix_page = login[4]146 suffix_page.add_suffix_process(suffix_name[7])147 result = suffix_page.add_suffix_exception_text()148 assert data["expected"] in result, "添加失败, 断言失败"149 @pytest.mark.parametrize("data", suffix_data.search_suffix_English_data, ids=search_suffix_English_ids)150 def test_search_suffix_English(self, login, refresh_page, data):151 """搜索文件后缀名过滤测试,英文搜索(不区分大小写)"""152 suffix_page = login[4]153 suffix_page.search_suffix_process(suffix_name[2])154 result = suffix_page.search_suffix_text()155 assert data["expected"] in result, "搜索成功, 断言成功"156 @pytest.mark.parametrize("data", suffix_data.search_suffix_number_data, ids=search_suffix_number_ids)157 def test_search_suffix_number(self, login, refresh_page, data):158 """搜索文件后缀名过滤测试,数字搜索"""159 suffix_page = login[4]160 suffix_page.search_suffix_process(suffix_name[3])161 result = suffix_page.search_suffix_text()162 assert data["expected"] in result, "搜索成功, 断言成功"163 @pytest.mark.parametrize("data", suffix_data.search_suffix_halfSymbol_data, ids=search_suffix_halfSymbol_ids)164 def test_search_suffix_halfSymbol(self, login, refresh_page, data):165 """搜索文件后缀名过滤测试,半角字符搜索"""166 suffix_page = login[4]167 suffix_page.search_suffix_process(suffix_name[4])168 result = suffix_page.search_suffix_text()169 assert data["expected"] in result, "搜索成功, 断言成功"170 @pytest.mark.parametrize("data", suffix_data.search_suffix_entireSymbol_data, ids=search_suffix_entireSymbol_ids)171 def test_search_suffix_entireSymbol(self, login, refresh_page, data):172 """搜索文件后缀名过滤测试,全角字符搜索"""173 suffix_page = login[4]174 suffix_page.search_suffix_process(suffix_name[5])175 result = suffix_page.search_suffix_text()176 assert data["expected"] in result, "搜索成功, 断言成功"177 @pytest.mark.parametrize("data", suffix_data.none_suffix_data, ids=none_suffix_ids)178 def test_create_suffix_directSave(self, login, refresh_page, data):179 """添加文件后缀名过滤测试,直接保存"""180 suffix_page = login[4]181 suffix_page.add_suffix_directSave()182 result = suffix_page.add_suffix_exception_text()183 assert data["expected"] in result, "添加失败, 断言失败"184 @pytest.mark.parametrize("data", suffix_data.delete_suffix_noSelect_data, ids=delete_suffix_noSelect_ids)185 def test_delete_suffix_noSelect(self, login, refresh_page, data):186 """删除文件后缀名过滤测试,不选择列表"""187 suffix_page = login[4]188 suffix_page.delete_suffix_noSelect()189 result = suffix_page.add_suffix_exception_text()190 assert data["expected"] in result, "删除失败, 断言失败"191 @pytest.mark.parametrize("data", suffix_data.delete_suffix_single_data, ids=delete_suffix_single_ids)192 def test_delete_suffix_single(self, login, refresh_page, data):193 """删除文件后缀名过滤测试,单选未被任务使用"""194 suffix_page = login[4]195 suffix_page.delete_suffix_single()196 result = suffix_page.add_suffix_text()197 assert data["expected"] in result, "删除成功, 断言成功"198 @pytest.mark.xfail(condition=2 > 1, reason="未建立任务")199 @pytest.mark.parametrize("data", suffix_data.delete_suffix_employ_data, ids=delete_suffix_employ_ids)200 def test_delete_suffix_singleEmploy(self, login, refresh_page, data):201 """删除文件后缀名过滤测试,单选被任务使用"""202 suffix_page = login[4]203 suffix_page.delete_suffix_singleEmploy()204 result = suffix_page.add_suffix_text()205 assert data["expected"] in result, "删除失败, 断言失败"206 @pytest.mark.parametrize("data", suffix_data.delete_suffix_multipleChoice_data, ids=delete_suffix_multipleChoice_ids)207 def test_delete_suffix_multipleChoice(self, login, refresh_page, data):208 """删除文件后缀名过滤测试,多选删除"""209 suffix_page = login[4]210 suffix_page.delete_suffix_multipleChoice()211 result = suffix_page.add_suffix_text()212 assert data["expected"] in result, "删除成功, 断言成功"213 @pytest.mark.parametrize("data", suffix_data.delete_suffix_allSelect_data, ids=delete_suffix_allSelect_ids)214 def test_delete_suffix_allSelect(self, login, refresh_page, data):215 """删除文件后缀名过滤测试,全选"""216 suffix_page = login[4]217 suffix_page.delete_suffix_allSelect()218 result = suffix_page.add_suffix_text()219 assert data["expected"] in result, "删除成功, 断言失败"220if __name__ == "__main__":...

Full Screen

Full Screen

test_instructor_information.py

Source:test_instructor_information.py Github

copy

Full Screen

...14 DriverUtils.quit_driver()15 @pytest.mark.run(order=52)16 # @pytest.mark.skipif(condition=True, reason=None)17 def test_query(self):18 self.resources_sort_page.refresh_page()19 self.resources_sort_page.click_resources_manage()20 self.ins_info_page.click_lecturer_and_tutor_btn()21 self.ins_info_page.click_lecturer_info_btn()22 self.ins_info_page.input_keyword_search("张三")23 self.ins_info_page.click_keys_enter(self.ins_info_page.keyword_search)24 self.ins_info_page.refresh_page()25 self.ins_info_page.click_lecturer_type_filter()26 self.ins_info_page.click_inside_lecturer()27 self.ins_info_page.click_lecturer_type_filter()28 self.ins_info_page.click_outside_lecturer()29 self.ins_info_page.refresh_page()30 self.ins_info_page.click_teach_type_filter()31 self.ins_info_page.click_first_btn()32 self.ins_info_page.refresh_page()33 self.ins_info_page.click_lecturer_level_filter()34 self.ins_info_page.click_primary_lecturer()35 self.ins_info_page.click_lecturer_level_filter()36 self.ins_info_page.click_intermediate_lecturer()37 self.ins_info_page.refresh_page()38 self.ins_info_page.click_status_filter()39 self.ins_info_page.click_enable_btn()40 self.ins_info_page.click_status_filter()41 self.ins_info_page.click_disable_btn()42 @pytest.mark.run(order=53)43 # @pytest.mark.skipif(condition=True, reason=None)44 def test_add_outside_lecturer(self):45 self.resources_sort_page.refresh_page()46 self.ins_info_page.click_add_lecturer_btn()47 self.ins_info_page.click_add_outside_lecturer()48 self.ins_info_page.input_lecturer_name("张三{}".format(time.strftime("%M%S")))49 self.ins_info_page.input_account("{}".format(time.strftime("%H%M%S")))50 self.ins_info_page.select_sex_radio()51 self.ins_info_page.click_determine_btn()52 @pytest.mark.run(order=54)53 # @pytest.mark.skipif(condition=True, reason=None)54 def test_modify_lecturer_info(self):55 self.ins_info_page.refresh_page()56 self.ins_info_page.click_name_btn()57 self.ins_info_page.clear_lecturer_name_input()58 self.ins_info_page.input_lecturer_name("修改后{}".format(time.strftime("%M%S")))59 self.ins_info_page.clear(self.ins_info_page.account_input)60 self.ins_info_page.input_account("{}".format(time.strftime("%H%M%S")))61 self.ins_info_page.click_determine_btn()62 @pytest.mark.run(order=55)63 # @pytest.mark.skipif(condition=True, reason=None)64 def test_remove_and_disable(self):65 self.ins_info_page.refresh_page()66 self.ins_info_page.click_disable1_btn()67 self.ins_info_page.click_determine1_btn()68 @pytest.mark.run(order=56)69 # @pytest.mark.skipif(condition=True, reason=None)70 def test_add_inside_lecturer(self):71 self.ins_info_page.refresh_page()72 self.ins_info_page.click_add_lecturer_btn()73 self.ins_info_page.click_add_inside_lecturer()74 self.ins_info_page.click_lecturer_name_input1()75 self.ins_info_page.click_select_inside_lecturer()76 self.ins_info_page.click_determine2_btn()...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run SeleniumBase automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful