本文整理汇总了C#中Browser.Image方法的典型用法代码示例。如果您正苦于以下问题:C# Browser.Image方法的具体用法?C# Browser.Image怎么用?C# Browser.Image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Browser
的用法示例。
在下文中一共展示了Browser.Image方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestUserspecialtylists
public void TestUserspecialtylists(Browser browser)
{
browser.WaitUntilContainsText("Please complete the short form below and a Data Specialist will follow up with you");
Assert.IsTrue(browser.ContainsText("Please complete the short form below and a Data Specialist will follow up with you"));
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ux_fir_name")).TypeText("bobby");
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ux_last_name")).TypeText("wang");
//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")).Focus();
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ux_email")).TypeText("[email protected]");
browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_uxHowMany")).Option(Find.ByValue("1,001 - 5,000")).Select();
browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_uxHowSoon")).Option(Find.ByValue("Immediately")).Select();
browser.SelectList(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_uxInterest")).Option(Find.ByValue("Ailments")).Select();
browser.TextField(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_uxTarget")).TypeText("test");
browser.Image(Find.ById("ctl00_ctl00_uxContent_ContentPlaceHolder1_ImageButton1")).Click();
browser.WaitUntilContainsText("Thank you! We have received your request and we will follow up with you within the next business day");
Assert.IsTrue(browser.ContainsText("Thank you! We have received your request and we will follow up with you within the next business day"));
}
示例2: 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;
}
示例3: 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元"));
}
示例4: NewExceptionReasonCategory
/// <summary>
/// Method Creates a New User on the Admin -> New User page.
/// Will Save if save == true else will flash the Save button.
/// </summary>
/// <param name="browser">WatiN Browser Object</param>
/// <param name="code">Code Value</param>
/// <param name="description">Description Value</param>
/// <param name="efrom">Effective From Value</param>
/// <param name="eto">Effective To Value</param>
/// <param name="save">Save Value true will save false will cancel</param>
public void NewExceptionReasonCategory(Browser browser, string code, string description, string efrom, string eto, bool save)
{
browser.Button(Find.ById(new Regex("ctl00_MainContent_NewButton"))).Click();
browser.WaitUntilContainsText("Effective From");
browser.TextField(Find.ById(new Regex("ctl00_MainContent_ResultsRoundPanel_ExceptionReasonCatGridView_DXEditor1_I"))).SetAttributeValue("value", code);
browser.TextField(Find.ById(new Regex("ctl00_MainContent_ResultsRoundPanel_ExceptionReasonCatGridView_DXEditor2_I"))).SetAttributeValue("value", description);
browser.TextField(Find.ById(new Regex("ctl00_MainContent_ResultsRoundPanel_ExceptionReasonCatGridView_DXEditor3_I"))).TypeText(efrom);
browser.TextField(Find.ById(new Regex("ctl00_MainContent_ResultsRoundPanel_ExceptionReasonCatGridView_DXEditor4_I"))).TypeText(eto);
if (save == true)
{
browser.Image(Find.ByTitle("Update")).Click();
}
else
{
browser.Image(Find.ByTitle("Cancel")).Click();
}
}
示例5: NewExceptionReason
/// <summary>
/// Method Creates a New User on the Admin -> New User page.
/// Will Save if save == true else will flash the Save button.
/// </summary>
/// <param name="browser">WatiN Browser Object</param>
/// <param name="code">Code Value</param>
/// <param name="category">Category Value</param>
/// <param name="description">Description Value</param>
/// <param name="probability">Probability Value</param>
/// <param name="source">Source Value</param>
/// <param name="type">Type Value</param>
/// <param name="efrom">Effective From Value</param>
/// <param name="eto">Effective To Value</param>
/// <param name="save">Save Value</param>
public void NewExceptionReason(Browser browser, string code, string category, string description, string probability, string source, string type, string efrom, string eto, bool save)
{
browser.Button(Find.ById(new Regex("ctl00_MainContent_NewButton"))).Click();
browser.WaitUntilContainsText("Effective From");
browser.TextField(Find.ById(new Regex("ctl00_MainContent_ResultsRoundPanel_ExceptionReasonsGridView_DXEditor1_I"))).SetAttributeValue("value", code);
if (!category.Equals(""))
{
SelectERCategory(browser, category);
}
browser.TextField(Find.ById(new Regex("ctl00_MainContent_ResultsRoundPanel_ExceptionReasonsGridView_DXEditor3_I"))).SetAttributeValue("value", description);
if (!probability.Equals(""))
{
SelectERProbability(browser, probability);
}
if (!source.Equals(""))
{
SelectERSource(browser, source);
}
if (!type.Equals(""))
{
SelectERType(browser, type);
}
browser.TextField(Find.ById(new Regex("ctl00_MainContent_ResultsRoundPanel_ExceptionReasonsGridView_DXEditor7_I"))).TypeText(efrom);
browser.TextField(Find.ById(new Regex("ctl00_MainContent_ResultsRoundPanel_ExceptionReasonsGridView_DXEditor8_I"))).TypeText(eto);
if (save == true)
{
browser.Image(Find.ByTitle("Update")).Click();
}
else
{
browser.Image(Find.ByTitle("Cancel")).Click();
}
}
示例6: NewWarrantyVendorAccount
/// <summary>
/// Creates a New Warranty Vendor Account
/// Config Path = path to FTConfig.xml
/// </summary>
/// <param name="browser">WatiN Browser Object</param>
/// <param name="configpath">Config Path</param>
public void NewWarrantyVendorAccount(Browser browser, string configpath)
{
#region XMLDoc
XmlDocument admindoc = new XmlDocument();
admindoc.Load(configpath);
XmlNodeList xl = admindoc.SelectNodes("//GMSWarrantyVendorAccounts/account");
#endregion
browser.Button(Find.ById(new Regex("ctl00_MainContent_WarrantyVendorPanel_ResultsRoundPanel_NewButton"))).Click();
Console.Write(xl.Count);
foreach (XmlNode xn in xl)
{
string gbentity = xn["gbentity"].InnerText;
string accountingcode = xn["accountingcode"].InnerText;
string rac = xn["rac"].InnerText;
string efrom = xn["effectivefrom"].InnerText;
string eto = xn["effectiveto"].InnerText;
string save = xn["save"].InnerText;
browser.TextField(Find.ById(new Regex("ctl00_MainContent_WarrantyVendorPanel_ResultsRoundPanel_WarrantyVendorAccountsGridView_DXEditor1_I"))).Focus();
SelectGBEntity(browser, gbentity);
browser.TextField(Find.ById(new Regex("ctl00_MainContent_WarrantyVendorPanel_ResultsRoundPanel_WarrantyVendorAccountsGridView_DXEditor2_I"))).SetAttributeValue("value", accountingcode);
browser.TextField(Find.ById(new Regex("ctl00_MainContent_WarrantyVendorPanel_ResultsRoundPanel_WarrantyVendorAccountsGridView_DXEditor3_I"))).SetAttributeValue("value", rac);
browser.TextField(Find.ById(new Regex("ctl00_MainContent_WarrantyVendorPanel_ResultsRoundPanel_WarrantyVendorAccountsGridView_DXEditor4_I"))).TypeText(efrom);
browser.TextField(Find.ById(new Regex("ctl00_MainContent_WarrantyVendorPanel_ResultsRoundPanel_WarrantyVendorAccountsGridView_DXEditor5_I"))).TypeText(eto);
if (save.Equals("Y"))
{
browser.Image(Find.ByTitle("Update")).Click();
}
else
{
browser.Image(Find.ByTitle("Cancel")).Click();
}
}
}
示例7: TestUsersales
public void TestUsersales(Browser browser,string bigsource,string littlesource,string size,string material,string made,string weight,string price,string date1,string date,string storehouse)
{
//#*****************************************************************************
//# Purpose: define User sales function.
//# Author: bobby
//# Last Modify: apr 13, 2009
//#*****************************************************************************
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("可选择以下两种上传方式"));
//清空失误
if (browser.Link(Find.ById("ctl00_ContentPlaceHolder1_GridView1_ctl02_edititem")).Exists)
{
WatiN.Core.DialogHandlers.ConfirmDialogHandler dh1 = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
browser.AddDialogHandler(dh1);
browser.Button(Find.ByValue("全部删除")).ClickNoWait();
dh1.WaitUntilExists(15);//
dh1.OKButton.Click();//
dh1.WaitUntilExists(15);
dh1.OKButton.Click();
browser.RemoveDialogHandler(dh1);
}
browser.Image(Find.ByAlt("在线上传")).Click();
browser.WaitUntilContainsText("提示:此处显示所选品种的规格填写规则,单位 为毫米");
Assert.IsTrue(browser.ContainsText("提示:此处显示所选品种的规格填写规则,单位 为毫米"));
//大品种
browser.SelectList(Find.ById("ctl00_ContentPlaceHolder1_cmbCategory")).Option(bigsource).Select();
browser.WaitUntilContainsText(bigsource);
Assert.IsTrue(browser.ContainsText(bigsource));
//小品种
browser.SelectList(Find.ById("ctl00_ContentPlaceHolder1_cmbProductName")).Option(littlesource).Select();
browser.WaitUntilContainsText(littlesource);
Assert.IsTrue(browser.ContainsText(littlesource));
//规格
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_gg_h")).TypeText(size);
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_gg_k")).TypeText(size);
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_gg_c")).TypeText(size);
//材质
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_cz")).TypeText(material + date1);
//厂家
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_sccj")).TypeText(made + date1);
//重量
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_weight")).TypeText(weight);
//价格
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_price")).TypeText(price);
//日期
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_manufacturedate")).TypeText(date);
//仓库
browser.SelectList(Find.ById("ctl00_ContentPlaceHolder1_cmblistck")).Option(storehouse).Select();
browser.WaitUntilContainsText(storehouse);
Assert.IsTrue(browser.ContainsText(storehouse));
//确定资源录入
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_Button2")).Click();
//挂牌
browser.CheckBox(Find.ById("ctl00_ContentPlaceHolder1_GridView1_ctl02_gv_Chk")).Checked = true;
browser.WaitUntilContainsText("可选择以下两种上传方式");
Assert.IsTrue(browser.ContainsText("可选择以下两种上传方式"));
//第一次
WatiN.Core.DialogHandlers.ConfirmDialogHandler dh = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
browser.AddDialogHandler(dh);
browser.Button(Find.ByValue("全部挂")).ClickNoWait();
dh.WaitUntilExists(15);//
dh.OKButton.Click();//
dh.WaitUntilExists(15);
dh.OKButton.Click();
browser.RemoveDialogHandler(dh);
}
示例8: TestUserbargainingorder
public void TestUserbargainingorder(Browser browser, string url, string material, string date1, string number, string ordertype, string button)
{
//#*****************************************************************************
//# Purpose: define User placeorder function.
//# Author: bobby
//# Last Modify: apr 13, 2009
//#*****************************************************************************
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);
//点击pop出来的确认对话框
WatiN.Core.DialogHandlers.ConfirmDialogHandler dh = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
browser.AddDialogHandler(dh);
browser.Link(Find.ById("ctl00_ContentPlaceHolder1_linkBuildOrders")).ClickNoWait();
dh.WaitUntilExists(15);//
dh.OKButton.Click();//
browser.RemoveDialogHandler(dh);
//自动分单
browser.WaitUntilContainsText("系统自动分单");
Assert.IsTrue(browser.ContainsText("系统自动分单"));
browser.SelectList(Find.ById("ctl00_ContentPlaceHolder1_dlPreviewList_ctl00_cmbPurcharseordertype")).Option(Find.ByText(ordertype)).Select();
//点击pop出来的确认对话框
WatiN.Core.DialogHandlers.ConfirmDialogHandler dh1 = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
browser.AddDialogHandler(dh1);
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnBuld")).ClickNoWait();
dh1.WaitUntilExists(3);//
dh1.OKButton.Click();//
browser.RemoveDialogHandler(dh1);
//意向订单
browser.WaitUntilContainsText("选择需要的订单,生成意向订单");
Assert.IsTrue(browser.ContainsText("选择需要的订单,生成意向订单"));
browser.RadioButton(Find.ByName("radionSelect")).Checked = true;
//意向订单-->订单生效
//这个要参数化
browser.Button(Find.ById(button)).Click();
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_txtDiscount")).TypeText("10");
//WatiN.Core.DialogHandlers.AlertAndConfirmDialogHandler dh3 = new WatiN.Core.DialogHandlers.AlertAndConfirmDialogHandler();
//browser.AddDialogHandler(dh3);
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnSubmit")).ClickNoWait();
//dh3.WaitUntilExists(3);//
//dh3.OKButton.Click();//
//browser.RemoveDialogHandler(dh3);
//Thread.Sleep(2000);
}
示例9: TestUseradddiscount
public void TestUseradddiscount(Browser browser,string date)
{
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_btnNew")).Click();
//日期
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_txtStartDate")).TypeText(date);
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_txtEndDate")).TypeText(date);
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnPricelistDetail")).Click();
/*
//选供应商
browser.Image(Find.ByTitle("供应商查询")).ClickNoWait();
Browser DW=IE.AttachToIE(Find.ByUrl("http://192.168.0.21/Trade/Price/OrgDetail.aspx?index=ctl00_ContentPlaceHolder1_gvDetail_ctl02_"));
DW.TextField("txtDWMC").TypeText("自动供应商");
DW.Button("btnSearch").Click();
//DW.Button(Find.ByName("1001")).Click();
DW.Button(Find.ByValue("选择")).Click();
/*
//选小品种
browser.Image(Find.ByTitle("品种查询")).ClickNoWait();
Browser DW1=IE.AttachToIE(Find.ByUrl("http://192.168.0.21/Trade/Price/Product.aspx?orgid=0&index=ctl00_ContentPlaceHolder1_gvDetail_ctl02_"));
browser.WaitUntilContainsText("小品种代码");
DW1.TextField(Find.ById("txtProductName")).TypeText("焊接用钢盘条");
DW1.Button(Find.ById("btnSearch")).Click();
DW1.Button(Find.ByValue("选择")).Click();*/
//选资源
browser.Image(Find.ByTitle("资源查询")).ClickNoWait();
Browser DW2=IE.AttachToIE(Find.ByUrl("http://192.168.0.21/Trade/Price/ProductDetail.aspx?orgid=0&productid=0&index=ctl00_ContentPlaceHolder1_gvDetail_ctl02_"));
browser.WaitForComplete(120);
DW2.TextField(Find.ById("txtcz")).TypeText("脚本");
DW2.Button(Find.ById("Button1")).Click();
DW2.Button(Find.ByValue("选择")).Click();
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_gvDetail_ctl02_txtQty")).TypeText("1");
browser.TextField(Find.ById("ctl00_ContentPlaceHolder1_gvDetail_ctl02_txtAmount")).TypeText("100");
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnSave")).ClickNoWait();
browser.WaitUntilContainsText("折扣设置");
Assert.IsTrue(browser.ContainsText("折扣设置"));
//状态生效
raid=browser.RadioButton(Find.ByName("radionSelect")).Id;
browser.RadioButton(Find.ByName("radionSelect")).Checked = true;
WatiN.Core.DialogHandlers.ConfirmDialogHandler dh4 = new WatiN.Core.DialogHandlers.ConfirmDialogHandler();
browser.AddDialogHandler(dh4);
browser.Button(Find.ById("ctl00_ContentPlaceHolder1_btnEffect")).ClickNoWait();
dh4.WaitUntilExists(15);//
dh4.OKButton.Click();//
dh4.WaitUntilExists(15);
dh4.OKButton.Click();
browser.RemoveDialogHandler(dh4);
Thread.Sleep(1000);
}