Last active
July 12, 2016 08:53
-
-
Save henrrich/11c21b9617f7335110c721e2b30dda4b to your computer and use it in GitHub Desktop.
method to highlight webelement in yellow color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void highlight(WebElement element, long highlightInterval) throws InterruptedException { | |
int flexibleWait = 5; | |
long pollingInterval = 500; | |
WebDriverWait wait = new WebDriverWait(ngDriver, flexibleWait); | |
wait.pollingEvery(pollingInterval, TimeUnit.MILLISECONDS); | |
wait.until(ExpectedConditions.visibilityOf(element)); | |
executeScript("arguments[0].style.border='3px solid yellow'", element); | |
Thread.sleep(highlightInterval); | |
//executeScript("arguments[0].style.border=''", element); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment