Skip to content

Commit 7dd90fd

Browse files
committed
Adding Firefox profile deletion test to .NET
1 parent 3de7be2 commit 7dd90fd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dotnet/test/firefox/FirefoxDriverTest.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Threading;
77
using System.Collections.ObjectModel;
88
using OpenQA.Selenium.Environment;
9+
using System.IO;
910

1011
namespace OpenQA.Selenium.Firefox
1112
{
@@ -80,6 +81,17 @@ public void ShouldBeAbleToStartANamedProfile()
8081
}
8182
}
8283

84+
[Test]
85+
public void ShouldRemoveProfileAfterExit()
86+
{
87+
FirefoxProfile profile = new FirefoxProfile();
88+
IWebDriver firefox = new FirefoxDriver(profile);
89+
string profileLocation = profile.ProfileDirectory;
90+
91+
firefox.Quit();
92+
Assert.IsFalse(Directory.Exists(profileLocation));
93+
}
94+
8395
[Test]
8496
[NeedsFreshDriver(BeforeTest = true, AfterTest = true)]
8597
public void FocusRemainsInOriginalWindowWhenOpeningNewWindow()

0 commit comments

Comments
 (0)