public void T01_Check_salesourcefail()
        {
            //供应商用户登陆
            TestUserSignIn(UN4, PW4);

            //挂牌资源
            salesource sl = new salesource();
            sl.TestUsersales(browser, BS, LS, SZ, MT, MD, WT, PR, DT1, DT, SH3);

            browser.Link(Find.ByText("资源撤牌管理")).Click();
            browser.WaitUntilContainsText("本页可选择需要撤牌的资源,进行撤牌。");
            Assert.IsTrue(browser.ContainsText("本页可选择需要撤牌的资源,进行撤牌。"));
            Assert.IsTrue(browser.ContainsText("未查询到您想要的数据,请扩大您的查询范围。"));

            browser.Link(Find.ByText("资源挂牌")).Click();
            browser.WaitUntilContainsText("可选择以下两种上传方式");
            Assert.IsTrue(browser.ContainsText("可选择以下两种上传方式"));

            WatiN.Core.DialogHandlers.ConfirmDialogHandler dh = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();

            browser.AddDialogHandler(dh);

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_deleteallbtn")).ClickNoWait();
            dh.WaitUntilExists(15);//

            dh.OKButton.Click();//
            dh.WaitUntilExists(15);

            dh.OKButton.Click();
            browser.RemoveDialogHandler(dh);
            browser.WaitUntilContainsText("未查询到您想要的数据");
            Assert.IsTrue(browser.ContainsText("未查询到您想要的数据"));
        }
Esempio n. 2
0
        public void Check05_19_DeactiveSubscription()
        {
            ie.GoTo(url + "/Subscription/subscription_management.aspx?start=1");

            ie.Frame(Find.ById("MainContentFrame")).TextField(Find.ByName("ctl00$MainContentHolder$txtIDName")).TypeText("Subtest" + Date);

            ie.Frame(Find.ById("MainContentFrame")).SelectList(Find.ByName("ctl00$MainContentHolder$ddlStatus")).Option("Active").Select(); // modify 2008/5/14

            ie.Frame(Find.ById("MainContentFrame")).Image(Find.ByName("ctl00$MainContentHolder$btnGo")).Click();

            ie.Frame(Find.ById("MainContentFrame")).Link(Find.ById("ctl00_MainContentHolder_gvSubscription_ctl02_lbEdit")).Click();

            ie.Frame(Find.ById("MainContentFrame")).Span(Find.ByText("Subscription Detail")).WaitUntilExists(60);

            WatiN.Core.DialogHandlers.ConfirmDialogHandler dah = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
            ie.AddDialogHandler(dah);

            ie.Frame(Find.ById("MainContentFrame")).Image(Find.ByName("ctl00$FooterButtonDeactive")).ClickNoWait();
            dah.WaitUntilExists(3);
            dah.OKButton.Click();
            ie.RemoveDialogHandler(dah);
            ie.Frame(Find.ById("MainContentFrame")).Span(Find.ByText("Subscription")).WaitUntilExists(60);

            ie.Frame(Find.ById("MainContentFrame")).TextField(Find.ByName("ctl00$MainContentHolder$txtIDName")).TypeText("Subtest" + Date);
            ie.Frame(Find.ById("MainContentFrame")).SelectList(Find.ByName("ctl00$MainContentHolder$ddlStatus")).Option("Active").Select();
            ie.Frame(Find.ById("MainContentFrame")).Image(Find.ByName("ctl00$MainContentHolder$btnGo")).Click();
            ie.Frame(Find.ById("MainContentFrame")).Link(Find.ById("ctl00_MainContentHolder_gvSubscription_ctl02_lbEdit")).Click();
            ie.Frame(Find.ById("MainContentFrame")).Span(Find.ByText("Subscription Detail")).WaitUntilExists(60);
            WatiN.Core.DialogHandlers.ConfirmDialogHandler dah1 = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
            ie.AddDialogHandler(dah1);
            ie.Frame(Find.ById("MainContentFrame")).Image(Find.ByName("ctl00$FooterButtonDeactive")).ClickNoWait();
            dah1.WaitUntilExists(3);
            dah1.OKButton.Click();
            ie.RemoveDialogHandler(dah1);
            ie.Frame(Find.ById("MainContentFrame")).Span(Find.ByText("Subscription")).WaitUntilExists(60);

            ie.Frame(Find.ById("MainContentFrame")).TextField(Find.ByName("ctl00$MainContentHolder$txtIDName")).TypeText("Subtest" + Date);
            ie.Frame(Find.ById("MainContentFrame")).SelectList(Find.ByName("ctl00$MainContentHolder$drpStatus$ddlEnum")).Option("Active").Select();
            ie.Frame(Find.ById("MainContentFrame")).Image(Find.ByName("ctl00$MainContentHolder$btnGo")).Click();
            // ie.Span(Find.ByText("No subscription selected.")).WaitUntilExists(60);
            //Assert.IsTrue(ie.Span(Find.ByText("No subscription selected.")).Exists);

            ie.Frame(Find.ById("MainContentFrame")).Link(Find.ByText("ID")).WaitUntilRemoved(60);
            Assert.IsFalse(ie.Frame(Find.ById("MainContentFrame")).Image(Find.ByName("ctl00$MainContentHolder$btnPDF")).Exists);
        }
Esempio n. 3
0
        public void Check05_18_ZoneBundleApproval()
        {
            ie.Image(Find.ByAlt("SMPs")).WaitUntilExists(120);
            ie.Image(Find.ByAlt("SMPs")).ClickNoWait();
            ie.Link(Find.ByText("Zone SMP Approval")).WaitUntilExists(120);
            ie.Link(Find.ByText("Zone SMP Approval")).ClickNoWait();
            ie.Frame(Find.ById("MainContentFrame")).TextField(Find.ByName("ctl00$MainContentHolder$txtIDName")).WaitUntilExists(120);
            ie.Frame(Find.ById("MainContentFrame")).TextField(Find.ByName("ctl00$MainContentHolder$txtIDName")).TypeText("ZoneBundle" + Date);
            ie.Frame(Find.ById("MainContentFrame")).Image(Find.ByName("ctl00$MainContentHolder$btnGo")).ClickNoWait();

            ie.Frame(Find.ById("MainContentFrame")).Link(Find.ById("ctl00_MainContentHolder_gvBundles_ctl02_lbEdit")).Click();
            ie.Frame(Find.ById("MainContentFrame")).Span(Find.ByText("Edit SMP")).WaitUntilExists(60);

            WatiN.Core.DialogHandlers.ConfirmDialogHandler bh = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
            ie.AddDialogHandler(bh);
            ie.Frame(Find.ById("MainContentFrame")).Image(Find.ByName("ctl00$FooterButtonApprove")).ClickNoWait();
            bh.WaitUntilExists(60);
            bh.OKButton.Click();
            ie.RemoveDialogHandler(bh);

            ie.Frame(Find.ById("MainContentFrame")).Span(Find.ByText("Zone SMP Approval")).WaitUntilExists(60);
            Assert.IsTrue(ie.Frame(Find.ById("MainContentFrame")).Span(Find.ByText("Active")).Exists);
        }