Skip to content
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
10 changes: 0 additions & 10 deletions dotnet/test/webdriver/DriverTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ public abstract class DriverTestFixture
{
protected static UrlBuilder Urls => EnvironmentManager.Instance.WebServer.Urls;

public string macbethTitle = "Macbeth: Entire Play";

public string simpleTestTitle = "Hello WebDriver";

public string framesTitle = "This page has frames";

public string iframesTitle = "This page has iframes";

public string formsTitle = "We Leave From Here";

protected internal IWebDriver Driver { get; set; }

public bool IsNativeEventsEnabled
Expand Down
24 changes: 12 additions & 12 deletions dotnet/test/webdriver/NavigationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public void ShouldGoBackAndForward()
Driver.Url = Urls.SimpleTestPage;

navigation.Back();
Assert.That(Driver.Title, Is.EqualTo(macbethTitle));
Assert.That(Driver.Title, Is.EqualTo("Macbeth: Entire Play"));

navigation.Forward();
Assert.That(Driver.Title, Is.EqualTo(simpleTestTitle));
Assert.That(Driver.Title, Is.EqualTo("Hello WebDriver"));
}

[Test]
Expand All @@ -66,12 +66,12 @@ public void ShouldGoToUrlUsingString()
navigation = Driver.Navigate();

navigation.GoToUrl(Urls.MacbethPage);
Assert.That(Driver.Title, Is.EqualTo(macbethTitle));
Assert.That(Driver.Title, Is.EqualTo("Macbeth: Entire Play"));

// We go to two pages to ensure that the browser wasn't
// already at the desired page through a previous test.
navigation.GoToUrl(Urls.SimpleTestPage);
Assert.That(Driver.Title, Is.EqualTo(simpleTestTitle));
Assert.That(Driver.Title, Is.EqualTo("Hello WebDriver"));
}

[Test]
Expand All @@ -83,12 +83,12 @@ public void ShouldGoToUrlUsingUri()
navigation = Driver.Navigate();

navigation.GoToUrl(macBeth);
Assert.That(macbethTitle, Is.EqualTo(Driver.Title));
Assert.That(Driver.Title, Is.EqualTo("Macbeth: Entire Play"));

// We go to two pages to ensure that the browser wasn't
// already at the desired page through a previous test.
navigation.GoToUrl(simpleTest);
Assert.That(Driver.Title, Is.EqualTo(simpleTestTitle));
Assert.That(Driver.Title, Is.EqualTo("Hello WebDriver"));
}

[Test]
Expand Down Expand Up @@ -123,10 +123,10 @@ public async Task ShouldGoBackAndForwardAsync()
await navigation.GoToUrlAsync(Urls.SimpleTestPage);

await navigation.BackAsync();
Assert.That(Driver.Title, Is.EqualTo(macbethTitle));
Assert.That(Driver.Title, Is.EqualTo("Macbeth: Entire Play"));

await navigation.ForwardAsync();
Assert.That(Driver.Title, Is.EqualTo(simpleTestTitle));
Assert.That(Driver.Title, Is.EqualTo("Hello WebDriver"));
}

[Test]
Expand All @@ -142,10 +142,10 @@ public async Task ShouldGoToUrlUsingStringAsync()
var navigation = Driver.Navigate();

await navigation.GoToUrlAsync(Urls.MacbethPage);
Assert.That(Driver.Title, Is.EqualTo(macbethTitle));
Assert.That(Driver.Title, Is.EqualTo("Macbeth: Entire Play"));

await navigation.GoToUrlAsync(Urls.SimpleTestPage);
Assert.That(Driver.Title, Is.EqualTo(simpleTestTitle));
Assert.That(Driver.Title, Is.EqualTo("Hello WebDriver"));
}

[Test]
Expand All @@ -154,9 +154,9 @@ public void ShouldGoToUrlUsingUriAsync()
var navigation = Driver.Navigate();

navigation.GoToUrlAsync(new Uri(Urls.MacbethPage));
Assert.That(macbethTitle, Is.EqualTo(Driver.Title));
Assert.That(Driver.Title, Is.EqualTo("Macbeth: Entire Play"));
navigation.GoToUrl(new Uri(Urls.SimpleTestPage));
Assert.That(Driver.Title, Is.EqualTo(simpleTestTitle));
Assert.That(Driver.Title, Is.EqualTo("Hello WebDriver"));
}

[Test]
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/webdriver/SessionHandlingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void ShouldOpenAndCloseBrowserRepeatedly()
EnvironmentManager.Instance.CloseCurrentDriver();
CreateFreshDriver();
Driver.Url = Urls.SimpleTestPage;
Assert.That(Driver.Title, Is.EqualTo(simpleTestTitle));
Assert.That(Driver.Title, Is.EqualTo("Hello WebDriver"));
}
}
}