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;
            }
        }
        public void stop()
        {
            StopRecordingParamsBuilder stopRecordParams = paramBuilderProvider.newStopRecordingBuilder();

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

            designApiClient.SaveProject();
        }
Example #3
0
        public void saveNeoloadProject(TimeSpan timeout, TimeSpan interval)
        {
            if (_mode != Mode.DESIGN)
            {
                return;
            }

            this.CheckDesignIsConnected();

            var curState = _client.GetStatus();

            switch (curState)
            {
            case DesignState.NO_PROJECT: throw new InvalidOperationException("Failed to save test because no Project is loaded in NeoLoad.");

            default:
                this.WaitForNeoloadState(DesignState.READY, timeout, interval);
                _client.SaveProject();
                break;
            }
        }