I've written a popup watcher code module which appear to work fine, the only thing I've noticed is that it takes a long time to instantiate when the tests are being run manually(roughly 4 mins), this is pretty annoying as they are written into the setup of each suite.
Wondering if there's something regarding the code where it could be more eloquent to speed it up, Ive had a look at the user guides and the code is very similar and cannot see anyone with a similar issues
Here's the code,sorry for the lack of snapshot but the issue is random and occurs on the automation server overnight
Code: Select all
{
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;
//Instantiate the popupwatcher
PopupWatcher TcasErrorScreen = new PopupWatcher();
//tell the popupwatcher what to look for
TcasErrorScreen.WatchAndClick(repo.TransactorOkNoYesPopups.SelfInfo, repo.TransactorOkNoYesPopups.TcasRunTimeError402forpopupwatcherInfo);
//start the popupwatcher
TcasErrorScreen.Start();
if(repo.TransactorOkNoYesPopups.TcasRunTimeError402forpopupwatcherInfo.Exists())
{
Report.Failure("Run Time Error 402 Appeared");
Report.Screenshot(repo.TransactorOkNoYesPopups.Self);
repo.TransactorOkNoYesPopups.TransactorPopupOKBtn.MoveTo();
repo.TransactorOkNoYesPopups.TransactorPopupOKBtn.Click();
}