Exemplo n.º 1
0
    public void VerifyGetCurrentUrl()
    {
        HtmlPage p = new HtmlPage();

        p.Navigate("HTMLPage1.htm");

        Assert.StringContains(p.GetCurrentUrl(), "HTMLPage1.htm");

        p.Elements.Find("a", "Navigate to Page2", 0).Click(LTAF.WaitFor.Postback);
        Assert.StringContains(p.GetCurrentUrl(), "HTMLPage2.htm");
    }
Exemplo n.º 2
0
    public void VerifyHrefNotFollowedIfOnclickIsCancelled()
    {
        HtmlPage p = new HtmlPage("Miscellaneous.aspx");

        p.Elements.Find("anchor").Click();
        p.Elements.Find("anchorResult").WaitForInnerText("anchor has been clicked.", 5);

        Assert.StringEndsWith(p.GetCurrentUrl(), "Miscellaneous.aspx");
    }