Tester for System.Web.UI.WebControls.LinkButton
Inheritance: AspControlTester
Example #1
0
        public void TestMultipleForms_WhenBadAspId()
        {
            WebFormTester form1 = new WebFormTester("badId", Browser);
            LinkButtonTester one = new LinkButtonTester("one", form1);

            Browser.GetPage(TestUrl);
            one.Click();
        }
Example #2
0
        protected override void SetUp()
        {
            base.SetUp();
            button = new LinkButtonTester("button", CurrentWebForm);
            disabledButton = new LinkButtonTester("disabled", CurrentWebForm);
            clickResult = new LabelTester("clickResult", CurrentWebForm);

            Browser.GetPage(BaseUrl + "AspTester/LinkButtonTestPage.aspx");
        }
Example #3
0
        protected override void SetUp()
        {
            base.SetUp();

            UserControlTester userControl = new UserControlTester("userControl", CurrentWebForm);

            label = new LabelTester("label", userControl);
            button = new ButtonTester("button", userControl);
            linkButton = new LinkButtonTester("linkButton", userControl);

            clickResult = new LabelTester("clickResult", CurrentWebForm);

            Browser.GetPage(BaseUrl + "AspTester/UserControlTestPage.aspx");
        }
Example #4
0
        public void TestSubmit_WhenMultipleForms()
        {
            LabelTester submitted = new LabelTester("submitted", form1);
            Assert.AreEqual("none", submitted.Text);

            LinkButtonTester one = new LinkButtonTester("one", form1);
            one.Click();
            Assert.AreEqual("form 1", submitted.Text);

            form2.Submit();
            Assert.AreEqual("form 2", submitted.Text);

            new WebFormTester("RedirectForm", Browser).Submit();
            AssertRedirected();
        }
Example #5
0
		public void TestGoToPage2ViaLinkButton() 
		{ 
			// First, instantiate "Tester" objects: 
			ButtonTester buttonLogin = new ButtonTester("ButtonLogin", CurrentWebForm); 
			LinkButtonTester link = new LinkButtonTester("LinkToPage2", CurrentWebForm); 
			LabelTester labelTester = new LabelTester("LabelPreviousView", CurrentWebForm);

			// Second, visit the page being tested: 
			Browser.GetPage("http://localhost/Castle.MVC.Test.Web/Views/index.aspx"); 
			string loginPage = this.Browser.CurrentUrl.AbsoluteUri.ToString();

			link.Click(); 
			string currentPage = this.Browser.CurrentUrl.AbsoluteUri.ToString();
			Assert(currentPage, loginPage != currentPage);
			AssertEquals("index", labelTester.Text); 
		} 
        protected override void SetUp()
        {
            button1A = new HtmlInputRadioButtonTester("button1A");
            button1B = new HtmlInputRadioButtonTester("button1B");
            postback = new LinkButtonTester("postback");
            formVars = new DataGridTester("formVars", CurrentWebForm);

            Browser.GetPage(BaseUrl + "HtmlTester/HtmlInputRadioButtonTestPage.aspx");
        }
Example #7
0
 protected override void SetUp()
 {
     base.SetUp();
     list = CreateListControl("list", CurrentWebForm);
     emptyList = CreateListControl("emptyList", CurrentWebForm);
     disabledList = CreateListControl("disabledList", CurrentWebForm);
     submit = new LinkButtonTester("submit", CurrentWebForm);
     clearSelection = new LinkButtonTester("clearSelection", CurrentWebForm);
     autoPostBack = new CheckBoxTester("auto", CurrentWebForm);
     indexChanged = new LabelTester("indexChanged", CurrentWebForm);
 }
Example #8
0
        protected override void SetUp()
        {
            base.SetUp();
            Submit = new LinkButtonTester("submit", CurrentWebForm);
            CheckBox = new RadioButtonTester("radionButton", CurrentWebForm);
            DisabledCheckBox = new RadioButtonTester("disabled", CurrentWebForm);

            groupedOne = new RadioButtonTester("groupedOne", CurrentWebForm);
            groupedTwo = new RadioButtonTester("groupedTwo", CurrentWebForm);

            Submit = new LinkButtonTester("submit", CurrentWebForm);
            Browser.GetPage(BaseUrl + "/AspTester/RadioButtonTestPage.aspx");
        }
Example #9
0
        protected override void SetUp()
        {
            def = new HtmlSelectTester("default");
            nonDefault = new HtmlSelectTester("nonDefault");
            singleSelect = new HtmlSelectTester("singleSelect");
            submit = new LinkButtonTester("submit");

            Browser.GetPage(BaseUrl + "/HtmlTester/HtmlSelectTestPage.aspx");
        }
        protected override void SetUp()
        {
            base.SetUp();

            checkNotCheckedServer = new HtmlInputCheckBoxTester("checkNotCheckedServer", CurrentWebForm);
            checkCheckedServer = new HtmlInputCheckBoxTester("checkCheckedServer", CurrentWebForm);
            checkNotCheckedNotServer = new HtmlInputCheckBoxTester("checkNotCheckedServer");
            checkCheckedNotServer = new HtmlInputCheckBoxTester("checkCheckedNotServer");
            checkVaryServer = new HtmlInputCheckBoxTester("checkVaryServer", CurrentWebForm);
            checkVaryNotServer = new HtmlInputCheckBoxTester("checkVaryNotServer");
            checkDisabled = new HtmlInputCheckBoxTester("checkDisabled");

            submit = new LinkButtonTester("submit", CurrentWebForm);

            Browser.GetPage(BaseUrl + "HtmlTester/HtmlInputCheckBoxTestPage.aspx");
        }
Example #11
0
 protected override void SetUp()
 {
     base.SetUp();
       redirect = new LinkButtonTester("redirect", CurrentWebForm);
       dropCookie = new LinkButtonTester("dropCookie", CurrentWebForm);
       dropCookieAndRedirect = new LinkButtonTester("dropCookieAndRedirect", CurrentWebForm);
       dropCookieWithExpiry = new LinkButtonTester("dropCookieWithExpiry", CurrentWebForm);
       postBack = new LinkButtonTester("postBack", CurrentWebForm);
       followLink = new HtmlAnchorTester("followLink", CurrentWebForm);
       cookie = new LabelTester("cookie", CurrentWebForm);
       testParm = new LabelTester("testParm", CurrentWebForm);
       urlReferrer = new LabelTester("urlReferrer", CurrentWebForm);
 }
Example #12
0
 protected override void SetUp()
 {
     base.SetUp();
     CheckBox = new CheckBoxTester("checkBox", CurrentWebForm);
     DisabledCheckBox = new CheckBoxTester("disabled", CurrentWebForm);
     Submit = new LinkButtonTester("submit", CurrentWebForm);
     Browser.GetPage(BaseUrl + "/AspTester/CheckBoxTestPage.aspx");
 }