RE: How to write JavascriptExecutor.excuteScript()method to highlight an element



JavascriptExecutor js=(JavascriptExecutor)driver;

WebElement username= driver.findElement(“email”));

I want to understand below line….

js.executeScript(“arguments[0].setAttribute(‘style’, arguments[1]);”, username, “color: orange; border: 4px solid orange;”);

snpanigrahi9 Train Asked on November 19, 2014 in Selenium WebDriver.
Add Comment
1 Answers
Best answer


Try the below tutorial, it might throw some light.

Lakshay Sharma

Professor Answered on November 20, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.