Stub Gen Selenium Tests

This commit is contained in:
6d486f49
2026-05-19 13:36:29 -04:00
parent 5132fd8ca2
commit e86cd5c9c8
11 changed files with 274 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
using NUnit.Framework;
using OpenQA.Selenium;
using AOW4.SeleniumTests.Driver;
namespace AOW4.SeleniumTests.Tests;
[TestFixture]
public abstract class BaseTest
{
protected IWebDriver Driver = null!;
protected string BaseUrl => System.Environment.GetEnvironmentVariable("BASE_URL") ?? "http://localhost:5000";
[OneTimeSetUp]
public void GlobalSetup()
{
Driver = DriverFactory.CreateChromeDriver();
Driver.Manage().Window.Maximize();
}
[OneTimeTearDown]
public void GlobalTeardown()
{
try
{
Driver.Quit();
}
catch
{
}
}
protected void GoHome()
{
Driver.Navigate().GoToUrl(BaseUrl);
}
}