系统更新

This commit is contained in:
zfh 2025-03-04 09:05:42 +08:00
parent 2b60930423
commit 928d0491ed
1 changed files with 15 additions and 4 deletions

View File

@ -82,7 +82,7 @@ public class DutyClock {
//判断是否有相应的元素 //判断是否有相应的元素
try{ try{
Thread.sleep(2000); Thread.sleep(2000);
webDriver.findElement(By.xpath("html/body/div[6]/div/div[3]/button[2]")); webDriver.findElement(By.xpath("html/body/div[6]/div/div[3]/button[2]")).click();
log.info("是否确认签到----------"); log.info("是否确认签到----------");
}catch (Exception e){ }catch (Exception e){
log.info("无确认框,在时间范围内----------"); log.info("无确认框,在时间范围内----------");
@ -90,15 +90,26 @@ public class DutyClock {
//判断是否有相应的元素 //判断是否有相应的元素
try{ try{
Thread.sleep(2000); Thread.sleep(2000);
webDriver.findElement(By.xpath("html/body/div[2]/div/div[3]/button[2]")); webDriver.findElement(By.xpath("html/body/div[2]/div/div[3]/button[2]")).click();
log.info("是否确认签到----------"); log.info("是否确认签到----------");
}catch (Exception e){ }catch (Exception e){
log.info("无确认框,在时间范围内----------"); log.info("无确认框,在时间范围内----------");
} }
try {
//点击弹出框确认
webDriver.findElement(By.xpath("/html/body/div[2]/div/div[2]/div/div[2]/div[1]")).click();
} catch (Exception e) {
log.info("当前打卡确认按钮不存在div[2]");
}
try {
//点击弹出框确认
webDriver.findElement(By.xpath("/html/body/div[3]/div/div[2]/div/div[2]/div[1]")).click();
} catch (Exception e) {
log.info("当前打卡按钮不存在div[3]");
}
//点击弹出框确认 //点击弹出框确认
webDriver.findElement(By.xpath("/html/body/div[2]/div/div[2]/div/div[2]/div[1]")).click(); //webDriver.findElement(By.xpath("/html/body/div[2]/div/div[2]/div/div[2]/div[1]")).click();
log.info("点击弹出框确认----------"); log.info("点击弹出框确认----------");
Thread.sleep(800); Thread.sleep(800);
} }