Hi folks,
A few days ago i came across the Telerik Testing framework, so i downloaded it and had it installed, having in mind that i will be able to do a UI test on Silverlight. I am using Visual Studio 2010 and i am trying to open this web page : http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html
After this i just want to identify a few components from the Silverlight object and perform a few actions.
So i created a New C# Test Project and added the references to the Telerik framework, wrotw my code and ran the test. The result was that the SilverlightAppsList is gets 1 app, but for some reason it is timed out and i cannot see the SilverlightApp in this list be cause it is not null, but all the members are timed out, as you can see in the screenshot.
What am i doing wrong?
My code looks like this:
A few days ago i came across the Telerik Testing framework, so i downloaded it and had it installed, having in mind that i will be able to do a UI test on Silverlight. I am using Visual Studio 2010 and i am trying to open this web page : http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html
After this i just want to identify a few components from the Silverlight object and perform a few actions.
So i created a New C# Test Project and added the references to the Telerik framework, wrotw my code and ran the test. The result was that the SilverlightAppsList is gets 1 app, but for some reason it is timed out and i cannot see the SilverlightApp in this list be cause it is not null, but all the members are timed out, as you can see in the screenshot.
What am i doing wrong?
My code looks like this:
using
System;
using
System.Text;
using
System.Collections.Generic;
using
System.Linq;
using
Microsoft.VisualStudio.TestTools.UnitTesting;
using
ArtOfTest.WebAii.Core;
using
ArtOfTest.WebAii.TestTemplates;
using
ArtOfTest.WebAii.Extensions;
using
ArtOfTest.WebAii.Silverlight;
using
ArtOfTest.WebAii.Silverlight.UI;
using
ArtOfTest.WebAii.Silverlight.Attributes;
using
ArtOfTest.Common;
using
ArtOfTest.WebAii.Controls.Xaml;
using
ArtOfTest.WebAii.Controls.HtmlControls;
namespace
TestProject7
{
[TestClass]
public
class
UnitTest1
{
public
UnitTest1()
{
}
private
TestContext testContextInstance;
public
TestContext TestContext
{
get
{
return
testContextInstance;
}
set
{
testContextInstance = value;
}
}
[TestMethod]
public
void
TestMethod1()
{
Settings mySettings =
new
Settings();
mySettings.Web.DefaultBrowser = BrowserType.Chrome;
mySettings.ClientReadyTimeout = 120000;
Manager myManager =
new
Manager(mySettings);
//must start myManager after creating it
myManager.Start();
try
{
Settings.Current.Web.EnableSilverlight =
true
;
mySettings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
myManager.LaunchNewBrowser();
myManager.ActiveBrowser.NavigateTo(
"http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html"
);
myManager.ActiveBrowser.WaitUntilReady();
SilverlightAppsList apps = myManager.ActiveBrowser.SilverlightApps();
SilverlightApp app = apps.ToArray()[0];
string
ok =
"I am glad if this is executed :)"
;
}
catch
(Exception e)
{
myManager.Dispose();
}
}
}
}