本文整理匯總了C#中Browser.SilverlightApps方法的典型用法代碼示例。如果您正苦於以下問題:C# Browser.SilverlightApps方法的具體用法?C# Browser.SilverlightApps怎麽用?C# Browser.SilverlightApps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Browser
的用法示例。
在下文中一共展示了Browser.SilverlightApps方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GivenCleanCalculator
public void GivenCleanCalculator()
{
Manager.Current.LaunchNewBrowser(BrowserType.Chrome);
browser = Manager.Current.ActiveBrowser;
browser.NavigateTo(@"http://demos.telerik.com/silverlight/#Menu/Configurator");
browser.WaitUntilReady();
slApp = browser.SilverlightApps()[0];
}
示例2: TestWeb
public void TestWeb()
{
Settings mySettings = new Settings();
mySettings.Web.DefaultBrowser = BrowserType.FireFox;
mySettings.Web.EnableSilverlight = true;
Manager myManager = new Manager(mySettings);
myManager.Start();
myManager.LaunchNewBrowser();
// Navigate to the page
//myManager.ActiveBrowser.NavigateTo(URL, false);
// Launch a browser instance
browser = Manager.Current.ActiveBrowser;
browser.NavigateTo(URL, false);
browser.WaitUntilReady();
var aframes = browser.Frames;
var adesktop = browser.Desktop;
var time = browser.CommandTimeOut;
var tree = browser.DomTree;
var nodes = tree.Root.ChildNodes;
var child = tree.Root.Children;
// Get an instance of our Silverlight app.
SilverlightApp app = browser.SilverlightApps()[0];
var xmllist = app.Find.AllByType<Button>();
var uilist = app.Find.AllByType<ArtOfTest.WebAii.Silverlight.UI.Button>();
var idlist = app.Find.AllByAutomationId("radButton");
var byname = app.Find.AllByName("EXPLORE ALL CONTROLS");
var text = app.Find.AllByTextContent("EXPLORE ALL CONTROLS");
app.RefreshVisualTrees();
// Click the button
var btn = app.FindName<ArtOfTest.WebAii.Silverlight.UI.Button>("EXPLORE ALL CONTROLS");
btn.User.Click();
// Verify the text
}