Mono.UIAutomation.TestFramework.Application.Launch C# (CSharp) Method

Launch() public method

public Launch ( string program ) : void
program string
return void
		public void Launch (string program, params string[] args)
		{
			try {
				procedureLogger.Action ("Launch " + this.sample);
				Process.Start (program, String.Join (" ", args));
				Thread.Sleep (Config.Instance.ShortDelay);
				procedureLogger.ExpectedResult (string.Format("{0} has been started.", this.sample));
			} catch (Exception e) {
				Console.WriteLine (e.Message);
				Process.GetCurrentProcess ().Kill ();
			}
		}

Usage Example

Esempio n. 1
0
		protected override void LaunchSample ()
		{
			string browser = Environment.GetEnvironmentVariable ("MOON_A11Y_BROWSER");
			if (browser == null) {
				browser = "firefox";
				Console.WriteLine ("** MOON_A11Y_BROWSER environment variable not found. Defaulting to {0}.", browser);
			}

			string profile = Environment.GetEnvironmentVariable ("MOON_A11Y_BROWSER_PROFILE");
			if (profile == null) {
				profile = "default";
				Console.WriteLine ("** MOON_A11Y_BROWSER_PROFILE environment variable not found. Defaulting to {0}.", profile);
			}

			//string uri = string.Format ("samples/{0}/{0}.html", Sample);

			application = new Application (Sample);
			application.Launch (browser, "-no-remote", "-P", profile, Uri);
		}
All Usage Examples Of Mono.UIAutomation.TestFramework.Application::Launch