本文整理汇总了C#中Browser.Link方法的典型用法代码示例。如果您正苦于以下问题:C# Browser.Link方法的具体用法?C# Browser.Link怎么用?C# Browser.Link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser.Link方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
示例2: TestUserverifylad
public void TestUserverifylad(Browser browser)
{
browser.Link(Find.ById("ctl00_linkTrade")).Click();
browser.WaitUntilContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南");
Assert.IsTrue(browser.ContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南"));
browser.Link(Find.ByText("我要销售")).Click();
browser.WaitUntilContainsText("请在左边的菜单选择您要进行的操作");
Assert.IsTrue(browser.ContainsText("请在左边的菜单选择您要进行的操作"));
browser.Link(Find.ByText("我的议价信息")).Click();
browser.WaitUntilContainsText("合同号");
Assert.IsTrue(browser.ContainsText("合同号"));
browser.Link(Find.ByText("议价")).Click();
//WatiN.Core.DialogHandlers.ConfirmDialogHandler dh3 = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
//browser.AddDialogHandler(dh3);
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnAccept")).ClickNoWait();
//dh3.WaitUntilExists(15);//
//dh3.OKButton.Click();//
//browser.RemoveDialogHandler(dh3);
//Thread.Sleep(2000);
}
示例3: TestUsercanceldiscont
public void TestUsercanceldiscont(Browser browser,string raid,string raname)
{
browser.Link(Find.ByText("平台管理")).Click();
browser.WaitUntilContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南");
Assert.IsTrue(browser.ContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南"));
browser.Link(Find.ByText("销售折扣管理")).Click();
browser.WaitUntilContainsText("折扣设置");
Assert.IsTrue(browser.ContainsText("折扣设置"));
//状态生效
browser.RadioButton(Find.ById(raid)).Checked = true;
WatiN.Core.DialogHandlers.ConfirmDialogHandler dh4 = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
browser.AddDialogHandler(dh4);
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnDelete")).ClickNoWait();
dh4.WaitUntilExists(15);//
dh4.OKButton.Click();//
browser.RemoveDialogHandler(dh4);
Thread.Sleep(1000);
Assert.IsFalse(browser.ContainsText(raname));
}
示例4: FindLink
private static Element FindLink(Browser browser, string value)
{
Element element = browser.Link(Find.ById(value));
if(!element.Exists)
{
element = browser.Link(l => l.OuterHtml.Contains(value)); //element = browser.Link(Find.ByText(t => t.Contains(value)));
}
return element;
}
示例5: 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);
}
示例6: NavigateToSignup
public void NavigateToSignup(Browser browser)
{
if (browser.Link(Find.ByText("Sign Out")).Exists)
{
SignOut si = new SignOut();
si.UserSignOut(browser);
}
browser.GoTo(targetHost);
//browser.Link(Find.ById("ctl00_ctl00_uxPreContent_uxTopNavigation_uxMemberLoginStatus_uxMemberLoginView_uxMemberSignUpLink")).Click();
browser.Link(Find.ById("uxMemberSignUpLink")).Click();
}
示例7: NavigateToQuote
////#*****************************************************************************
//# Purpose: This class inherit from TestBase,it do all Quotes in the Quotes page.
//# Author: Christie
//# Last Modify: Mar 10, 2009
////#*****************************************************************************
public void NavigateToQuote(Browser browser)
{
if (browser.Link("ctl00_ctl00_uxMainContent_uxBreadcrumbTrail_uxTopLevel").Exists == true)
{
if (browser.Link("ctl00_ctl00_uxMainContent_uxBreadcrumbTrail_uxTopLevel").Text != "Quotes & Research")
{
browser.Link(Find.ByTitle("Quotes & Research")).Click();
}
}
else
{
browser.Link(Find.ByTitle("Quotes & Research")).Click();
}
}
示例8: RegisterUserOrderPaymentInfo
public void RegisterUserOrderPaymentInfo(Browser browser)
{
browser.WaitUntilContainsText("Step 4: Enter Payment Information");
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_user_firstname")).TypeText("christie");
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_user_lastname")).TypeText("Test");
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_user_addr")).TypeText("zhongshanbeiroad");
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_user_city")).TypeText("shanghai");
browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_dl_user_state")).Option(Find.ByValue("AL")).Select();
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_user_zip")).TypeText("11111");
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ux_phone")).TypeText("1111111111");
//browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ux_phone")).DoubleClick();
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ux_phone")).Focus();
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_user_email")).TypeText("[email protected]");
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_order_description")).TypeText("ordertest"+Date);
browser.CheckBox(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_chbAgreement")).Checked = true;
browser.CheckBox(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_chb_contactinfo")).Checked = true;
browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_dl_pay_year")).Option("2011").Select();
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_pay_account")).TypeText("4111111111111111");
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_pay_cid")).TypeText("111");
browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_BottomBtNext")).Click();
browser.WaitUntilContainsText("Your Order Is Complete");
Assert.IsTrue(browser.ContainsText("Your Order Is Complete"));
}
示例9: 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();
}
示例10: TestUserOrderSearchResults
public void TestUserOrderSearchResults(Browser browser)
{
//browser.WaitUntilContainsText("Step 3: Review Count & Quote");
//Assert.IsTrue(browser.ContainsText("Step 3: Review Count & Quote"));
//browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ltbDemCat")).Option(Find.ByText("Estimated Income")).Select();
//browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_txt_prm_code")).TypeText("usa10");
//browser.WaitUntilContainsText("(Remove) Promotion");
browser.Link(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_lbtNext")).Click();
}
示例11: SavedCount
public void SavedCount(string SavedName,Browser browser)
{
browser.Link("ctl00_ctl00_uxContent_ContentPlaceHolder1_lbSaveCount").Click();
browser.Frame(Find.ByName("uxSaveCountWindow")).TextField("ctl00_uxDialogContent_tbDesc").WaitUntilExists(20);
browser.Frame(Find.ByName("uxSaveCountWindow")).TextField("ctl00_uxDialogContent_tbFirstName").TypeText("Test");
browser.Frame(Find.ByName("uxSaveCountWindow")).TextField("ctl00_uxDialogContent_tbLastName").TypeText("Test");
browser.Frame(Find.ByName("uxSaveCountWindow")).TextField("ctl00_uxDialogContent_tbEmail").TypeText("[email protected]");
browser.Frame(Find.ByName("uxSaveCountWindow")).TextField("ctl00_uxDialogContent_tbDesc").TypeText(SavedName);
browser.Frame(Find.ByName("uxSaveCountWindow")).Button("ctl00_uxDialogContent_btSave").Click();
browser.Frame(Find.ByName("uxSaveCountWindow")).Button("ctl00_uxDialogContent_Button1").Click();
}
示例12: TestUsercancelsource
public void TestUsercancelsource(Browser browser)
{
browser.Link(Find.ById("ctl00_linkTrade")).Click();
browser.WaitUntilContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南");
Assert.IsTrue(browser.ContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南"));
browser.Link(Find.ByText("我要销售")).Click();
browser.WaitUntilContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南");
Assert.IsTrue(browser.ContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南"));
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_btnTakeDownAll")).ClickNoWait();
dh2.WaitUntilExists(15);//
dh2.OKButton.Click();//
browser.RemoveDialogHandler(dh2);
}
示例13: 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();
}
示例14: 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;
}
示例15: TestUsercheckdiscount
public void TestUsercheckdiscount(Browser browser, string url, string material, string date1, string number)
{
browser.Link(Find.ById("ctl00_linkTrade")).Click();
browser.WaitUntilContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南");
Assert.IsTrue(browser.ContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南"));
browser.Link(Find.ByText("我要采购")).Click();
browser.WaitUntilContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南");
Assert.IsTrue(browser.ContainsText("请在左边的菜单选择您要进行的操作。 如有疑问,请点击下面相关链接查看操作流程图或查看交易指南"));
//采购
browser.Link(Find.ByUrl(url + "SearchProduct.aspx")).Click();
browser.WaitUntilContainsText("清空购物车");
Assert.IsTrue(browser.ContainsText("清空购物车"));
//查询资源
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_txtSteel_Num")).TypeText(material + date1);
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnSearch1")).Click();
//清空购物车
WatiN.Core.DialogHandlers.ConfirmDialogHandler dh2 = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
browser.AddDialogHandler(dh2);
browser.Link(Find.ById("ctl00_ContentPlaceHolder1_linkClearCart")).ClickNoWait();
dh2.WaitUntilExists(15);//
dh2.OKButton.Click();//
browser.RemoveDialogHandler(dh2);
Thread.Sleep(1500);
//点击该资源并购买
browser.Image(Find.ByAlt("buy product")).Click();
browser.TextField(Find.ByClass("cinput")).TypeText(number);
browser.WaitUntilContainsText(number);
Assert.IsTrue(browser.ContainsText(number));
browser.Button(Find.ByClass("addBuyCartBtn")).Click();
Thread.Sleep(1500);
browser.WaitUntilContainsText("优惠后总额 900.00元");
Assert.IsTrue(browser.ContainsText("优惠后总额 900.00元"));
}