How to use javascript to set attribute of selected web element using selenium Webdriver using java?
Along the lines of:
JavascriptExecutor js = (JavascriptExecutor) driver;
WebElement element = driver.findElement(By.linkText("Click ME"));
js.executeScript("arguments[0].setAttribute('attr', '10')",element);