Working version of webdriver test. needs clean up