// public void CreateTopLevelCustomerDetails(string LineOfBusiness,string Band) public void CreateTopLevelCustomerDetails() { int srow = ConfigReader.srow; int erow = ConfigReader.erow; for (int i = srow; i <= erow; i++) { try { //var autoIT=new AutoItX3(); //IE System.Diagnostics.Process.Start(@"D:\Shell Framework\AutomationFramework -Nunit - Parallel\AutomationFramework\Autoitscript\HandleAuthenticationWindow.exe"); DriverContext.GetDriver <IWebDriver>().Navigate().GoToUrl("http://ws08r2/gfnlaunch"); //chrome // DriverContext.GetDriver<IWebDriver>().Navigate().GoToUrl("http://*****:*****@ws08r2/gfnlaunch"); //var driverHandles = DriverContext.GetDriver<IWebDriver>().WindowHandles; //var test = autoIT.Winactive; //SendKeys.Send(@"code\shwet"); // DriverContext.GetDriver<IWebDriver>() = GetChromeDriver(); DriverContext.InitDriver(_browsertype); var autoIT = new AutoItX3(); string title = DriverContext.GetDriver <IWebDriver>().Title; string testmethodname = TestContext.CurrentContext.Test.Name; LogHelper.WriteLog(ConfigReader.logFilePath, "****************************"); LogHelper.WriteLog(ConfigReader.logFilePath, "Executing Test Case-> " + testmethodname); LogHelper.WriteLog(ConfigReader.logFilePath, "****************************"); Customer c = new Customer(); c.selectcolco(ConfigReader.GetColco); string customerERP = c.CreateCustomerDetails(ConfigReader.GetColco, i); DriverContext.CloseDriver(); } catch (Exception e) { Debug.WriteLine(e.Message); } } }
public void ReSubmitFormwithMessage() { int srow = ConfigReader.srow; int erow = ConfigReader.erow; for (int i = srow; i <= erow; i++) { try { DriverContext.InitDriver(_browsertype); ContactUs c = new ContactUs(); c.FillFormwithMessage(i); Thread.Sleep(5000); DriverContext.CloseDriver(); } catch (Exception e) { Debug.WriteLine(e.Message); } } }