driver.get("http://www.google.com");
JavascriptExecutor js = (JavascriptExecutor)driver;
WebElement upload = driver.findElement(By.name("btnI"));
((JavascriptExecutor)driver).executeScript("arguments[0].click();", upload);
Thanks for the sample code! But looks like your js var was never used.
ReplyDelete