修改等待时间

This commit is contained in:
马三炮 2025-04-16 10:25:01 +08:00
parent cf3314859c
commit 84304f0953
5 changed files with 8 additions and 7 deletions

View File

@ -100,21 +100,22 @@ public class AutoMain {
/**
* 第二步 用户登录
*/
Thread.sleep(3000);
log.info("使用账号:" + userName + ",进行登录---------");
//输入用户名
webDriver.findElement(By.id("username")).sendKeys(userName);
log.info("输入用户名------------");
Thread.sleep(300);
Thread.sleep(1000);
//输入密码
webDriver.findElement(By.id("password")).sendKeys(pass);
log.info("输入密码------------");
Thread.sleep(300);
Thread.sleep(1000);
//系统登录
webDriver.findElement(By.id("submi")).click();
log.info("系统登录------------");
Thread.sleep(800);
Thread.sleep(1000);
isAlert();
}

View File

@ -64,7 +64,7 @@ public class DutyChangeShifts {
}
}
log.info("交接班地址:"+xpaht+"----------");
Thread.sleep(1000*2);
Thread.sleep(5000);
webDriver.findElement(By.xpath(xpaht)).click();
log.info("定位交接班并点击2----------");
Thread.sleep(5000);

View File

@ -74,7 +74,7 @@ public class DutyClock {
}
}
Thread.sleep(1000 * 4);
Thread.sleep(7000);
webDriver.findElement(By.xpath(xpaht)).click();
log.info("打卡签到----------");
Thread.sleep(1000 * 5);

View File

@ -64,7 +64,7 @@ public class DutyDailyOp {
//定位值班日报并点击
webDriver.findElement(By.id("tab-4")).click();
log.info("定位值班日报并点击-----------");
Thread.sleep(3000);
Thread.sleep(5000);
//早报编辑标签定位
String zaoBxPath = "//*[@id=\"pane-4\"]/div/div[3]/div/div/div[3]/table/tbody/tr[1]/td[5]/div/div/p[1]";

View File

@ -57,7 +57,7 @@ public class DutyLogIOp {
//退出当前iframe,进入到日报编辑iframe
webDriver.switchTo().defaultContent();
log.info("退出当前iframe----------");
Thread.sleep(5000);
Thread.sleep(7000);
//定位日志编辑iframe的标签
WebElement dutyEditIframe = webDriver.findElement(By.id("add-local-zbrzbz"));