diff --git a/dotnet/test/webdriver/DriverTestFixture.cs b/dotnet/test/webdriver/DriverTestFixture.cs index 9829166b9fe17..3ec0fa411c7c8 100644 --- a/dotnet/test/webdriver/DriverTestFixture.cs +++ b/dotnet/test/webdriver/DriverTestFixture.cs @@ -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 diff --git a/dotnet/test/webdriver/NavigationTests.cs b/dotnet/test/webdriver/NavigationTests.cs index cbd35305b91f3..d63746cdf4e94 100644 --- a/dotnet/test/webdriver/NavigationTests.cs +++ b/dotnet/test/webdriver/NavigationTests.cs @@ -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] @@ -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] @@ -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] @@ -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] @@ -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] @@ -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] diff --git a/dotnet/test/webdriver/SessionHandlingTests.cs b/dotnet/test/webdriver/SessionHandlingTests.cs index 772d8b284bc9c..db66831979072 100644 --- a/dotnet/test/webdriver/SessionHandlingTests.cs +++ b/dotnet/test/webdriver/SessionHandlingTests.cs @@ -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")); } } }