Skip to content

Commit

Permalink
Adding Firefox profile deletion test to .NET
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Jan 28, 2014
1 parent 3de7be2 commit 7dd90fd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dotnet/test/firefox/FirefoxDriverTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Threading;
using System.Collections.ObjectModel;
using OpenQA.Selenium.Environment;
using System.IO;

namespace OpenQA.Selenium.Firefox
{
Expand Down Expand Up @@ -80,6 +81,17 @@ public void ShouldBeAbleToStartANamedProfile()
}
}

[Test]
public void ShouldRemoveProfileAfterExit()
{
FirefoxProfile profile = new FirefoxProfile();
IWebDriver firefox = new FirefoxDriver(profile);
string profileLocation = profile.ProfileDirectory;

firefox.Quit();
Assert.IsFalse(Directory.Exists(profileLocation));
}

[Test]
[NeedsFreshDriver(BeforeTest = true, AfterTest = true)]
public void FocusRemainsInOriginalWindowWhenOpeningNewWindow()
Expand Down

0 comments on commit 7dd90fd

Please sign in to comment.