for (int iCnt = 0; iCnt < 3; iCnt++) {
//Execute javascript
js.executeScript("arguments[0].style.border='2px groove red'", driver.findElement(By.xpath("//div[starts-with(text(), '11.0')]")));
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
js.executeScript("arguments[0].style.border=''", driver.findElement(By.xpath("//div[starts-with(text(), '11.0')]")));
}
}
//Execute javascript
js.executeScript("arguments[0].style.border='2px groove red'", driver.findElement(By.xpath("//div[starts-with(text(), '11.0')]")));
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
js.executeScript("arguments[0].style.border=''", driver.findElement(By.xpath("//div[starts-with(text(), '11.0')]")));
}
}
No comments:
Post a Comment