public void DoRegistration() { //Stopwatch sw = new Stopwatch(); //sw.Start(); //new Helpers(driver).WaitForElementToBeExist(driver, Initial, 3); //new Helpers.Validations(driver).ValidateElementIsDisplayed(driver,Initial); //new Helpers.Validations(driver).ValidateElementIsEnabled(driver, Initial); //new Helpers.BasicMethods(driver).TextBox(driver, Initial, "Somala", Initial.GetAttribute("id")); //new Helpers(driver).WaitForElementToBeExist(driver, FirstName, 3); //new Helpers.Validations(driver).ValidateElementIsDisplayed(driver, FirstName); //new Helpers.Validations(driver).ValidateElementIsEnabled(driver, FirstName); //new Helpers.BasicMethods(driver).TextBox(driver, FirstName, "Rupesh", FirstName.GetAttribute("id")); //new Helpers(driver).WaitForElementToBeExist(driver, MiddleName, 15); //new Helpers.Validations(driver).ValidateElementIsDisplayed(driver, MiddleName); //new Helpers.Validations(driver).ValidateElementIsEnabled(driver, MiddleName); //new Helpers.BasicMethods(driver).TextBox(driver, MiddleName, "Kumar", MiddleName.GetAttribute("id")); //sw.Stop(); //var seconds = sw.Elapsed; //Console.WriteLine($"Time took for DoRegistration() is {seconds}"); Stopwatch sw = new Stopwatch(); sw.Start(); Helpers helpers = new Helpers(driver); Helpers.BasicMethods basicMethods = new Helpers.BasicMethods(driver); Helpers.Validations validations = new Helpers.Validations(driver); ScreenShot screenshot = new ScreenShot(driver); screenshot.Save(driver, "Registration", 1, "while page loaded completely"); helpers.WaitForElementToBeExist(driver, Initial, 15); validations.ValidateElementIsDisplayed(driver, Initial); validations.ValidateElementIsEnabled(driver, Initial); basicMethods.TextBox(driver, Initial, "Somala", Initial.GetAttribute("id")); helpers.WaitForElementToBeExist(driver, FirstName, 15); validations.ValidateElementIsDisplayed(driver, FirstName); //validations.ValidateRegex(driver,FirstName, "Username"); validations.ValidateElementIsEnabled(driver, FirstName); basicMethods.TextBox(driver, FirstName, "Rupesh", FirstName.GetAttribute("id")); helpers.WaitForElementToBeExist(driver, MiddleName, 15); validations.ValidateElementIsDisplayed(driver, MiddleName); validations.ValidateElementIsEnabled(driver, MiddleName); basicMethods.TextBox(driver, MiddleName, "Kumar", MiddleName.GetAttribute("id")); screenshot.Save(driver, "Registration", 1, "after page loaded with details"); sw.Stop(); var seconds = sw.Elapsed; Console.WriteLine("Time took for DoRegistration() is {0:hh\\:mm\\:ss}", seconds); }