Using Selenium 2 Python webdriver:
I encountered an issue where I needed to click on a hidden element due to a hover effect. In search of solutions to unhide and select the element, I came across the following examples:
Example in Java:
JavascriptExecutor je = (JavascriptExecutor) webDriver();
Another example:
browser.execute_script("document.getElementsByClassName('classname').style.display='block'")
However, running the above example resulted in the following exception:
selenium.common.exceptions.WebDriverException: Message: ''
I am unsure if any additional class is required for executing the javascript. Any guidance on what I might be missing would be greatly appreciated.