Best Python code snippet using SeleniumBase
test_c_type.py
Source:test_c_type.py
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__":...
test_d_suffix.py
Source:test_d_suffix.py
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__":...
test_instructor_information.py
Source:test_instructor_information.py
...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()...
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!