On my project i have 4 different environment. Dev,stag,uat and prod. So i need to run a test case for all four environments as a one test case.
Only the change to the code will be web driver URL.
So below is my AssemblyInitialize
and in here im trying open the webdriver with two of my environments.
but it is not going to work.
[AssemblyInitialize]
public static void setupDriver(TestContext TestContext)
{
string[] array = new string[2];
array[0] = URL1;
array[1] = URL2;
foreach (var item in array)
{
Driver = new ChromeDriver(ChromeDriverFilePath);
Driver.Navigate().GoToUrl(item);
Driver.Manage().Window.Maximize();
SetupElm elm = new SetupElm();
elm.IdentityServer.Click();
Extent = new ExtentReports(ExtentHTMLReportPath, true);
}