public void BrowserTypeError() { Assert.ThrowsException <ArgumentException>(() => SeleniumConfig.GetBrowserType("PHANTOMJS")); Assert.ThrowsException <ArgumentException>(() => SeleniumConfig.GetBrowserType("PHANTOM JS")); Assert.ThrowsException <ArgumentException>(() => SeleniumConfig.GetBrowserType("PHANTOM")); Assert.ThrowsException <ArgumentException>(() => SeleniumConfig.GetBrowserType("OTHER")); }
public void BrowserTypeMatch() { Assert.AreEqual(BrowserType.IE, SeleniumConfig.GetBrowserType("INTERNET EXPLORER")); Assert.AreEqual(BrowserType.IE, SeleniumConfig.GetBrowserType("INTERNETExPLOREr")); Assert.AreEqual(BrowserType.IE, SeleniumConfig.GetBrowserType("ie")); Assert.AreEqual(BrowserType.Firefox, SeleniumConfig.GetBrowserType("Firefox")); Assert.AreEqual(BrowserType.Chrome, SeleniumConfig.GetBrowserType("chrome")); Assert.AreEqual(BrowserType.HeadlessChrome, SeleniumConfig.GetBrowserType("HEADLESSCHROME")); Assert.AreEqual(BrowserType.Edge, SeleniumConfig.GetBrowserType("eDGE")); Assert.AreEqual(BrowserType.Remote, SeleniumConfig.GetBrowserType("remote")); }