public string checkInstallation()
        {
            var eclipse = new API_Eclipse();

            Assert.That(eclipse.install().isInstalled(), "eclipse.install().isInstalled() was false");
            return("ok");
        }
 public static API_Eclipse stopInNSeconds(this API_Eclipse eclipse, int seconds)
 {
     O2Thread.mtaThread(
         () => {
         eclipse.sleep(seconds * 1000);
         "Stopping eclipse process".info();
         eclipse.stop();
     });
     return(eclipse);
 }
 public static API_Eclipse start(this API_Eclipse eclipse)
 {
     if (eclipse.Eclipse_Exe.fileExists())
     {
         eclipse.Eclipse_Process = Processes.startProcess(eclipse.Eclipse_Exe);
         eclipse.GuiAutomation   = new API_GuiAutomation(eclipse.Eclipse_Process);
         eclipse.GuiAutomation.waitWhileBusy();
     }
     return(eclipse);
 }
예제 #4
0
		public string startAndStopEclipse()
		{
			stopAllEclipseProcesses();
			var eclipse = new API_Eclipse();
			eclipse.start();
			this.sleep(1000);
			Assert.That(Processes.getProcessesCalled("eclipse").size()==1, "there should only be one eclipse process");
			eclipse.stop();
			Assert.That(Processes.getProcessesCalled("eclipse").size()==1, "the eclipse process was still there");
			return "ok";
    	}
        public string startAndStopEclipse()
        {
            stopAllEclipseProcesses();
            var eclipse = new API_Eclipse();

            eclipse.start();
            this.sleep(1000);
            Assert.That(Processes.getProcessesCalled("eclipse").size() == 1, "there should only be one eclipse process");
            eclipse.stop();
            Assert.That(Processes.getProcessesCalled("eclipse").size() == 1, "the eclipse process was still there");
            return("ok");
        }
        public static Window getWindow_WorkspaceLauncher(this API_Eclipse eclipse)
        {
            var automationElementInformation = eclipse.GuiAutomation.findElement_Image();

            if (automationElementInformation.Name == "Eclipse" || automationElementInformation.Name == "Workspace Launcher")
            {
                "Found automationElementInformation of type image with name 'Eclipse'".info();
                var workSpaceLauncher = eclipse.GuiAutomation.findWindow_viaImage();
                if (workSpaceLauncher.Name == "Workspace Launcher")
                {
                    "Found window with name 'Workspace Launcher'".info();
                    return(workSpaceLauncher);
                }
            }
            "[API_Eclipse] WorkspaceLauncher is not available".info();
            return(null);
        }
예제 #7
0
		public string startAndAcceptDefaultWorkspaceLocation()
		{
			var eclipse = new API_Eclipse();
			eclipse.start();
			Assert.That(eclipse.Eclipse_Process.notNull(), "eclipse.Eclipse_Process was null");
			var workSpaceLauncher = eclipse.getWindow_WorkspaceLauncher();
			Assert.That(workSpaceLauncher.notNull(), "workSpaceLauncher was null");
			var textBox = workSpaceLauncher.workspaceLauncher_get_WorkspaceLocation_TextBox ();
			var button = workSpaceLauncher.workspaceLauncher_get_Ok_Button(); 
			Assert.That(textBox.notNull() && button.notNull(), "failed to get workSpaceLauncher textbox or button");
			button.Click(); 
			var windows = eclipse.GuiAutomation.windows(); 
			Assert.That(windows.size()==1, "There should only be one window openned");
			eclipse.stop();
			Assert.That(eclipse.Eclipse_Process.HasExited,"Eclipse process should had exited");
			return "ok";
		}
        public string startAndAcceptDefaultWorkspaceLocation()
        {
            var eclipse = new API_Eclipse();

            eclipse.start();
            Assert.That(eclipse.Eclipse_Process.notNull(), "eclipse.Eclipse_Process was null");
            var workSpaceLauncher = eclipse.getWindow_WorkspaceLauncher();

            Assert.That(workSpaceLauncher.notNull(), "workSpaceLauncher was null");
            var textBox = workSpaceLauncher.workspaceLauncher_get_WorkspaceLocation_TextBox();
            var button  = workSpaceLauncher.workspaceLauncher_get_Ok_Button();

            Assert.That(textBox.notNull() && button.notNull(), "failed to get workSpaceLauncher textbox or button");
            button.Click();
            var windows = eclipse.GuiAutomation.windows();

            Assert.That(windows.size() == 1, "There should only be one window openned");
            eclipse.stop();
            Assert.That(eclipse.Eclipse_Process.HasExited, "Eclipse process should had exited");
            return("ok");
        }
 public static API_Eclipse stop(this API_Eclipse eclipse)
 {
     eclipse.Eclipse_Process.stop();
     eclipse.Eclipse_Process.WaitForExit();
     return(eclipse);
 }
예제 #10
0
		public string checkInstallation() 
		{
			var eclipse = new API_Eclipse();
			Assert.That(eclipse.install().isInstalled(), "eclipse.install().isInstalled() was false");						
			return "ok";
		}