error while writing automation test - C#