Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/pack/PackHandle.java =================================================================== diff -u -r34125 -r34130 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/pack/PackHandle.java (.../PackHandle.java) (revision 34125) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/pack/PackHandle.java (.../PackHandle.java) (revision 34130) @@ -21,7 +21,7 @@ public static Logger logger = Logger.getLogger(PackHandle.class);//日志器 /** - * 跳转到装配管理标签页 + * 切换到装配管理标签页 */ public void switch_to_pack_frame(){ Utils.driver.switchTo().frame(packPage.get_pack_frame()); Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/personaldesktop/PersonalDesktopHandle.java =================================================================== diff -u -r34001 -r34130 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/personaldesktop/PersonalDesktopHandle.java (.../PersonalDesktopHandle.java) (revision 34001) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/personaldesktop/PersonalDesktopHandle.java (.../PersonalDesktopHandle.java) (revision 34130) @@ -56,7 +56,7 @@ } /** - * 跳转到科室申领标签页 + * 切换到科室申领标签页 */ public void switch_to_apply_frame(){ Utils.driver.switchTo().frame(personalDesktopPage.get_apply_frame()); @@ -78,7 +78,7 @@ } /** - * 跳转到清洗消毒标签页 + * 切换到清洗消毒标签页 */ public void switch_to_wash_frame(){ Utils.driver.switchTo().frame(personalDesktopPage.get_wash_frame()); @@ -102,7 +102,7 @@ } /** - * 跳转到装配管理标签页 + * 切换到装配管理标签页 */ public void switch_to_pack_frame(){ Utils.driver.switchTo().frame(personalDesktopPage.get_pack_frame()); @@ -117,7 +117,7 @@ } /** - * 跳转到审核打包标签页 + * 切换到审核打包标签页 */ public void switch_to_review_frame(){ Utils.driver.switchTo().frame(personalDesktopPage.get_review_frame()); @@ -140,7 +140,7 @@ } /** - * 跳转到灭菌管理标签页 + * 切换到灭菌管理标签页 */ public void switch_to_sterilization_frame(){ Utils.driver.switchTo().frame(personalDesktopPage.get_sterilization_frame()); @@ -154,7 +154,7 @@ } /** - * 跳转到发货计划标签页 + * 切换到发货计划标签页 */ public void switch_to_invoice_plan_frame(){ Utils.driver.switchTo().frame(personalDesktopPage.get_invoice_plan_frame()); @@ -168,7 +168,7 @@ } /** - * 跳转到签收标签页 + * 切换到签收标签页 */ public void switch_to_sign_frame(){ Utils.driver.switchTo().frame(personalDesktopPage.get_sign_frame()); @@ -182,7 +182,7 @@ } /** - * 点击跳转到使用记录标签页 + * 点击切换到使用记录标签页 */ public void switch_to_use_record_frame(){ Utils.driver.switchTo().frame(personalDesktopPage.get_use_record_frame()); @@ -197,7 +197,7 @@ } /** - * 跳转到外来器械申请标签页 + * 切换到外来器械申请标签页 * @return */ public void switch_to_foreign_tousse_application_frame(){ Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/apply/ApplyHandle.java =================================================================== diff -u -r34001 -r34130 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/apply/ApplyHandle.java (.../ApplyHandle.java) (revision 34001) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/apply/ApplyHandle.java (.../ApplyHandle.java) (revision 34130) @@ -272,7 +272,8 @@ public void input_foreign_material_count(int i,String materialCount){ Actions action = new Actions(Utils.driver); action.doubleClick(applyPage.get_foreign_material_count(i)).perform(); - action.sendKeys(materialCount+"\n").perform(); + applyPage.get_foreign_tousse_material_amount_input().clear(); + input_text(applyPage.get_foreign_tousse_material_amount_input(), materialCount+"\n"); } /** Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/pack/PackProxy.java =================================================================== diff -u -r34125 -r34130 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/pack/PackProxy.java (.../PackProxy.java) (revision 34125) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/pack/PackProxy.java (.../PackProxy.java) (revision 34130) @@ -16,9 +16,9 @@ private PackHandle packHandle = new PackHandle(); /** - * 跳转到装配管理标签页 + * 切换到装配管理标签页 */ - @Step("跳转到装配页面frame") + @Step("切换到装配管理标签页frame") public void switch_to_pack_frame(){ packHandle.switch_to_pack_frame(); } Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/personaldesktop/PersonalDesktopProxy.java =================================================================== diff -u -r34001 -r34130 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/personaldesktop/PersonalDesktopProxy.java (.../PersonalDesktopProxy.java) (revision 34001) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/personaldesktop/PersonalDesktopProxy.java (.../PersonalDesktopProxy.java) (revision 34130) @@ -31,9 +31,9 @@ } /** - * 跳转到科室申领标签页 + * 切换到科室申领标签页 */ - @Step("跳转到科室申领标签页") + @Step("切换到科室申领标签页") public void go_apply(){ personalDesktopHandle.click_apply_icon(); personalDesktopHandle.switch_to_apply_frame(); @@ -50,78 +50,78 @@ } /** - * 跳转到清洗消毒标签页 + * 切换到清洗消毒标签页 */ - @Step("跳转到清洗消毒标签页") + @Step("切换到清洗消毒标签页") public void go_wash(){ personalDesktopHandle.click_wash_icon(); personalDesktopHandle.switch_to_wash_frame(); } /** - * 跳转到装配管理标签页 + * 切换到装配管理标签页 * @param taskGroup */ - @Step("跳转到装配管理标签页") + @Step("切换到装配管理标签页") public void go_pack(String taskGroup){ personalDesktopHandle.hover_on_pack_icon(); personalDesktopHandle.click_tack_group(taskGroup); personalDesktopHandle.switch_to_pack_frame(); } /** - * 跳转到审核打包标签页 + * 切换到审核打包标签页 * @param taskGroup */ - @Step("跳转到审核打包标签页") + @Step("切换到审核打包标签页") public void go_review(String taskGroup){ personalDesktopHandle.hover_on_review_icon(); personalDesktopHandle.click_tack_group(taskGroup); personalDesktopHandle.switch_to_review_frame(); } /** - * 跳转到灭菌管理标签页 + * 切换到灭菌管理标签页 * @param sterilizationGroup */ - @Step("跳转到灭菌管理标签页") + @Step("切换到灭菌管理标签页") public void go_sterilization(String sterilizationGroup){ personalDesktopHandle.hover_on_sterilization_icon(); personalDesktopHandle.click_sterilization_group(sterilizationGroup); personalDesktopHandle.switch_to_sterilization_frame(); } /** - * 跳转到发货计划标签页 + * 切换到发货计划标签页 */ - @Step("跳转到发货计划标签页") + @Step("切换到发货计划标签页") public void go_invoice_plan(){ personalDesktopHandle.click_invoice_plan_icon(); personalDesktopHandle.switch_to_invoice_plan_frame(); } /** - * 跳转到物品签收标签页 + * 切换到物品签收标签页 */ - @Step("跳转到物品签收标签页") + @Step("切换到物品签收标签页") public void go_sign(){ personalDesktopHandle.click_sign_icon(); personalDesktopHandle.switch_to_sign_frame(); } /** - * 跳转到使用记录标签页 + * 切换到使用记录标签页 */ - @Step("跳转到使用记录标签页") + @Step("切换到使用记录标签页") public void go_use_record(){ personalDesktopHandle.click_use_record_icon(); personalDesktopHandle.switch_to_use_record_frame(); } /** - * 跳转到外来器械申请标签页 + * 切换到外来器械申请标签页 */ - @Step("跳转到外来器械申请标签页") + @Step("切换到外来器械申请标签页") public void go_foreign_tousse_application_icon(){ personalDesktopHandle.click_foreign_tousse_application_icon(); personalDesktopHandle.switch_to_foreign_tousse_application_frame(); Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/apply/ApplyPage.java =================================================================== diff -u -r34001 -r34130 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/apply/ApplyPage.java (.../ApplyPage.java) (revision 34001) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/apply/ApplyPage.java (.../ApplyPage.java) (revision 34130) @@ -48,7 +48,9 @@ private By addForeignTousseBtn = By.id("addTousseBt-btnInnerEl");//添加外来器械按钮 private By commitForeignTousseBtn = By.id("commitBtn-btnEl");//外来器械申请单的提交按钮 private By commitPrintForeignTousseBtn = By.id("commitPrintBtn");//外来器械申请单的提交并打印按钮 + private By foreignTousseMaterialAmountInput = By.xpath("//*[@role='spinbutton' and @name='amount']");//双击外来器械材料数量后的输入框 + /** * 获取元素:申请物品按钮 * @return @@ -389,4 +391,13 @@ public WebElement get_end_btn(){ return get_element_until_clickable(this.endBtn); } + + + /** + * 获取元素:双击外来器械材料数量后的输入框 + * @return + */ + public WebElement get_foreign_tousse_material_amount_input(){ + return get_element_until_visibility(this.foreignTousseMaterialAmountInput); + } } Index: ssts-web/src/test/resources/test/forgon/disinfectsystem/selenium/config/all/testcase_data.json =================================================================== diff -u -r34125 -r34130 --- ssts-web/src/test/resources/test/forgon/disinfectsystem/selenium/config/all/testcase_data.json (.../testcase_data.json) (revision 34125) +++ ssts-web/src/test/resources/test/forgon/disinfectsystem/selenium/config/all/testcase_data.json (.../testcase_data.json) (revision 34130) @@ -216,9 +216,6 @@ "recycling_basket_barcodes":[ {"basketBarcode":"019000003"} ], - "secondary_recycling_basket_barcodes":[ - {"basketBarcode":"019000001"} - ], "wash_machine":{ "machineName":"清洗机1", "machineBarcode":"010173001" @@ -275,21 +272,18 @@ "apply_depart":"测试手术室", "foreignTousse":[ { - "suppler":"外来器械供应商A", - "foreignTousseName":"外来器械测试A包", - "newDefinition":"true", + "suppler":"广州京弘电子有限公司", + "foreignTousseName":"Test骨钩", + "newDefinition":"false", "materialCounts":[ - {"materialCount":"53"}, - {"materialCount":"132"} + {"materialCount":"133"}, + {"materialCount":"62"} ] } ], "recycling_basket_barcodes":[ {"basketBarcode":"019000003"} ], - "secondary_recycling_basket_barcodes":[ - {"basketBarcode":"019000001"} - ], "wash_machine":{ "machineName":"清洗机1", "machineBarcode":"010173001" Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/testscript/TestMainProcess.java =================================================================== diff -u -r34125 -r34130 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/testscript/TestMainProcess.java (.../TestMainProcess.java) (revision 34125) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/testscript/TestMainProcess.java (.../TestMainProcess.java) (revision 34130) @@ -429,7 +429,6 @@ String applyDepart = foreignTousseProcessJsonObj.getString("apply_depart");//申领科室 String applyType = foreignTousseProcessJsonObj.getString("application_type");//申请单类型 JSONArray recyclingBasketBarcodes = foreignTousseProcessJsonObj.getJSONArray("recycling_basket_barcodes");//回收篮筐条码 - JSONArray secondaryRecyclingBasketBarcodes = foreignTousseProcessJsonObj.getJSONArray("secondary_recycling_basket_barcodes");//二次回收篮筐条码 String disinfectMachineBarcode = foreignTousseProcessJsonObj.getJSONObject("wash_machine").getString("machineBarcode");//清洗机条码 String disinfectProgramBarcode = foreignTousseProcessJsonObj.getJSONObject("wash_program").getString("programBarcode");//清洗程序条码 @@ -550,11 +549,18 @@ //二次回收 personalDesktopProxy.go_recycle(); awaitForRecycleProxy.choose_most_recent_application_by_type("(待归还)"+applyType); - recycleProxy.recycle_by_normal_into_basket(handleUser.getString("barcode"), handleUser.getString("barcode"), secondaryRecyclingBasketBarcodes); + recycleProxy.recycle_by_normal_into_basket(handleUser.getString("barcode"), handleUser.getString("barcode"), recyclingBasketBarcodes); + //关闭回收页面并跳转到个人桌面窗口 Utils.switchBetweenTwoWins(); + + //清洗 + Utils.driver.navigate().refresh(); + personalDesktopProxy.go_wash(); + washProxy.disinfect_by_scan_barcodes(disinfectMachineBarcode, disinfectProgramBarcode, handleUser.getString("barcode"), recyclingBasketBarcodes); //确认归还 + Utils.driver.navigate().refresh(); personalDesktopProxy.go_foreign_tousse_application_icon(); String result = foreignTousseApplicationProxy.select_first_application_to_batch_return(); Assert.assertTrue(result.contains(expect)); @@ -569,7 +575,6 @@ String applyDepart = splitPacketOfForeignTousseProcessJsonObj.getString("apply_depart");//申领科室 String applyType = splitPacketOfForeignTousseProcessJsonObj.getString("application_type");//申请单类型 JSONArray recyclingBasketBarcodes = splitPacketOfForeignTousseProcessJsonObj.getJSONArray("recycling_basket_barcodes");//回收篮筐条码 - JSONArray secondaryRecyclingBasketBarcodes = splitPacketOfForeignTousseProcessJsonObj.getJSONArray("secondary_recycling_basket_barcodes");//二次回收篮筐条码 String disinfectMachineBarcode = splitPacketOfForeignTousseProcessJsonObj.getJSONObject("wash_machine").getString("machineBarcode");//清洗机条码 String disinfectProgramBarcode = splitPacketOfForeignTousseProcessJsonObj.getJSONObject("wash_program").getString("programBarcode");//清洗程序条码 @@ -701,11 +706,18 @@ //二次回收 personalDesktopProxy.go_recycle(); awaitForRecycleProxy.choose_most_recent_application_by_type("(待归还)"+applyType); - recycleProxy.recycle_by_normal_into_basket(handleUser.getString("barcode"), handleUser.getString("barcode"), secondaryRecyclingBasketBarcodes); + recycleProxy.recycle_by_normal_into_basket(handleUser.getString("barcode"), handleUser.getString("barcode"), recyclingBasketBarcodes); + //关闭回收页面并跳转到个人桌面窗口 Utils.switchBetweenTwoWins(); + + //清洗 + Utils.driver.navigate().refresh(); + personalDesktopProxy.go_wash(); + washProxy.disinfect_by_scan_barcodes(disinfectMachineBarcode, disinfectProgramBarcode, handleUser.getString("barcode"), recyclingBasketBarcodes); //确认归还 + Utils.driver.navigate().refresh(); personalDesktopProxy.go_foreign_tousse_application_icon(); String result = foreignTousseApplicationProxy.select_first_application_to_batch_return(); Assert.assertTrue(result.contains(expect)); Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/userecord/UseRecordHandle.java =================================================================== diff -u -r33952 -r34130 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/userecord/UseRecordHandle.java (.../UseRecordHandle.java) (revision 33952) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium3/page/userecord/UseRecordHandle.java (.../UseRecordHandle.java) (revision 34130) @@ -15,7 +15,7 @@ private UseRecordPage userecordPage = new UseRecordPage(); /** - * 点击跳转到使用记录标签页 + * 点击切换到使用记录标签页 */ public void switch_to_use_record_frame(){ Utils.driver.switchTo().frame(userecordPage.get_use_record_frame());