本文整理匯總了C#中WatiN.Core.IE.Para方法的典型用法代碼示例。如果您正苦於以下問題:C# IE.Para方法的具體用法?C# IE.Para怎麽用?C# IE.Para使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WatiN.Core.IE
的用法示例。
在下文中一共展示了IE.Para方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: LocatingThings
public void LocatingThings()
{
using (var browser =
new IE("http://www.pluralsight.com"))
{
//// Get a reference to a HTML input element, type=text, id=Name
//TextField applicantName = browser.TextField(Find.ById("Name"));
//// Get a reference to a HTML link element with id=HelpLink
//Link helpHyperlink = browser.Link(Find.ById("HelpLink"));
//// Get a reference to a HTML input element, type=submit, id=ApplyNow
//Button applyButton = browser.Button(Find.ById("ApplyNow"));
//// Get a reference to a HTML paragraph element, id=Name
//Para nameParagraph = browser.Para(Find.ById("Name"));
TextField applicantName = browser.TextField(Find.ById("Name"));
Link helpHyperlink = browser.Link(Find.ById("HelpLink"));
Button applyButton = browser.Button(Find.ById("ApplyNow"));
Para nameParagraph = browser.Para(Find.ById("Name"));
}
}
示例2: ShouldShowCorrectApplicantDetailsOnSuccessPage
public void ShouldShowCorrectApplicantDetailsOnSuccessPage()
{
using (var browser =
new IE("http://localhost:62727/Pages/ApplyForCreditCard.aspx"))
{
// Leave the browser open after the test completes
// to see what's happened for demo purposes
browser.AutoClose = false;
browser.TextField(Find.ById("Name")).TypeText("Jason");
browser.TextField(Find.ById("Age")).TypeText("30");
browser.TextField(Find.ById("AirlineRewardNumber")).TypeText("A1234567");
browser.Button(Find.ById("ApplyNow")).Click();
var name = browser.Para(Find.ById("Name")).Text;
Assert.That(name, Is.EqualTo("Jason"));
}
}