public void SeleniumGracefulMissingBrowserHandling() { _selenium.SetBrowser("none"); Assert.IsTrue(string.IsNullOrEmpty(_selenium.PageSource), "PageSource without browser"); Assert.IsTrue(string.IsNullOrEmpty(_selenium.Title()), "Title without browser"); Assert.IsFalse(_selenium.Close(), "closing without browser"); Assert.IsFalse(_selenium.ClosePage(), "close page without browser"); Assert.IsFalse(_selenium.ElementExists("any"), "Element Exists without browser"); Assert.AreEqual(0, _selenium.CountOfElements("any"), "Count Of Elements without browser"); Assert.IsTrue(string.IsNullOrEmpty(_selenium.Title()), "Title without browser"); try { _selenium.Open(new Uri("http://localhost")); Assert.Fail("No exception thrown for Open without browser"); } catch (StopTestException) { } }