public static void Draw_CollectDriverPath(String targetbrowser) { Models.Browser targetBrowser = new Models.Browser(); Console.WriteLine("\n"); Console.WriteLine("Please, Download the webdriver for your targetted browser from seleniumHQ website then Place it in the below path. \n"); Console.WriteLine("C:\\Selenium\\Browsers Drivers\n"); Console.WriteLine("Once done, press enter, please."); Console.ReadLine(); targetBrowser.setBrowser_Name(targetbrowser); targetBrowser.setDriverPath("C:\\Selenium\\Browsers Drivers"); Draw_CollectDriverName(targetBrowser); }
public static void Draw_CollectDriverName(Models.Browser targetBrowser) { Console.WriteLine("\n"); Console.WriteLine("Now, to the driver name.\n"); Console.WriteLine("Please, make sure to have the driver name as below according to each browser.\n"); foreach (string x in Helpers.BrowsersEntities.BrowsersDriversNames.Keys) { Console.WriteLine(x + ">>" + Helpers.BrowsersEntities.BrowsersDriversNames[x]); } Console.WriteLine("Once done, press enter, please."); targetBrowser.setDriverName(Helpers.BrowsersEntities.BrowsersDriversNames[targetBrowser.getBrowserName()]); Draw_CollectBrowserPath(targetBrowser); }
public static void Draw_CollectBrowserPath(Models.Browser targetBrowser) { Console.WriteLine("\n"); Console.WriteLine("Now, to the browser path.\n"); Console.WriteLine("Please, make sure to have the browser's installation path as below according to each browser. \n"); Console.WriteLine("**Note: If your selected browser is not mentioned below, then the path is not required and can be any path."); foreach (string x in Helpers.BrowsersEntities.BrowsersPaths.Keys) { Console.WriteLine(x + ">>" + Helpers.BrowsersEntities.BrowsersPaths[x]); } Console.WriteLine("Once done, press enter, please."); if (Helpers.BrowsersEntities.BrowsersPaths.ContainsKey(targetBrowser.getBrowserName())) { targetBrowser.setBrowserPath(Helpers.BrowsersEntities.BrowsersPaths[targetBrowser.getBrowserName()]); } Models.TestCaseModel TestCase = new Models.TestCaseModel(); TestCase.setBrowserObject(InvocationController.CoreAccess_Controller(targetBrowser)); Draw_UserChoosingURL(TestCase); }