or
I am using IE8, VS 2010, Silverlight app for our application. Also using webAii framework 2010.2.927.
I am trying to use the below code provided by telerik admin for file upload dunctionality. I am not able to define a new windows object and I get compilation error: The type or namespace name 'Window' could not be found are you missing an assembly reference?
I am not able to use the assembly artoftest.webaii.win32.window in this version. Is this a bug or have you changed the assembly?
Is there an alternative to this code to handle the fileupload dialog? Please help.
Window w = WindowManager.FindWindowRecursively(IntPtr.Zero,
"Upload"
,
true
, 1000);
w.SetFocus();
w.SetActive();
app.Desktop.KeyBoard.SendString(
"MyFilePath"
);
ArtOfTest.WebAii.Win32.
Button openButton =
new
ArtOfTest.WebAii.Win32.Button(w.Handle,
"Open"
,
true
);
openButton.Click();
Shwetha
Manager.ActiveBrowser.Find.ByTagIndex<HtmlInputFile>(
"input"
, 0).Upload
(Path.Combine(Globals.PATH_TO_PAGES, @
"..\SupportFiles\EmptyTextFile.txt"
), 5000);
HtmlAnchor a = this.manager.ActiveBrowser.Find.ByContent<HtmlAnchor>("LoginLink");
if (null != a)
{
a.Click();
}
this.manager.ActiveBrowser.WaitUntilReady();
this.manager.ActiveBrowser.RefreshDomTree();
// 0 in list...
SilverlightApp app = this.manager.ActiveBrowser.SilverlightApps()[0];
Any ideas? I'm guessing that it's due to the additional frames - I've managed to get the following:
Browser b = this.manager.ActiveBrowser.Frames["Menu"];
To work, but the returned Browser object seems not to be quite the same as a "normal" browser, and so still can't find any SL apps...
Anyone?