Problem I was facing
Recently I was using Selenium Webdriver for one of my project and got ElementNotVisible exception, even though element was visible on screen.I went through the Webdriver old forum posts but could not find exact solution. But forum posts and webdriver FAQ gave me some good pointers to solve the problem.
Cause of the problem I figured out
This issue occur to me due to 2 reasons.
First reason:-I was using relative Xpath and same Xpath exists on page more than once.There could be many reason for that, but in my case element I was trying to click, was under a dialog box and HTML page has template for that dialog box. Template Dialog box was hidden on page.When I was using relative Xpath,selenium was trying to hit hidden element inside the template dialog box and giving exception ElementNotVisibleException.
solution:- Change Xpath in your code, so Selenium don't get confuse between two elements.