Exemplo n.º 1
0
        public static void Type(string path, string input, string failMsg, int timeOut = 0)
        {
            string exceptionMsg = null;
            bool   returnValue  = false;

            DateTime varDateTime;
            DateTime varElapseTime = DateTime.Now.AddSeconds(timeOut);

            do
            {
                varDateTime = DateTime.Now;
                try
                {
                    SikuliAction.Type(path, input);
                    returnValue = true;
                    break;
                }
                catch (Exception e) { exceptionMsg = e.Message.ToString(); }
            } while (varDateTime <= varElapseTime);


            BaseTest.Assert.IsTrue(returnValue, failMsg + "\n" + exceptionMsg);
        }