Hello,
I have to launch my Silverlight application for automating my testing, I am now working with Internet Browser for now, but I ideally need to automate my testing by initiating the desktop link to of Silverlight application to test. I have tried couple of options posted in some the following links..
I hope I am missing something…Please help me on the same…
Find my desktop link properties::
"C:\Program Files (x86)\Microsoft Silverlight\sllauncher.exe" 846926624.localhost
Code Below:
//ABI
[TestMethod]
public void SilverlightApplicationFileUploadExample4()
{
var settings = GetSettings();
settings.EnableSilverlight = true;
Window buttonToClick = null;
Initialize(settings, Console.WriteLine);
Manager.Settings.ExecutionDelay = 10;
//Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
//ActiveBrowser.NavigateTo("http://localhost/Web/FieldClaims.aspx");
Manager.LaunchNewBrowser(BrowserType.SilverlightOutOfBrowser, true, System.Diagnostics.ProcessWindowStyle.Minimized, "846926624.localhost"); //Fails here with Script Error
}
var bro = Manager.Current.ActiveBrowser;
var frame = bro.Frames[
"my_frame"
];
frame.RefreshDomTree();
var rect = frame.Find.ById(
"my_div"
).GetRectangle();
Manager.Current.Desktop.Mouse.Click(MouseClickType.LeftClick, rect);
<
iframe
name
=
"my_frame"
src
=
"2.html"
style
=
"position: absolute; width: 200px; height: 200px; top: 300px; left: 300px;"
>
<
div
id
=
"my_div"
onclick
=
"alert(1)"
style
=
"margin: 40px; width: 30px; height: 30px; background: red"
></
div
>
using
ArtOfTest.WebAii.Core;
yet it will still not build, and I missing a ref?
Hi Team,
I am stuck in the following area since couple of days.
We are implementing Keyword framework with Test Studio and we are facing few issues while implementing the silver light Keywords.
In our excel sheet we are passing the Parent object before accessing the underlying object in a particular page.
Now to access the Parent element we need to create a string as shown below and execute it.
But we are unable to execute the string or know how to create proper string.
Pages + "." + pageName + "." + Find.ByName<HtmlInputText>(objID).Text = inputData;
In Visual studio it is giving error as “An object reference is required for non static field method or property “ArtOfTest.webAii.Core.Find.ByName<TControl>(String)”
Please let us know how to resolve this issue.We tried several ways by referring samples posted in the net,
e.g. http://social.msdn.microsoft.com/Forums/eu/csharpgeneral/thread/f248d774-0918-4f68-a0c6-23aa29a7ae29
But after doing any modifications @ above link/code we are not able to execute it successfully.
Please help or let us know if there is some other way to resolve the issue.
Regards,
Tapan