更新系统

This commit is contained in:
马三炮 2025-08-11 16:02:33 +08:00
parent 84304f0953
commit b06f4a917e
3 changed files with 91 additions and 25 deletions

View File

@ -712,9 +712,9 @@ public class GetBasicData {
logBean.setPower_work_content(data + logContentArrayArray[7]);
logBean.setResource_check_title(logContentArrayArray[9]);
logBean.setResource_check_content(data + checkContentArrayArray[num]);
logBean.setCommunications_test_title("今日开展通信测试1项,均正常");
logBean.setCommunications_test_title("今日开展通信测试1项");
logBean.setCommunications_test_content(communicationTestName + ";" + logContentArrayArray[11]);
logBean.setDaily_operation_title("今日开展日常操练1次");
logBean.setDaily_operation_title("今日开展队伍操练核查1项");
logBean.setDaily_operation_content(dailyExercisesName + ";" + logContentArrayArray[13]);
logBean.setDaily_submission_title(logContentArrayArray[15]);
logBean.setDaily_submission_content(data + logContentArrayArray[16]);
@ -791,9 +791,9 @@ public class GetBasicData {
logBean.setPower_work_content(data + logContentArrayArray[7]);
logBean.setResource_check_title(logContentArrayArray[9]);
logBean.setResource_check_content(data + checkContentArrayArray[num]);
logBean.setCommunications_test_title("今日开展通信测试1项,均正常");
logBean.setCommunications_test_title("今日开展通信测试1项");
logBean.setCommunications_test_content(communicationTestName + ";" + logContentArrayArray[11]);
logBean.setDaily_operation_title("今日开展日常操练1次");
logBean.setDaily_operation_title("今日开展队伍操练核查1项");
logBean.setDaily_operation_content(dailyExercisesName + ";" + logContentArrayArray[13]);
logBean.setDaily_submission_title(logContentArrayArray[15]);
logBean.setDaily_submission_content(data + logContentArrayArray[16]);

View File

@ -167,18 +167,33 @@ public class AutoMain {
WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[6]/span/span" +
"/div"));
action.moveToElement(wegl).build().perform();
Thread.sleep(300);
Thread.sleep(1000);
//获取管理标签中的aria-describedby属性
String attributeId = wegl.getAttribute("aria-describedby");
log.info("管理标签的ID值为" + attributeId);
Thread.sleep(300);
//执行鼠标悬停动作-常态值班
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[4]";
WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath));
action.moveToElement(wectzb).build().perform();
//判断是否有相应的元素
try {
Thread.sleep(1000);
//执行鼠标悬停动作-常态值班
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[4]";
WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath));
action.moveToElement(wectzb).build().perform();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------常态值班");
}
//判断是否有相应的元素
try {
Thread.sleep(1000);
//执行鼠标悬停动作-常态值班
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div/div[4]/div";
WebElement wectzb = webDriver.findElement(By.xpath(ctzbXpath));
action.moveToElement(wectzb).build().perform();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
Thread.sleep(300);
@ -229,9 +244,22 @@ public class AutoMain {
//打开预警响应管理页面
//*[@id=\"" + attributeId + "\"]/div/div[2]/div[2]/div[1]/div[2]
String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div[2]/div[3]";
webDriver.findElement(By.xpath(zbglXpath)).click();
//判断是否有相应的元素
try {
Thread.sleep(2000);
String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div[2]/div[3]";
webDriver.findElement(By.xpath(zbglXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
//判断是否有相应的元素
try {
Thread.sleep(2000);
String zbglXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div/div[3]/div";
webDriver.findElement(By.xpath(zbglXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
log.info("打开预警页面------------");
Thread.sleep(800);
@ -258,7 +286,7 @@ public class AutoMain {
//获取管理标签中的aria-describedby属性 el-popover-7909
String attributeId = wegl.getAttribute("aria-describedby");
log.info("管理标签的ID值为" + attributeId);
Thread.sleep(300);
Thread.sleep(2000);
// //执行鼠标悬停动作-预警行动
@ -297,16 +325,29 @@ public class AutoMain {
WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[6]/span/span" +
"/div"));
action.moveToElement(wegl).build().perform();
Thread.sleep(300);
Thread.sleep(2000);
//获取管理标签中的aria-describedby属性
String attributeId = wegl.getAttribute("aria-describedby");
log.info("管理标签的ID值为" + attributeId);
Thread.sleep(300);
Thread.sleep(2000);
//执行鼠标悬停动作-检查操练管理
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
webDriver.findElement(By.xpath(ctzbXpath)).click();
//判断是否有相应的元素
try {
Thread.sleep(2000);
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
webDriver.findElement(By.xpath(ctzbXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
try {
Thread.sleep(2000);
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div/div[5]/div";
webDriver.findElement(By.xpath(ctzbXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
// WebElement wectzb =
// action.moveToElement(wectzb).build().perform();
// Thread.sleep(300);
@ -361,7 +402,7 @@ public class AutoMain {
WebElement wegl = webDriver.findElement(By.xpath("//*[@id=\"app\"]/div/div[1]/div[6]/div/div/div[6]/span/span" +
"/div"));
action.moveToElement(wegl).build().perform();
Thread.sleep(300);
Thread.sleep(2000);
//获取管理标签中的aria-describedby属性
String attributeId = wegl.getAttribute("aria-describedby");
@ -369,8 +410,21 @@ public class AutoMain {
Thread.sleep(300);
//执行鼠标悬停动作-检查操练管理
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
webDriver.findElement(By.xpath(ctzbXpath)).click();
try {
Thread.sleep(2000);
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
webDriver.findElement(By.xpath(ctzbXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
//判断是否有相应的元素
try {
Thread.sleep(2000);
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div/div/div[5]/div";
webDriver.findElement(By.xpath(ctzbXpath)).click();
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
// WebElement wectzb =
// action.moveToElement(wectzb).build().perform();
// Thread.sleep(300);

View File

@ -49,10 +49,22 @@ public class DutyLogIOp {
// /html/body/div[2] 弹窗 您没有填写值班日志的排班班次
//定位写日志标签打开日志页面
webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button")).click();
log.info("定位写日志标签,打开日志页面----------");
Thread.sleep(1500);
try {
//定位写日志标签打开日志页面
webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button")).click();
log.info("定位写日志标签,打开日志页面----------/div/div[2]/div[2]/button");
Thread.sleep(1500);
} catch (Exception e) {
log.info("无确认框,在时间范围内----------");
}
try {
//定位写日志标签打开日志页面
webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button/span")).click();
log.info("定位写日志标签,打开日志页面----------");
Thread.sleep(1500);
} catch (Exception e) {
log.info("无确认框,在时间范围内----------/div/div[2]/div[2]/button/span");
}
//退出当前iframe,进入到日报编辑iframe
webDriver.switchTo().defaultContent();