static void Main(string[] args) { UICondition uIcondition = UICondition.Create("@Name='Puzzle'", new Object[0]); WindowOpenedWaiter wait = new WindowOpenedWaiter(uIcondition); var ipy_proc = Process.Start(System.Environment.GetEnvironmentVariable("DLR_BIN") + "\\ipy.exe", " .\\puzzle.py"); wait.Wait(30000); UIObject ui = UIObject.Root.Children.Find(uIcondition); WinClass winClass = new WinClass(ui); try { winClass.Test_about(); winClass.Test_options(); winClass.Test_load(); //http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25404 // winClass.Test_play(); //exit verification winClass.Test_create(); //http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25404 //winClass.Test_play(); winClass.Test_exit(); } catch (Exception e) { Console.WriteLine(e); } finally { //http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=19693 if (!ipy_proc.HasExited) { ipy_proc.Kill(); } } }
static void Main(string[] args) { UICondition uIcondition = UICondition.Create("@Name='Frequency Modulation Synthesizer'", new Object[0]); WindowOpenedWaiter wait1 = new WindowOpenedWaiter(uIcondition); //Process.Start(args[0], ".\\fmsynth.py"); Process.Start(args[0], ".\\fmsynth.py"); wait1.Wait(60000); UIObject ui = UIObject.Root.Children.Find(uIcondition); try { WinClass winClass = new WinClass(ui); winClass.Test_ADDCarrierModulator(); winClass.Test_RemoveSource(); winClass.Test_Button_rightpane(); winClass.Test_ComboBox(); winClass.Test_Scrollbar(); winClass.Test_Piano(MouseButtons.PhysicalLeft); winClass.Test_Stop(); winClass.Test_Piano(MouseButtons.PhysicalRight); winClass.Test_StopAll(); winClass.Test_Close(); } catch (Exception e) { Console.WriteLine(e.Message); } }
static void Main(string[] args) { UICondition uIcondition = UICondition.Create("@Name='Frequency Modulation Synthesizer'", new Object[0]); WindowOpenedWaiter wait1 = new WindowOpenedWaiter(uIcondition); //Process.Start(args[0], ".\\fmsynth.py"); Process.Start(args[0], ".\\fmsynth.py"); wait1.Wait(60000); UIObject ui = UIObject.Root.Children.Find(uIcondition); try { WinClass winClass = new WinClass(ui); winClass.Test_ADDCarrierModulator(); winClass.Test_RemoveSource(); winClass.Test_Button_rightpane(); winClass.Test_ComboBox(); winClass.Test_Scrollbar(); winClass.Test_Piano(MouseButtons.PhysicalLeft); winClass.Test_Stop(); winClass.Test_Piano(MouseButtons.PhysicalRight); winClass.Test_StopAll(); winClass.Test_Close(); } catch (Exception e) { Console.WriteLine(e.Message); } }
static void Main(string[] args) { UICondition uIcondition = UICondition.Create("@Name='Puzzle'", new Object[0]); WindowOpenedWaiter wait = new WindowOpenedWaiter(uIcondition); var ipy_proc = Process.Start(System.Environment.GetEnvironmentVariable("DLR_BIN") + "\\ipy.exe", " .\\puzzle.py"); wait.Wait(30000); UIObject ui = UIObject.Root.Children.Find(uIcondition); WinClass winClass = new WinClass(ui); try { winClass.Test_about(); winClass.Test_options(); winClass.Test_load(); //http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25404 // winClass.Test_play(); //exit verification winClass.Test_create(); //http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25404 //winClass.Test_play(); winClass.Test_exit(); } catch (Exception e) { Console.WriteLine(e); } finally { //http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=19693 if (!ipy_proc.HasExited) { ipy_proc.Kill(); } } }
public void Test_Checkpoint2() { //checkpoint1 UICondition uIcondition = UICondition.Create("@ControlType=Window and @Name='IronPython Direct3D'", new object[0]); WindowOpenedWaiter wait1 = new WindowOpenedWaiter(uIcondition); Process.Start(CMD, ".\\checkpoints\\checkpoint2.py"); wait1.Wait(20000); UIObject ui = UIObject.Root.Children.Find(uIcondition); UIObject uiClose = ui.FirstChild.Children.Find("Close"); Button buttonClose = new Button(uiClose); Thread.Sleep(2000); buttonClose.Click(); }
public void Test_Tutorial() { //checkpoint1 UICondition uIcondition = UICondition.Create("@ControlType=Window and @Name='IronPython Direct3D'", new object[0]); WindowOpenedWaiter wait1 = new WindowOpenedWaiter(uIcondition); Process.Start(CMD, ".\\tutorial.py"); wait1.Wait(20000); UIObject ui = UIObject.Root.Children.Find(uIcondition); UIObject uiClose = ui.FirstChild.Children.Find("Close"); Button buttonClose = new Button(uiClose); Thread.Sleep(5000); buttonClose.Click(); }