I am using the python unit testing library (unittest) with selenium webdriver. I am trying to find an element by it's name. About half of the time, the tests throw a NoSuchElementException and the other time it does not throw the exception. 
I was wondering if it had to do with the selenium webdriver not waiting long enough for the page to load.
You need to have a waitUntil (your element loads). If you are sure that your element will eventually appear on the page, this will ensure that what ever validations will only occur after your expected element is loaded.
Selenium Webdriver - NoSuchElementExceptions