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


C# Browser.Div方法代碼示例

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


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

示例1: 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

示例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: 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

示例4: GetVariantImages

        private IEnumerable<string> GetVariantImages(Browser browser)
        {
            var variantImages = new List<string>();

            var links = browser.Div("colours_js_box").Divs.First().Links.Select(x => x.Title);
            foreach (var link in links)
            {
                Browser b = new IE(browser.Url);
                b.ShowWindow(NativeMethods.WindowShowStyle.Hide);
                b.Link(Find.ByTitle(link)).Click();
                var d = new HtmlDocument();
                d.LoadHtml(GetHtmlString(b.Url));
                b.Close();
                var node = d.DocumentNode.SelectNodes("//img[@id='productimage']").First();

                variantImages.Add(BaseAddress + node.Attributes["src"].Value);
            }
            return variantImages;
        }
開發者ID:monkieboy,項目名稱:ShopNaija,代碼行數:19,代碼來源:ScraperImplementation.cs


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