本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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;
}