How to click on hidden element in Selenium WebDriver?
Selenium has been specifically written to NOT allow interaction with hidden elements. The rational is that if a person cannot perform that action, then neither should Selenium. There are two approaches to solve this issue:
Actions
To perform the click via Selenium, you must perform the action a user would do to make that button visible (e.g mouse over event, click another element, etc) then perform the click once visible.
Using JavaScript
However, Selenium does allow you to execute JavaScript within the context of an element, so you could write JavaScript to perform the click event even if it is hidden.