系统更新

This commit is contained in:
zfh 2025-02-28 16:29:00 +08:00
parent 1013f73e14
commit bab94a89ab
3 changed files with 47 additions and 2 deletions

View File

@ -71,7 +71,18 @@ public class DutyChangeShifts {
//交接事项说明
if (type == 1) {
// /html/body/div[3]/div/div[2]/div/form/div[7]/div/div[1]/textarea
webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[2]/div/div[1]/textarea")).sendKeys("正常");
// webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[2]/div/div[1]/textarea")).sendKeys("正常");
try {
webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/form/div[2]/div/div[1]/textarea")).sendKeys("正常");
}catch (Exception e){
log.info("交接事项说明div[3]不存在----------");
}
try {
webDriver.findElement(By.xpath("/html/body/div[8]/div/div[2]/div/form/div[2]/div/div[1]/textarea")).sendKeys("正常");
}catch (Exception e){
log.info("交接事项说明div[8]不存在----------");
}
log.info("交接事项说明----------");
Thread.sleep(500);
//提交
@ -347,4 +358,4 @@ public class DutyChangeShifts {
// Thread.sleep(300);
}
}
}

View File

@ -73,6 +73,24 @@ public class DutyClock {
xpaht = "//*[@id=\"pane-2\"]/div/div[3]/div[2]/div[1]/div[2]/button[2]";
}
}
//判断是否有相应的元素
try{
Thread.sleep(2000);
webDriver.findElement(By.xpath("html/body/div[6]/div/div[3]/button[2]"));
log.info("是否确认签到----------");
}catch (Exception e){
log.info("无确认框,在时间范围内----------");
}
//判断是否有相应的元素
try{
Thread.sleep(2000);
webDriver.findElement(By.xpath("html/body/div[2]/div/div[3]/button[2]"));
log.info("是否确认签到----------");
}catch (Exception e){
log.info("无确认框,在时间范围内----------");
}
Thread.sleep(1000 * 4);
webDriver.findElement(By.xpath(xpaht)).click();
log.info("打卡签到----------");

View File

@ -324,6 +324,22 @@ public class DutyLogIOp {
log.info("提交日志----------");
Thread.sleep(500);
//判断是否有相应的元素
try{
Thread.sleep(2000);
webDriver.findElement(By.xpath("html/body/div[3]/div/div[3]/button[2]"));
log.info("是否确认签到----------");
}catch (Exception e){
log.info("无确认框在时间范围内div[3]----------");
}
try{
Thread.sleep(2000);
webDriver.findElement(By.xpath("html/body/div[4]/div/div[3]/button[2]"));
log.info("是否确认签到----------");
}catch (Exception e){
log.info("无确认框在时间范围内div[4]----------");
}
//点击弹出框确认
WebElement qrBtn = webDriver.findElement(By.xpath("/html/body/div[4]/div/div[3]/button[2]"));