public static void WaitOpenSpan() { Console.WriteLine("Launch WaitOpenSpan() procedure"); Thread.Sleep(35000); for (int i = 1; i < 5; i++) { Console.WriteLine("Attempt " + i.ToString() + " of 5"); System.Diagnostics.Process[] myProcess = System.Diagnostics.Process.GetProcesses(); foreach (System.Diagnostics.Process p in myProcess) { if (p.ProcessName.Contains("OpenSpan.Runtime")) { White.Core.Application OpenSpan = White.Core.Application.Attach("OpenSpan.Runtime"); Thread.Sleep(5000); var OpenSpanPanels = Desktop.Instance.GetMultiple(SearchCriteria.ByControlType(ControlType.Pane)); foreach (var OpenSpanPanel in OpenSpanPanels) { Console.WriteLine("Search OpenSpan application Bar"); if (OpenSpanPanel.Name.Contains("Application Bar")) { return; } } } } Thread.Sleep(3000); } }
public static void RunVipr() { Console.WriteLine("Launch ViPr"); ViPr = White.Core.Application.Launch("c:\\Program Files\\ViPr\\ViPr.exe"); //ViPr.WaitWhileBusy(); Thread.Sleep(25000); }
public void Setup() { var directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var markpadLocation = Path.Combine(directoryName, @"WpfTodo.exe"); Application = Application.Launch(markpadLocation); //MainWindow = new TodoWindow(Application, Application.GetWindow("Wpf Todo")); }
public void SetUp() { application = Application.Launch( @"..\..\..\Components\CustomCommands\Tests\WPFTestApplication\bin\debug\White.CustomCommands.WPFTestApplication.exe"); window = application.GetWindow("Form1"); }
public static void CloseOpenSpanWindow() { Console.WriteLine("Launch CloseOpenSpanWindow() procedure"); Thread.Sleep(35000); for (int i = 1; i < 5; i++) { Console.WriteLine("Attempt " + i.ToString() + " of 5"); System.Diagnostics.Process[] myProcess = System.Diagnostics.Process.GetProcesses(); foreach (System.Diagnostics.Process p in myProcess) { if (p.ProcessName.Contains("OpenSpan.Runtime")) { White.Core.Application OpenSpan = White.Core.Application.Attach("OpenSpan.Runtime"); Thread.Sleep(5000); List <Window> OpenSpanWindows = OpenSpan.GetWindows(); foreach (Window OpenSpanWin in OpenSpanWindows) { Console.WriteLine("Close OpenSpan Window"); Console.WriteLine("Openspan Window: " + OpenSpanWin.Name); if (OpenSpanWin.Name.Contains("OpenSpan Project")) { OpenSpanWin.Close(); return; } } } } Thread.Sleep(3000); } }
public void RunTheApplication() { application = Application.Launch("ShopSchedule.exe"); Assume.That(application, Is.Not.Null, "Application failed to start!"); mainWindow = application.GetWindows()[0]; Assume.That(mainWindow, Is.Not.Null, "Could not find the primary window!"); }
public virtual MainScreen SetUp(InitializeOption initializeOption) { WinFormTestConfiguration configuration = new WinFormTestConfiguration(string.Empty); application = configuration.Launch(); ScreenRepository screenRepository = new ScreenRepository(application.ApplicationSession); mainScreen = screenRepository.Get<MainScreen>("Form1", initializeOption); return mainScreen; }
public AuctionSniperDriver(int timeoutMillis) { application = Application.Attach(ProcessName); window = application.GetWindow("Form1"); Assert.That(window.DisplayState, Is.EqualTo(DisplayState.Restored)); }
public override IMainWindow GetMainWindow(Application application) { var ieWindow = (InternetExplorerWindow)application.GetWindow("TestSilverlightApplication - Windows Internet Explorer"); var mainWindowAdapter = new ProxyGenerator() .CreateInterfaceProxyWithoutTarget<IMainWindow>(new SilverlightAdditionalCallsInterceptor(ieWindow.SilverlightDocument), new ForwardIfExistsInterceptor(ieWindow.SilverlightDocument)); return mainWindowAdapter; }
public void GivenIAmAtANon_BlackLevel() { _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe"); _mainWindow = _application.GetWindow("MainWindow"); _mainWindow.Get<Button>("goToRedLevelButton").Click(); var firstPrinciple = _mainWindow.Get<ListBox>("principlesListView").Items[0]; Assert.That(firstPrinciple.Text, Is.StringContaining(Resource.DoNotRepeatYourself)); }
public void CleanupApplication() { if (mainWindow != null) { mainWindow.Close(); mainWindow = null; } if (application != null && application.HasExited) { application.Kill(); application = null; } }
public void GivenIFinishMyRetrospectiveWithASuggestionToAdvanceToTheNextLevel() { File.Delete(@"..\..\CcdAddIn.TestHarness\bin\Debug\repository"); File.Copy(@"..\..\repository21perfectRetrospectives", @"..\..\CcdAddIn.TestHarness\bin\Debug\repository"); _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe"); _mainWindow = _application.GetWindow("MainWindow"); _mainWindow.Get<Button>("retrospectiveButton").Click(); _mainWindow.Get<Button>("retrospectiveDoneButton").Click(); File.Delete("repository"); }
public static void RunNew() { Console.WriteLine("Launch Corkboard"); CorkBoardApp = Application.Launch("C:\\Program Files\\SastMacros\\CORKBOARD_PRD\\CorkBoard.exe"); Console.WriteLine("Corkboard - Start Wait while busy: " + System.DateTime.UtcNow); CorkBoardApp.WaitWhileBusy(); Console.WriteLine("Corkboard - Stop Wait while busy: " + System.DateTime.UtcNow); Thread.Sleep(20000); CorkBoardApp.GetWindow("CorkBoard").Close(); Thread.Sleep(2000); }
public GameOnApplicationRunner(string bareBonesAreBonesExeLocation) { string fullPathToExe = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), bareBonesAreBonesExeLocation); try { GameOnApplication = Application.Launch(fullPathToExe); } catch (Exception exception) { throw new Exception(string.Format("Error launching app '{0}'.", fullPathToExe), exception); } MainWindow = new GameOnMainWindow(GameOnApplication); }
public void OpenNetworkWindow() { Application = Application.Launch(@"C:\Users\Flotschi\git\handle\Handle.WPF\Handle.WPF\bin\Debug\Handle.WPF.exe"); Assert.IsNotNull(Application); MainWindow = Application.GetWindow("Handle"); Assert.IsNotNull(MainWindow); MainWindow.Focus(); Keyboard.LeaveAllKeys(); Keyboard.HoldKey(KeyboardInput.SpecialKeys.CONTROL); Keyboard.Enter("n"); NetworkWindow = MainWindow.ModalWindow("Networks"); Assert.IsNotNull(NetworkWindow); Keyboard.LeaveAllKeys(); NetworkWindow.Close(); Application.Kill(); }
public virtual void LaunchApplication() { try { keyboard = Keyboard.Instance; testConfiguration = testMode.GetConfiguration(CommandLineArguments, this); application = testConfiguration.Launch(); BaseTestFixtureSetup(); TestFixtureSetUp(); } catch (Exception e) { WhiteLogger.Instance.Error(e); TextFixtureTearDown(); throw; } }
public void Start() { Application = Application.Launch(@"C:\Users\Flotschi\git\handle\Handle.WPF\Handle.WPF\bin\Debug\Handle.WPF.exe"); Assert.IsNotNull(Application); MainWindow = Application.GetWindow("Handle"); Assert.IsNotNull(MainWindow); MainWindow.Focus(); }
public void GivenIStartAtTheRedLevel() { _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe"); _mainWindow = _application.GetWindow("MainWindow"); _mainWindow.Get<Button>("goToRedLevelButton").Click(); }
private void StartApplication() { applicationUnderTest = Application.Launch(ApplicationPath); }
public void CKitLaunchAndSOPSearch() { //Run Internet Explorer White.Core.Application IE = White.Core.Application.Launch("C:\\Program Files\\Internet Explorer\\iexplore.exe"); Thread.Sleep(15000); Window IEWindow = IE.GetWindow("Pages - Your Cigna Life - Microsoft Internet Explorer provided by CIGNA-Link", White.Core.Factory.InitializeOption.NoCache); IEWindow.Get <White.Core.UIItems.TextBox>("Address").SetValue("https://cigna.esecurecare.net/"); Thread.Sleep(6000); IEWindow.Get <White.Core.UIItems.TextBox>("Address").Click(); UserInputs.PressEnter(); Thread.Sleep(5000); Window IEModalWindow = IEWindow.ModalWindows()[0]; IEModalWindow.Get <White.Core.UIItems.TextBox>("User name:").SetValue(NunitSettings.InternalId.Substring(9)); IEModalWindow.Get <White.Core.UIItems.TextBox>("Password:"******"OK").Click(); Thread.Sleep(5000); IEWindow.Focus(DisplayState.Restored); Console.WriteLine("Looking for Search Button"); White.Core.UIItems.Button SearchButton = IEWindow.Get <White.Core.UIItems.Button>("Search"); Console.WriteLine("Search button found. Get Clickable Point"); Point SearchClickablePoint = SearchButton.Bounds.TopLeft; SearchClickablePoint.Offset(-100, 10); Mouse.Instance.Click(SearchClickablePoint); Console.WriteLine("Enter RNC"); UserInputs.Enter("RNC"); UserInputs.PressEnter(); Thread.Sleep(3000); White.Core.UIItems.Hyperlink RNCLink = IEWindow.Get <White.Core.UIItems.Hyperlink>("Reimbursement RNC 501 Processing Reference Guide"); RNCLink.Click(); Thread.Sleep(2000); Console.WriteLine("Looking for Search Button on RNC page"); SearchButton = IEWindow.Get <White.Core.UIItems.Button>("Search"); SearchClickablePoint = SearchButton.Bounds.TopLeft; SearchClickablePoint.Offset(-100, 10); Mouse.Instance.Click(SearchClickablePoint); Console.WriteLine("Enter document directory"); UserInputs.Enter("document directory"); UserInputs.PressEnter(); Thread.Sleep(3000); White.Core.UIItems.Hyperlink DocumentDirectory = IEWindow.Get <White.Core.UIItems.Hyperlink>("C KIT Document Directory"); DocumentDirectory.RightClick(); Thread.Sleep(2000); IEWindow.Popup.ItemBy(SearchCriteria.ByText("Open in New Tab")).Click(); Thread.Sleep(5000); UserInputs.PressHotKey((int)VirtualKeys.Control, (int)VirtualKeys.Tab); Thread.Sleep(1000); White.Core.UIItems.Hyperlink DirectoryReport = IEWindow.Get <White.Core.UIItems.Hyperlink>("Directory Report.xls"); DirectoryReport.Click(); Thread.Sleep(2000); Window IEDirectoryReportWindow = IE.GetWindow("https://cigna.esecurecare.net/ci/fattach/get/93710/ - Microsoft Internet Explorer provided by CIGNA-Link"); Window ModalDirectoryReportWindow = IEDirectoryReportWindow.ModalWindow("File Download"); Thread.Sleep(2000); Console.WriteLine("File Download window found"); Console.WriteLine("Press ALT+O"); UserInputs.HotKey(KeyboardInput.SpecialKeys.ALT, "O"); Thread.Sleep(9000); Console.WriteLine("Kill IE"); IE.Kill(); Console.WriteLine("Close Excel"); var allItem = Desktop.Instance.Windows(); foreach (var element in allItem) { if (element.Name.Contains("Microsoft Excel")) { element.Focus(DisplayState.Restored); Thread.Sleep(5000); element.Close(); } } Thread.Sleep(1000); ViPrClass.ExitVipr(); //Stop services Console.WriteLine("Stop Services"); Service.Stop(NunitSettings.ServiceWdName); Service.Stop(NunitSettings.ServiceDttName); // Check all FocusIns List <string> ExpApplications = new List <string>(); ExpApplications.Add("https://cigna.esecurecare.net/app/home"); ExpApplications.Add("https://cigna.esecurecare.net/app/answers/list/search/1/kw/RNC/answers.c$is_healthcare_reform/~any~"); ExpApplications.Add("C-KIT:Reimbursement RNC 501 Processing Reference Guide"); ExpApplications.Add("C-KIT:C KIT Document Directory"); ExpApplications.Add("\"C:\\Program Files\\Microsoft Office XP Standard\\OFFICE11\\EXCEL.EXE\" /e"); Assert.IsTrue(CheckResults.CheckAllFocusIn(ExpApplications)); }
public SettingsWindow(Application application, Window whiteWindow, UIItem settingsControl) : base(application, whiteWindow) { this.settingsControl = settingsControl; }
public static void ClassInitialize(TestContext testContext) { _app = Application.Launch(@"D:\Dev\PickAWinnerTDD\PickAWinnerTDD.UI\bin\Debug\PickAWinnerTDD.UI.exe"); _window = _app.GetWindow("Pick A Winner"); _window.Get<Button>(SearchCriteria.ByText("Admin")).Click(); }
public void MyTestInitialize() { _app = Application.Launch(@"D:\Dev\PickAWinnerTDD\PickAWinnerTDD.UI\bin\Debug\PickAWinnerTDD.UI.exe"); }
public MarkpadWindow(Application application, Window whiteWindow) : base(application, whiteWindow) { }
public void FixtureSetup() { var configuration = new WinFormTestConfiguration(string.Empty); application = configuration.Launch(); window = application.GetWindow("Form1"); }
public void TestCalculators() { Console.WriteLine("SharepointCalculators"); //Run Internet Explorer White.Core.Application IE = White.Core.Application.Launch("C:\\Program Files\\Internet Explorer\\iexplore.exe"); Thread.Sleep(30000); Window IEWindow = IE.GetWindow("Pages - Your Cigna Life - Microsoft Internet Explorer provided by CIGNA-Link", White.Core.Factory.InitializeOption.NoCache); IEWindow.Get <White.Core.UIItems.TextBox>("Address").SetValue("https://centralhub.cigna.com/team/IMPVMT/Calculators/Forms/AllItems.aspx"); Thread.Sleep(4000); IEWindow.Get <White.Core.UIItems.TextBox>("Address").Click(); UserInputs.PressEnter(); Thread.Sleep(3000); Window IEModalWindow = IEWindow.ModalWindows()[0]; IEModalWindow.Get <White.Core.UIItems.TextBox>("User name:").SetValue(NunitSettings.InternalId); IEModalWindow.Get <White.Core.UIItems.TextBox>("Password:"******"OK").Click(); Thread.Sleep(5000); IEWindow.Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Advanced Surgical Calculator", "Advanced Surgical Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Anesthesia Calculator INN and OON", "Anesthesia Calculator INN and OON.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Anesthesia Calculator INN and OON", "Anesthesia Calculator INN and OON.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Dialysis-Epogen Calculator", "Dialysis-Epogen Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Facility Tool", "Facility Tool.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Julian Date Converter", "Julian Date Converter.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "LifeSource Split Calculator", "LifeSource Split Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "LPI Calculator", "LPI Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Medicare Primacy Tool", "Medicare Primacy Tool.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Other Insurance COB Calculator", "Other Insurance COB Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Other Insurance Primacy Tool", "Other Insurance Primacy Tool.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "PCL Calculator", "PCL Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Rework (2nd touch)", "Out of Pocket Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Rework (2nd touch)", "Overpayment and Customer Responsibility Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Rework (2nd touch)", "Timely Adjustment Date Calculator.xls").Focus(DisplayState.Maximized); Calculators.RunCalcFromSharepoint(IEWindow, "Timely Filing Calculator", "Timely Filing Calculator.xls").Close(); Console.WriteLine("Stopping AT Services"); Service.Stop(NunitSettings.ServiceWdName); Service.Stop(NunitSettings.ServiceDttName); //Check all FocusIns List <string> ExpApplications = new List <string>(); //ExpApplications.Add("\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" SCODEF:6096 CREDAT:79873\""); ExpApplications.Add("https://centralhub.cigna.com/team/IMPVMT/Calculators/Forms/AllItems.aspx"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Advanced Surgical Calculator "); ExpApplications.Add("Calculator:Advanced Surgical Calculator.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Anesthesia Calculator INN and OON "); ExpApplications.Add("Calculator:Anesthesia Calculator INN and OON.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Dialysis-Epogen Calculator "); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Facility Tool "); ExpApplications.Add("Calculator:Facility Tool.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Julian Date Converter "); ExpApplications.Add("Calculator:Julian Date Converter.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > LifeSource Split Calculator "); ExpApplications.Add("Calculator:LifeSource Split Calculator.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > LPI Calculator "); ExpApplications.Add("Calculator:LPI Calculator.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Medicare Primacy Tool "); ExpApplications.Add("Calculator:Medicare Primacy Tool.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Other Insurance COB Calculator "); ExpApplications.Add("Calculator:Other Insurance COB Calculator.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Other Insurance Primacy Tool "); ExpApplications.Add("Calculator:Other Insurance Primacy Tool.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > PCL Calculator "); ExpApplications.Add("Calculator:PCL Calculator.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Rework (2nd touch) "); ExpApplications.Add("Calculator:Out of Pocket Calculator.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Rework (2nd touch) "); ExpApplications.Add("Calculator:Overpayment and Customer Responsibility Calculator.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Rework (2nd touch) "); ExpApplications.Add("Calculator:Timely Adjustment Date Calculator.xls"); ExpApplications.Add("SharepointPath:Improvement Team > Calculators > Timely Filing Calculator "); ExpApplications.Add("Calculator:Timely Filing Calculator.xls"); Assert.IsTrue(CheckResults.CheckAllFocusIn(ExpApplications)); }
protected Screen(Application application, Window whiteWindow) { Application = application; WhiteWindow = whiteWindow; }
public MainScreen(Application application, Window window) { Application = application; Window = window; }
public WindowsCalculatorWhite() { applicationField = Application.Launch("calc.exe"); windowField = applicationField.GetWindow("Calculator", InitializeOption.NoCache); }
public void GivenIAmAtTheBlackLevel() { _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe"); _mainWindow = _application.GetWindow("MainWindow"); }
public void GivenIStartTheAddinForTheFirstTime() { _application = Application.Launch(@"..\..\CcdAddIn.TestHarness\bin\Debug\CcdAddIn.TestHarness.exe"); _mainWindow = _application.GetWindow("MainWindow"); }
public void Start() { Console.WriteLine(CoreAppXmlConfiguration.Instance.UIAutomationZeroWindowBugTimeout); Application = Application.Launch(@"C:\Users\Flotschi\git\handle\Handle.WPF\Handle.WPF\bin\Debug\Handle.WPF.exe"); Assert.IsNotNull(Application); MainWindow = Application.GetWindow("Handle"); Assert.IsNotNull(MainWindow); MainWindow.Focus(); }
public NewTaskScreen(Application application, Window whiteWindow) : base(application, whiteWindow) { }
public static void BeforeTestRun() { app = Application.Launch("calc"); window = app.GetWindow("Calculator"); readout = (Label)window.Get(SearchCriteria.ByAutomationId(IDC_READOUT)); }
public virtual void TextFixtureTearDown() { BaseTestFixtureTearDown(); application = null; testConfiguration = null; }
public void Bug1() { application = new WinFormTestConfiguration(string.Empty).Launch(); Thread.Sleep(1000); var propertyCondition = new PropertyCondition(AutomationElement.NameProperty, "Form1"); AutomationElement element = AutomationElement.RootElement.FindFirst(TreeScope.Children, propertyCondition); AutomationElementCollection collection; var request = new CacheRequest(); using (request.Activate()) collection = element.FindAll(TreeScope.Subtree, Condition.TrueCondition); int cachedChildrenFoundFor = 0; foreach (AutomationElement automationElement in collection) { try { AutomationElementCollection children = automationElement.CachedChildren; cachedChildrenFoundFor++; } catch (InvalidOperationException) {} } Assert.AreNotEqual(0, cachedChildrenFoundFor, "Cached children not found for even one AutomationElement out of " + collection.Count + " elements"); }