or
if (ButtonElement != null){ ButtonElement.ScrollToVisible(); ButtonElement.MouseHover(); ButtonElement.MouseClick();}Else { Do Something }Initialization method MyTests.InitializeTest threw exception.System.Configuration.ConfigurationErrorsException: System.Configuration.ConfigurationErrorsException:
An error occurred creating the configuration section handler for WebAii.Settings: Could not load file
or assembly 'ArtOfTest.WebAii' or one of its dependencies. The system cannot find the file specified.
(C:\MyTests\bin\Debug\TestResults\akharlamov 2011-01-30 12_53_49\Out\MyTests.dll.config line 5) --->
System.IO.FileNotFoundException: Could not load file or assembly 'ArtOfTest.WebAii' or one of its
dependencies.<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler, ArtOfTest.WebAii" /> </configSections> <WebAii.Settings annotateExecution="true" baseUrl="http://local.mytests.com" clientReadyTimeout="50000" defaultBrowser="FireFox" enableScriptLogging="false" enableUILessRequestViewing="false" executionDelay="0" executionTimeout="60000" localWebServer="None" logLocation="C:\WebAiiLog\MyTests" queryEventLogErrorsOnExit="false" simulatedMouseMoveSpeed="1" webAppPhysicalPath="/" recycleBrowser="false" killBrowserProcessOnClose="true" /></configuration>mstest /testcontainer:MyTests.dll<section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler, ArtOfTest.WebAii, Version=2.0.50727, Culture=neutral, PublicKeyToken=4fd5f65be123776c"/>try{ Button btnRemoveDashboard = GlobalObject.SILVERLIGHTAPP.Find.ByName<Button>("btnRemoveDashboard"); GlobalObject.MANAGER.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle; GenericDialog altDlg = new GenericDialog(SM2Utilities.GlobalObject.BROWSER, "Close" + strDBName, true, "OK", "Are you sure you want to remove this dashboard and all of its panels?"); altDlg.HandlerDelegate = MyCustomAlertHandler; altDlg.DismissButton = DialogButton.OK; GlobalObject.MANAGER.DialogMonitor.AddDialog(altDlg); GlobalObject.MANAGER.DialogMonitor.Start(); btnRemoveDashboard.User.Click(); altDlg.WaitUntilHandled(5000); GlobalObject.MANAGER.DialogMonitor.RemoveDialog(altDlg); GlobalObject.MANAGER.DialogMonitor.Stop(); GlobalObject.MANAGER.Dispose();}catch (Exception){}public static void MyCustomAlertHandler(IDialog dialog){ Window okButton = WindowManager.FindWindowRecursively(dialog.Window.Handle, "OK", false, 0); GlobalObject.MANAGER.Desktop.Mouse.Click(MouseClickType.LeftClick, okButton.Rectangle); dialog.HandleCount++;}
Hello Team,
The Silverlight application under test that I verify is sometimes generating "Error On Page, and my test failed.
So to avoid to continue the test for nothing, I would like to know if there is a way to know, within the framework, if an IE "Error on Page" has occured.
The browser type in use is IE 8.
I have attached a screenshot to illustrate this type of error.
Thanks & Regards.