本文整理匯總了C#中WatiN.Core.IE.CssSelectAll方法的典型用法代碼示例。如果您正苦於以下問題:C# IE.CssSelectAll方法的具體用法?C# IE.CssSelectAll怎麽用?C# IE.CssSelectAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WatiN.Core.IE
的用法示例。
在下文中一共展示了IE.CssSelectAll方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Test001_UniversalSelectors
public void Test001_UniversalSelectors()
{
using (Browser browser = new IE("http://localhost:8181/"))
{
var links = browser.CssSelectAll("*");
Console.WriteLine("{0} -- {1}", links.Count(), browser.Elements.Count()); //shouldn't these match?
Assert.That(links.Count() > 20);
}
}
示例2: Test999_ClassSelectors
public void Test999_ClassSelectors()
{
using (Browser browser = new IE("http://localhost:8181/"))
{
var menu = browser.CssSelectAll("table.menu");
Assert.That(menu.Count() == 1);
}
}
示例3: Test003_AttributeSelectors_HasAttribute
public void Test003_AttributeSelectors_HasAttribute()
{
using (Browser browser = new IE("http://localhost:8181/"))
{
var links = browser.CssSelectAll("a[title]");
Assert.That(links.Any(e => e.TagName == "A"));
}
}
示例4: Test004_AttributeSelectors_ExactValue
public void Test004_AttributeSelectors_ExactValue()
{
using (Browser browser = new IE("http://localhost:8181/"))
{
var links = browser.CssSelectAll("a[title='ASP.NET Website']");
Assert.That(links.Count() == 1);
}
}
示例5: Test002_TypeSelectors
public void Test002_TypeSelectors()
{
using (Browser browser = new IE("http://localhost:8181/"))
{
var links = browser.CssSelectAll("a");
Assert.That(links.Count() > 1);
Assert.That(links.First().Text == "Log In");
}
}