public void StopRecording()
        {
            StopRecordingParamsBuilder _stopRecordingBuilder = new StopRecordingParamsBuilder();

            if (_userPathExist)
            {
                UpdateUserPathParamsBuilder _updateUserPathBuilder = new UpdateUserPathParamsBuilder();
                _updateUserPathBuilder.name(_userPathName);
                _updateUserPathBuilder.deleteRecording(true);
                _stopRecordingBuilder.updateParams(_updateUserPathBuilder.Build());
            }

            try
            {
                _client.StopRecording(_stopRecordingBuilder.Build());
                _client.SaveProject();
                if (_systemProxyHelper != null)
                {
                    _systemProxyHelper.restoreProxy();
                }
            }
            finally
            {
                _recordStarted     = false;
                _instance          = null;
                _systemProxyHelper = null;
            }
        }
Esempio n. 2
0
        public void stopRecording(int timeout, bool frameworkParameterSearch = true, bool genericParameterSearch = true,
                                  bool deleteExistingRecording = false, bool includeVariablesInUserpathMerge     = true,
                                  int matchingThreshold        = 60, bool updateSharedContainers = false)
        {
            if (_mode != Mode.DESIGN)
            {
                return;
            }

            this.CheckDesignIsConnected();

            var status = _client.GetStatus();

            if (status != DesignState.BUSY)
            {
                throw (new Exception("Error!! No recording currently running!"));
            }

            if (pathExists)
            {
                _updateUserPathPB.name(this.userPathName);

                _updateUserPathPB.deleteRecording(deleteExistingRecording);
                _updateUserPathPB.includeVariables(includeVariablesInUserpathMerge);
                _updateUserPathPB.matchingThreshold(matchingThreshold);
                _updateUserPathPB.updateSharedContainers(updateSharedContainers);
                _stopRecordingPB.updateParams(_updateUserPathPB.Build());
                Report.Log(ReportLevel.Debug, _updateUserPathPB.Build().ToString());
            }

            _stopRecordingPB.timeout(timeout);
            _stopRecordingPB.frameworkParameterSearch(frameworkParameterSearch);
            _stopRecordingPB.genericParameterSearch(genericParameterSearch);

            Report.Log(ReportLevel.Debug, _stopRecordingPB.Build().ToString());
            try
            {
                _client.StopRecording(_stopRecordingPB.Build());
            }
            catch (Exception e)
            {
                Report.Log(ReportLevel.Debug, e.Message);
            }
        }
        public void stop()
        {
            StopRecordingParamsBuilder stopRecordParams = paramBuilderProvider.newStopRecordingBuilder();

            if (userPathExist)
            {
                stopRecordParams.updateParams(paramBuilderProvider.newUpdateUserPathParamsBuilder().name(userPathName).Build());
            }
            designApiClient.StopRecording(stopRecordParams.Build());

            designApiClient.SaveProject();
        }
        public void StopRecording(StopRecordingParamsBuilder stopRecordingBuilder, UpdateUserPathParamsBuilder updateUserPathBuilder)
        {
            if (_userPathExist)
            {
                updateUserPathBuilder.name(_userPathName);
                stopRecordingBuilder.updateParams(updateUserPathBuilder.Build());
            }

            try
            {
                _client.StopRecording(stopRecordingBuilder.Build());
            }
            finally
            {
                _recordStarted = false;
            }
        }