示例#1
0
        public void Start()
        {
            if (_process != null)
            {
                throw new InvalidOperationException("This Sikuli session has already been started");
            }

            _process = _sikuliScriptProcessFactory.Start("-i");

            _asyncTwoWayStreamsHandler = _asyncDuplexStreamsHandlerFactory.Create(_process.StandardOutput, _process.StandardError, _process.StandardInput);
            _asyncTwoWayStreamsHandler.ReadUntil(SikuliReadyTimeoutSeconds, InteractiveConsoleReadyMarker);
        }
示例#2
0
        public void Start()
        {
            if (_isRunning)
            {
                return;
            }

            _process = _sikuliScriptProcessFactory.Start("-i");

            _asyncTwoWayStreamsHandler = _asyncDuplexStreamsHandlerFactory.Create(_process.StandardOutput, _process.StandardInput);

            _asyncTwoWayStreamsHandler.ReadUntil(SikuliReadyTimeoutSeconds, InteractiveConsoleReadyMarker);
        }
示例#3
0
        public void Start()
        {
            if (_process != null)
            {
                throw new InvalidOperationException("This Sikuli session has already been started");
            }

            _version = _sikuliScriptProcessFactory.GetSikuliVersion();
            _process = _sikuliScriptProcessFactory.Start(_version);

            _asyncTwoWayStreamsHandler = _asyncDuplexStreamsHandlerFactory.Create(_process.StandardOutput, _process.StandardError, _process.StandardInput);
            if (_version.ReadyMarker != null)
            {
                _asyncTwoWayStreamsHandler.ReadUntil(SikuliReadyTimeoutSeconds, _version.ReadyMarker);
            }
            foreach (var command in _version.InitialCommands ?? new string[0])
            {
                _asyncTwoWayStreamsHandler.WriteLine(command);
            }
        }