Monday, February 1, 2016

Highlight Web Element

/**
* @author Syam
* @param driver
* @param element
*/
public static void highlightElement(WebDriver driver, WebElement element) {
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].setAttribute('style', arguments[1]);",
element, "border: 2px solid DeepPink;");
}

No comments:

Post a Comment