コード例 #1
0
        /// <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);
        }
コード例 #2
0
        public void CutButton_ToolTip_Blocked()
        {
            WndImagePro wndImagePro = new WndImagePro();

            wndImagePro.ClickTabAutomate();

            wndImagePro.BtnOutput.SetFocus();
            Mouse.HoverDuration = 2000;
            Mouse.Hover(wndImagePro.BtnOutput);
            // var test = wndImagePro.BtnRecordMacro.ToolTipText;

            WinToolTip toolTip = new WinToolTip(wndImagePro);

            toolTip.SearchProperties.Add(new PropertyExpression(WinToolTip.PropertyNames.Name, "Record Macro", PropertyExpressionOperator.Contains));


            var text = wndImagePro.BtnOutput.ToolTipText;
            var stri = toolTip.HelpText;
            var test = (WinButton)wndImagePro.BtnOutput.FindMatchingControls()[0];
        }
コード例 #3
0
 public new void TestSetup()
 {
     wndImagePro = new WndImagePro();
     wndImagePro.CloseAllToolsAndViews(true);
 }
コード例 #4
0
 public void Setup()
 {
     wndImagePro = new WndImagePro();
     wndImagePro.SetFocus();
     Console.WriteLine("Begin Execution: " + TestContext.TestName);
 }
コード例 #5
0
 public void Test_Setup()
 {
     wndImagePro = new WndImagePro();
     wndImagePro.SetFocus();
 }