/// <summary>
        /// Open a file from local system
        /// </summary>
        /// <param name="fullFilePath">Full path of the file (along with extension)</param>
        public static void OpenFile(string fullFilePath)
        {
            Console.WriteLine("Open File: " + fullFilePath);
            WndImagePro wndImagePro = new WndImagePro();

            wndImagePro.SetFocus();

            Keyboard.SendKeys("O", ModifierKeys.Control);
            System.Threading.Thread.Sleep(2000);
            AutoItX3 autoIT = new AutoItX3();

            autoIT.WinWait("Open");
            autoIT.WinActivate("Open");
            autoIT.ControlFocus("Open", "", "[CLASS:Edit]");
            autoIT.ControlSetText("Open", "", "[CLASS:Edit]", fullFilePath);
            //autoIT.Send(@"Actual.jpg");
            // autoIT.ControlClick("Open", "", "[CLASS:Button; Text: Open]");
            Keyboard.SendKeys("O", ModifierKeys.Alt);
        }
Exemple #2
0
 public void Setup()
 {
     wndImagePro = new WndImagePro();
     wndImagePro.SetFocus();
     Console.WriteLine("Begin Execution: " + TestContext.TestName);
 }
 public void Test_Setup()
 {
     wndImagePro = new WndImagePro();
     wndImagePro.SetFocus();
 }