更新系统
This commit is contained in:
parent
0bb0575106
commit
ceaa24dcc5
|
|
@ -38,7 +38,7 @@ public class AutoMain {
|
|||
System.setProperty(DataConfig.DRIVE_NAME, DataConfig.drivePath);
|
||||
ChromeOptions option = new ChromeOptions();
|
||||
//添加浏览器地址
|
||||
option.setBinary("C:\\Users\\Administrator\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe");
|
||||
option.setBinary("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe");
|
||||
option.addArguments("--start-maximized");
|
||||
option.addArguments("--force-device-scale-factor=0.75");
|
||||
option.addArguments("disable-infobars");
|
||||
|
|
@ -132,9 +132,26 @@ public class AutoMain {
|
|||
|
||||
|
||||
//执行鼠标悬停动作-常态值班
|
||||
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(2000);
|
||||
//执行鼠标悬停动作-常态值班
|
||||
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(2000);
|
||||
//执行鼠标悬停动作-常态值班
|
||||
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);
|
||||
|
||||
|
||||
|
|
@ -191,10 +208,21 @@ public class AutoMain {
|
|||
Thread.sleep(300);
|
||||
|
||||
//执行鼠标悬停动作-检查操练管理
|
||||
String ctzbXpath = "//*[@id=\"" + attributeId + "\"]/div/div[1]/div[2]/div[5]";
|
||||
webDriver.findElement(By.xpath(ctzbXpath)).click();
|
||||
// WebElement wectzb =
|
||||
// action.moveToElement(wectzb).build().perform();
|
||||
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("无确认框,在时间范围内----------");
|
||||
}
|
||||
Thread.sleep(1500);
|
||||
|
||||
//打开检查计划页面
|
||||
|
|
|
|||
|
|
@ -50,8 +50,22 @@ public class DutyLogIOp {
|
|||
// /html/body/div[2] 弹窗 您没有填写值班日志的排班班次
|
||||
|
||||
//定位写日志标签,打开日志页面
|
||||
webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button")).click();
|
||||
log.info("定位写日志标签,打开日志页面----------");
|
||||
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("无确认框,在时间范围内----------/div/div[2]/div[2]/button");
|
||||
}
|
||||
try {
|
||||
//定位写日志标签,打开日志页面
|
||||
webDriver.findElement(By.xpath("//*[@id=\"pane-5\"]/div/div[2]/div[2]/button/span")).click();
|
||||
log.info("定位写日志标签,打开日志页面----------/div/div[2]/div[2]/button/span");
|
||||
Thread.sleep(1500);
|
||||
} catch (Exception e) {
|
||||
log.info("无确认框,在时间范围内----------/div/div[2]/div[2]/button/span");
|
||||
}
|
||||
Thread.sleep(300);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue