Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Remove workaround for FireFox Selenium test #155

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions AjaxControlToolkit.Tests/JasmineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,43 @@ public class JasmineTests {
TimeSpan maxTimeout = TimeSpan.FromMinutes(4);
TimeSpan checkInterval = TimeSpan.FromSeconds(5);
string siteUrl;
string driverDir;

[SetUp]
public void Setup() {
siteUrl = Environment.GetEnvironmentVariable("AjaxControlToolkitTestSiteUrl");

if(String.IsNullOrWhiteSpace(siteUrl))
siteUrl = "http://localhost/JasmineTests/TestRunner.aspx";

driverDir = GetDriverDirectory();
}

static string GetDriverDirectory() {
return Path.GetDirectoryName(typeof(JasmineTests).Assembly.Location);
}

[Test]
public void Chrome() {
var dir = Path.GetDirectoryName(typeof(JasmineTests).Assembly.Location);
var driver = new ChromeDriver(dir);
var driver = new ChromeDriver(driverDir);

TestBrowser(driver);
}

[Test]
public void FireFox() {
var driver = new FirefoxDriver();
var driverService = FirefoxDriverService.CreateDefaultService(driverDir, "geckodriver.exe");
driverService.FirefoxBinaryPath = @"C:\Program Files (x86)\Mozilla Firefox\firefox.exe";
driverService.HideCommandPromptWindow = true;
driverService.SuppressInitialDiagnosticInformation = true;
var driver = new FirefoxDriver(driverService, new FirefoxOptions(), TimeSpan.FromSeconds(60));

TestBrowser(driver);
}

[Test]
public void InternetExplorer() {
var dir = Path.GetDirectoryName(typeof(JasmineTests).Assembly.Location);
var driver = new InternetExplorerDriver(dir, new InternetExplorerOptions(), TimeSpan.FromMinutes(3));
var driver = new InternetExplorerDriver(driverDir, new InternetExplorerOptions(), TimeSpan.FromMinutes(3));

TestBrowser(driver);
}
Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ init:
install:
# Workaround for NUnit Console Runner v3.2.1 timeout bug (#1509). Try to remove it when a fix is available.
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/nunit-3-2-0.ps1'))
# Workaround, as FireFox 47 crashes on Selenium test startup. Wait until stable FireFox is out.
- choco install firefox -version 46.0.1

cache:
- packages -> **\packages.config
Expand Down
Binary file added bin/geckodriver.exe
Binary file not shown.