Exemplo n.º 1
0
        void EyesOpen()
        {
            List <int> mResolution = new List <int>();

            try
            {
                mEyes = new Applitools.Images.Eyes();

                //TODO: set the proxy
                // IWebProxy p = WebRequest.DefaultWebProxy; // .GetSystemWebProxy();

                mAppName  = mAct.GetInputParamCalculatedValue(ActVisualTesting.Fields.ApplitoolsParamApplicationName);
                mTestName = mAct.GetInputParamCalculatedValue(ActVisualTesting.Fields.ApplitoolsParamTestName);
                mAct.CheckSetAppWindowSize();
                mEyes.ApiKey    = mDriver.GetApplitoolKey();
                mEyes.ServerUrl = string.IsNullOrEmpty(mDriver.GetApplitoolServerURL()) ? mEyes.ServerUrl : mDriver.GetApplitoolServerURL();
                OperatingSystem Os_info = System.Environment.OSVersion;
                mEyes.HostOS  = Os_info.VersionString;
                mEyes.HostApp = mDriver is SeleniumDriver ? ((SeleniumDriver)mDriver).GetBrowserType().ToString() : mDriver.GetPlatform().ToString();
                mEyes.AddProperty("Environment ID", mDriver.GetEnvironment());
                mResolution = mAct.GetWindowResolution();
                mEyes.Open(mAppName, mTestName, new System.Drawing.Size(mResolution[0], mResolution[1]));
            }
            catch (Exception ex)
            {
                if (mResolution != null && mResolution.Any() && mResolution[0] < 500)
                {
                    mAct.Error += "Eyes Open Failed. Set Resolution having width more than 500px, Error: " + ex.Message;
                }
                else
                {
                    mAct.Error += "Eyes Open Failed, Error: " + ex.Message;
                }
            }
        }
Exemplo n.º 2
0
        void EyesOpen()
        {
            mEyes = new Applitools.Images.Eyes();
            //TODO: set the proxy
            // IWebProxy p = WebRequest.DefaultWebProxy; // .GetSystemWebProxy();

            mAppName  = mAct.GetInputParamValue(ActVisualTesting.Fields.ApplitoolsParamApplicationName);
            mTestName = mAct.GetInputParamValue(ActVisualTesting.Fields.ApplitoolsParamTestName);
            mAct.CheckSetAppWindowSize();
            mEyes.ApiKey = GetApplitoolsAPIKey();
            mEyes.Open(mAppName, mTestName);
        }