Settings settings = GetSettings();settings.Web.DefaultBrowser = BrowserType.InternetExplorer;settings.Web.EnableSilverlight = true;Initialize(settings, new TestContextWriteLine(this.TestContext.WriteLine));Manager.LaunchNewBrowser();ActiveBrowser.NavigateTo("http://localhost/TestSLAppTestPage.html");ActiveBrowser.WaitUntilReady();var slApp = ActiveBrowser.SilverlightApps()[0];Assert.IsNotNull(slApp);var button = slApp.FindName<Button>("button1");Assert.IsTrue(button.Text.Equals("Click Me"));
When I run this test it passes but I am unable to debug it. When I put a breakpoint at ActiveBrowser.SilverlightApps line and try to evaluate the object returned by the method it gives an error saying that Function evaluation timed out. and Function evaluation disabled because a previous function timed out.
Error: PipeCommunication.AsyncPipeRead() : EXCEPTION ("Pipe Null State: False")
Type: System.Threading.ThreadAbortException
Message: Thread was being aborted.
Call Stack:
at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne()
at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.AsyncPipeRead(PipeStream pipe, Byte[] bytes, Int32 offset, Int32 count)
The program '[7604] QTAgent32.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
ConfirmDialog confirmDialog = ConfirmDialog.CreateConfirmDialog(Manager.Current.ActiveBrowser, DialogButton.OK);
confirmDialog.HandlerDelegate = new DialogHandlerDelegate(this.ConfirmHandleDialog);
Manager.Current.DialogMonitor.AddDialog(confirmDialog);
Manager.Current.DialogMonitor.Start();
// Click the button
this.Action.MouseClickItem(RSSControls.Applications.ApplicationsEditLoginPage.DeleteQuestion);
confirmDialog.WaitUntilHandled();
Manager.Current.DialogMonitor.RemoveDialog(confirmDialog);
Manager.Current.DialogMonitor.Stop();
private void ConfirmHandleDialog(IDialog dialog)
{
ArtOfTest.WebAii.Win32.Button b = new ArtOfTest.WebAii.Win32.Button(dialog.Window, "OK", false);
b.Click();
dialog.HandleCount = 1;
Manager.Current.DialogMonitor.RemoveDialog(dialog);
}
Am I doing something incorrect? The tests work correctly when I run them individually but when I run them together the second test does not work. The message box confirmation box pops up, but it never gets handled. I have looked all over the internet and found several examples of how to use this feature, however I am still having problems.
Also, does this function work in IE7? It appears to not work at all when I test my tests against an IE7 machine.
Hello Admin,
I am testing a Silverlight application with .NET 4.0 Framework, We have a functionality like AttachSignature, Which Invokes windows open dialogue to attach the jpeg signature. This testing need to be automated using Telirk webaii Framework, I do not have any methods to test for this test case. Can you please help me with anything ….
[TestMethod][Description("Detect images as they arrive from the web server")]public void ImageDetection(){ Manager.Settings.Web.UseHttpProxy = true; Manager.LaunchNewBrowser(BrowserType.InternetExplorer); ResponseListenerInfo li = new ResponseListenerInfo(CheckTypeForImage); Manager.Http.AddBeforeResponseListener(li); ActiveBrowser.NavigateTo("http://news.google.com/"); Manager.Http.RemoveBeforeResponseListener(li); // Check the test results for a log of all responses during the page load}#1 _manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle; _manager.DialogMonitor.AddDialog(new FileUploadDialog(_manager.ActiveBrowser, fileNameToUpload, DialogButton.OPEN, "Choose File to Upload")); _manager.DialogMonitor.Start(); _manager.ActiveBrowser.WaitUntilReady(); HtmlInputFile updlg = _manager.ActiveBrowser.Find.ById<HtmlInputFile>("ctl00_MainContent_FileUpload1"); #2 updlg.Click();
when I comment line #1, the dialog opens and right away closes. When I leave line #1 uncommented, then the dialog opens, after a couple of secs, it flickers,
then it flickers, then it stays there forever without moving to the next line of code.
for line #2, updlg.MouseClick() doesnt seem to do anything.
But all of this works fine in IE8!!! Can you guys tell me if there is any way this can be made to work in IE9? If that
is not possible, then is there an Add on for newer versions for Firefox?
When I try firefox, I see it open the window, but nothing happens and the address bar has this text: "about:blank?!!AOT2.0!Pipe.ArtOfTest.WebAii.BrowserProvisioner_517858088"
Am i missing some steps in setting up firefox?