Enabling a hidden element using Javascript and Webdriver 

Here is the code for you to enable a hidden element using Javascript and Selenium Webdriver:

IJavaScriptExecutor js = driver as IJavaScriptExecutor;
js.ExecuteScript("document.getElementsByName('userfile')[0].style.display='block';");


Author: Pavandeep Puddupakkam on August 9, 2012
Category: WebDriver
Tags: , , ,
Selenium Webdriver Forum -The Online Community for Selenium Webdriver and Selenium RC Users and Professionals

Leave a Reply

Last articles