SyntaxFix
Write A Post
Hire A Developer
Questions
WebElement element = driver.findElement(By.id("foo")); String contents = (String)((JavascriptExecutor)driver).executeScript("return arguments[0].innerHTML;", element);
This code really works to get JavaScript from source as well!