how to write automation scripts in selenium