當前位置: 首頁>>代碼示例>>C#>>正文


C# Browser.Span方法代碼示例

本文整理匯總了C#中Browser.Span方法的典型用法代碼示例。如果您正苦於以下問題:C# Browser.Span方法的具體用法?C# Browser.Span怎麽用?C# Browser.Span使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Browser的用法示例。


在下文中一共展示了Browser.Span方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SetMapDesiredCount

        public void SetMapDesiredCount(int CountNumber, Browser browser)
        {
            browser.TextField("ctl00_ctl00_uxContent_ContentPlaceHolder1_gvOrderResults_ctl02_tbDesQty").WaitUntilExists(20);
            browser.TextField("ctl00_ctl00_uxContent_ContentPlaceHolder1_gvOrderResults_ctl02_tbDesQty").TypeText(CountNumber.ToString());

            browser.Span((Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_tbTolDesQty")) && (Find.ByText(CountNumber.ToString()))).WaitUntilExists(30);
        }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:7,代碼來源:SaveCount.cs

示例2: TestUserOrderSelectDemo4

        public void TestUserOrderSelectDemo4(Browser browser)
        {
            browser.WaitUntilContainsText("Define Target Audience");
            Assert.IsTrue(browser.ContainsText("Define Target Audience"));

            browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemVar")).Option(Find.ByValue("A")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();
            browser.Div(Find.ById("divWaiting")).WaitUntilRemoved();
            browser.Div("ListbarProfiles").Table("ListbarProfiles_Group_0_group").TableRow("ListbarProfiles_Group_0_items").Div("ListbarProfiles_0_Item_0").WaitUntilExists(20);

            browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemVar")).Option(Find.ByValue("B")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();
            browser.Div(Find.ById("divWaiting")).WaitUntilRemoved();

            browser.Div("ListbarProfiles").Table("ListbarProfiles_Group_0_group").TableRow("ListbarProfiles_Group_0_items").Div("ListbarProfiles_0_Item_1").WaitUntilExists(20);

            browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemVar")).Option(Find.ByValue("C")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();
            browser.Div(Find.ById("divWaiting")).WaitUntilRemoved();

            browser.Div("ListbarProfiles").Table("ListbarProfiles_Group_0_group").TableRow("ListbarProfiles_Group_0_items").Div("ListbarProfiles_0_Item_2").WaitUntilExists(20);

            browser.RadioButton(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_rb_phoneNothing")).Checked = true;
            browser.Span(Find.ByText("Next")).Click();
        }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:25,代碼來源:OrderSelectDemo_NewMover.cs

示例3: TestUserladbilldeliversearch

        //public static string ladorderid;
        public void TestUserladbilldeliversearch(Browser browser, string url, string orderid)
        {
            browser.Link(Find.ByText("我要銷售")).Click();
            browser.WaitUntilContainsText("請在左邊的菜單選擇您要進行的操作。 如有疑問,請點擊下麵相關鏈接查看操作流程圖或查看交易指南");
            Assert.IsTrue(browser.ContainsText("請在左邊的菜單選擇您要進行的操作。 如有疑問,請點擊下麵相關鏈接查看操作流程圖或查看交易指南"));

            browser.Link(Find.ByText("可發資源查詢")).Click();
            browser.WaitUntilContainsText("可提資源查詢");
            Assert.IsTrue(browser.ContainsText("可提資源查詢"));
            //先清空

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnCleanDelivery")).ClickNoWait();
            /*
             //測試用
            string ss = "0904000070";
            int s1 = int.Parse(ss);
            int s2 = s1 + 1;
            string ss1 = s2.ToString();
            */
            //
            Thread.Sleep(1500);
            browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_txtOrderCode")).TypeText(orderid);

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_Button1")).Click();

            //截取ID
            string l1 = browser.Span(Find.ByText("焊接用鋼盤條")).Id;
            string l3 = l1.Trim().Substring(13, 4);

            browser.Link(Find.ById("a_order_" + l3)).Click();

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_NextStepBtn")).Click();

            browser.WaitUntilContainsText("在此頁麵中您可選擇對此提單的處理方式,如無疑義,可點擊創建提單完成");
            Assert.IsTrue(browser.ContainsText("在此頁麵中您可選擇對此提單的處理方式,如無疑義,可點擊創建提單完成"));
            browser.Table(Find.ById("ctl00_ContentPlaceHolder1_GridView1")).TableRow(Find.ByClass("RowBg")).WaitUntilExists(10);
            //Assert.AreEqual("xx",browser.Table(Find.ById("ctl00_ContentPlaceHolder1_GridView1")).TableRow(Find.ByClass("RowBg")).TableCells[1].Text);
            string ladorderid = browser.Table(Find.ById("ctl00_ContentPlaceHolder1_GridView1")).TableRow(Find.ByClass("RowBg")).TableCells[1].Text;

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_Button3")).Click();

            //發貨單確認
            browser.Link(Find.ByText("發貨單確認")).Click();
            browser.WaitUntilContainsText("提單管理");
            Assert.IsTrue(browser.ContainsText("提單管理"));

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

            browser.AddDialogHandler(dh2);

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_GridView1_ctl02_ConfirmBtn")).ClickNoWait();
            dh2.WaitUntilExists(15);//
            dh2.OKButton.Click();//
            browser.RemoveDialogHandler(dh2);
        }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:56,代碼來源:ladbilldeliversearch.cs

示例4: TestUserOrderSelectDemo3

        public void TestUserOrderSelectDemo3(Browser browser)
        {
            browser.WaitUntilContainsText("Define Target Audience");
            Assert.IsTrue(browser.ContainsText("Define Target Audience"));

            //browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemCat")).Option(Find.ByText("Estimated Income")).Select();

            browser.CheckBox(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_chbAllHousehold")).Checked = true;
            browser.Div(Find.ById("divWaiting")).WaitUntilRemoved();
            browser.RadioButton(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_rb_phoneNothing")).Checked = true;
            browser.Span(Find.ByText("Next")).Click();
        }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:12,代碼來源:OrderSelectDemo_NewHomeowner.cs

示例5: TestUserOrderSelectDemo

        public void TestUserOrderSelectDemo(Browser browser)
        {
            browser.WaitUntilContainsText("Define Target Audience");
            Assert.IsTrue(browser.ContainsText("Define Target Audience"));

            //browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemCat")).Option(Find.ByText("Estimated Income")).Select();

              /*  browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemCat")).Option(Find.ByValue("3$$alvionacxiom30_DateOfBirthU")).Select();
            browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_uxInputLower")).TypeText("012008");
            browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_uxInputUpper")).TypeText("012009");
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();*/

            //browser.Div(Find.ById("divWaiting")).WaitUntilRemoved();
               // browser.Div("ListbarProfiles").Table("ListbarProfiles_Group_0_group").TableRow("ListbarProfiles_Group_0_items").Div("ListbarProfiles_0_Item_0").WaitUntilExists(20);

            browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemCat")).Option(Find.ByValue("0$$alvionacxiom30_AgeOfIndividual")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();

            browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemVar")).Option(Find.ByValue("20")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();

            browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemVar")).Option(Find.ByValue("22")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();

            browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemVar")).Option(Find.ByValue("24")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();

            browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemVar")).Option(Find.ByValue("26")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();
            //browser.Div(Find.ById("divWaiting")).WaitUntilRemoved();

            browser.Div("ListbarProfiles").Table("ListbarProfiles_Group_0_group").TableRow("ListbarProfiles_Group_0_items").Div("ListbarProfiles_0_Item_0").WaitUntilExists(20);

               /* browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemCat")).Option(Find.ByValue("0$$alvionacxiom30_CreditCardUser")).Select();
            browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_btAddDem")).Click();
            browser.Div(Find.ById("divWaiting")).WaitUntilRemoved();
            browser.Div("ListbarProfiles").Table("ListbarProfiles_Group_1_group").TableRow("ListbarProfiles_Group_1_items").Div("ListbarProfiles_1_Item_0").WaitUntilExists(20);*/
               // browser.Div("ListbarProfiles").Table("ListbarProfiles_Group_2_group").TableRow("ListbarProfiles_Group_2_items").Div("ListbarProfiles_2_Item_0").WaitUntilExists(20);

            browser.RadioButton(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_rb_phoneNothing")).Checked = true;
            browser.Span(Find.ByText("Next")).Click();
        }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:42,代碼來源:OrderSelectDemo_Consumer.cs

示例6: NCOAOrders

        public void NCOAOrders(Browser browser,String FileType, string HostPath)
        {
            if (HostPath == "u")
            {
                OpenTargetUrl(targetHost + "sl360",browser);
            }
            else
            {
                OpenTargetUrl(targetHost+"salesleads360",browser);

                //userlogin
                Login login = new Login();
                login.userlogin(CountEmail, CountPW, browser);

            }

            browser.Link("aMainMenu1").WaitUntilExists(60);
            browser.Link("aMainMenu1").ClickNoWait();
            browser.Span(Find.ByText("NCOA")).WaitUntilExists(60);
            browser.Image("ctl00_ctl00_uxContent_ContentPlaceHolder1_ibStartNow").ClickNoWait();
            browser.FileUpload("ctl00_ctl00_uxContent_ContentPlaceHolder1_fuFile").WaitUntilExists(60);

            browser.FileUpload("ctl00_ctl00_uxContent_ContentPlaceHolder1_fuFile").Set(UploadLeadsPath);
            if (FileType == "c")
            {
                browser.RadioButton("ctl00_ctl00_uxContent_ContentPlaceHolder1_rblListType_0").Checked = true;
            }
            else
            {
                browser.RadioButton("ctl00_ctl00_uxContent_ContentPlaceHolder1_rblListType_1").Checked = true;
            }

            browser.Link("ctl00_ctl00_uxContent_ContentPlaceHolder1_BottomBtNext").Click();
            browser.Link("ctl00_ctl00_uxContent_ContentPlaceHolder1_BottomBtNext").Click();

            browser.CheckBox("ctl00_ctl00_uxContent_ContentPlaceHolder1_sOptions_cbOption1").Checked = true;
        }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:37,代碼來源:NCOAOrder.cs

示例7: TestUserladingbillsearch

        //public static string ladorderid;
        public void TestUserladingbillsearch(Browser browser, string url, string orderid)
        {
            browser.Link(Find.ByText("可提資源查詢")).Click();
            browser.WaitUntilContainsText("可提資源查詢");
            Assert.IsTrue(browser.ContainsText("可提資源查詢"));
            //先清空

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnCleanDelivery")).ClickNoWait();
            /*
             //測試用
            string ss = "0904000070";
            int s1 = int.Parse(ss);
            int s2 = s1 + 1;
            string ss1 = s2.ToString();
            */
            //
            Thread.Sleep(1500);
            browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_txtOrderCode")).TypeText(orderid);

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_Button1")).Click();

            //截取ID
            string l1 = browser.Span(Find.ByText("焊接用鋼盤條")).Id;
            string l3 = l1.Trim().Substring(13, 4);

            browser.Link(Find.ById("a_order_"+l3)).Click();

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_NextStepBtn")).Click();

            browser.WaitUntilContainsText("在此頁麵中您可選擇對此提單的處理方式,如無疑義,可點擊創建提單完成");
            Assert.IsTrue(browser.ContainsText("在此頁麵中您可選擇對此提單的處理方式,如無疑義,可點擊創建提單完成"));
            browser.Table(Find.ById("ctl00_ContentPlaceHolder1_GridView1")).TableRow(Find.ByClass("RowBg")).WaitUntilExists(10);
            //Assert.AreEqual("xx",browser.Table(Find.ById("ctl00_ContentPlaceHolder1_GridView1")).TableRow(Find.ByClass("RowBg")).TableCells[1].Text);
            string ladorderid = browser.Table(Find.ById("ctl00_ContentPlaceHolder1_GridView1")).TableRow(Find.ByClass("RowBg")).TableCells[1].Text;

            browser.Button(Find.ById("ctl00_ContentPlaceHolder1_Button3")).Click();
        }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:38,代碼來源:ladingbillsearch.cs


注:本文中的Browser.Span方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。