Code Snippets to work effectively with selenium