public void CheckHyperLink() { RunInAllBrowsers(browser => { browser.NavigateToUrl("hyperlink.aspx"); AssertUI.CheckIfHyperLinkEquals(browser, "#AbsoluteSameSchema", "/path/test?query=test#fragment", UrlKind.Relative, UriComponents.PathAndQuery); AssertUI.CheckIfHyperLinkEquals(browser, "#RelativeLink", "/path/test?query=test#fragment", UrlKind.Relative, UriComponents.PathAndQuery); AssertUI.CheckIfHyperLinkEquals(browser, "#RelativeLink", "/path/test?query=test#fragment", UrlKind.Relative, UriComponents.AbsoluteUri); AssertUI.CheckIfHyperLinkEquals(browser, "#RelativeLink", "path/test?query=test#fragmentasd", UrlKind.Relative, UriComponents.PathAndQuery); AssertUI.CheckIfHyperLinkEquals(browser, "#RelativeLink", "path/test?query=test#fragment", UrlKind.Relative, UriComponents.PathAndQuery); AssertUI.CheckIfHyperLinkEquals(browser, "#AbsoluteLink", "https://www.google.com/path/test?query=test#fragment", UrlKind.Absolute, UriComponents.PathAndQuery); AssertUI.CheckIfHyperLinkEquals(browser, "#AbsoluteLink", "https://www.google.com/path/test?query=test#fragment", UrlKind.Absolute, UriComponents.AbsoluteUri); AssertUI.CheckIfHyperLinkEquals(browser, "#AbsoluteSameSchema", "//localhost:1234/path/test?query=test#fragment", UrlKind.Absolute, UriComponents.PathAndQuery); AssertUI.CheckIfHyperLinkEquals(browser, "#AbsoluteSameSchema", "//localhostads:1234/path/test?query=test#fragment", UrlKind.Absolute, UriComponents.PathAndQuery); }); }
public void CheckHyperLink_Failure3() { SeleniumTestsConfiguration.DeveloperMode = true; RunInAllBrowsers(browser => { browser.NavigateToUrl("hyperlink.aspx"); AssertUI.CheckIfHyperLinkEquals(browser, "#AbsoluteLink", "https://www.googles.com/path/test?query=test#fragment", UrlKind.Absolute, UriComponents.AbsoluteUri); }); }
public void CheckHyperLink_Failure1() { SeleniumTestsConfiguration.DeveloperMode = true; RunInAllBrowsers(browser => { browser.NavigateToUrl("hyperlink.aspx"); AssertUI.CheckIfHyperLinkEquals(browser, "#RelativeLink", "/path0/test?query=test#fragment", UrlKind.Relative, UriComponents.PathAndQuery); }); }
public void CheckHyperLink_Failure4() { RunInAllBrowsers(browser => { browser.NavigateToUrl("hyperlink.aspx"); try { AssertUI.CheckIfHyperLinkEquals(browser, "#AbsoluteSameSchema", "https://localhost:1234/path/test?query=test#fragment", UrlKind.Absolute, UriComponents.AbsoluteUri); } catch (UnexpectedElementStateException) { } }); }