1- using OpenQA . Selenium ;
1+ using OpenQA . Selenium ;
22using OpenQA . Selenium . Chrome ;
33using OpenQA . Selenium . Firefox ;
44using OpenQA . Selenium . Edge ;
@@ -15,41 +15,6 @@ public abstract class BaseTest
1515 protected string Browser = Environment . GetEnvironmentVariable ( "TEST_BROWSER" ) ? . ToLower ( ) ?? "chrome" ;
1616 protected bool Headless = Environment . GetEnvironmentVariable ( "TEST_HEADLESS" ) ? . ToLower ( ) == "true" ;
1717
18- //[OneTimeSetUp]
19- //public void CleanDriverCache()
20- //{
21- // try
22- // {
23- // // Clean up potential cached ChromeDriver files
24- // string[] potentialCachePaths = [
25- // Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".cache", "selenium"),
26- // Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "selenium-manager"),
27- // Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "chromedriver.exe"),
28- // Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "chromedriver-win64")
29- // ];
30-
31- // foreach (var path in potentialCachePaths)
32- // {
33- // if (Directory.Exists(path))
34- // {
35- // TestContext.WriteLine($"Cleaning driver cache: {path}");
36- // // Just log, don't actually delete to prevent issues
37- // // Directory.Delete(path, true);
38- // }
39- // else if (File.Exists(path))
40- // {
41- // TestContext.WriteLine($"Found driver file: {path}");
42- // // File.Delete(path);
43- // }
44- // }
45- // }
46- // catch (Exception ex)
47- // {
48- // TestContext.WriteLine($"Warning: Failed to clean driver cache: {ex.Message}");
49- // // Continue execution - this is just a cleanup step
50- // }
51- //}
52-
5318 [ SetUp ]
5419 public void SetUp ( )
5520 {
0 commit comments