added unittests and tear down of browser