automation testing using javascript