尝试使用robot.run

时间:2016-07-11 11:26:21

标签: robotframework

我正在尝试使用 RIDE 文件执行 Run_Keyword.robot ,该文件位于python解释程序的'Robot'目录中并收到以下错误。我能够从 cmd 运行此.py文件,没有任何错误,它会给出预期的结果。 这可能是什么原因。我是Robot Framework的新手。请帮助解决这个问题。

from robot import run
run(suite = 'Robot')

我得到的错误如下。

Traceback (most recent call last):
  File "C:\Users\uvijayac\Desktop\Robot\rf.py", line 27, in <module>
    run_tests()
  File "C:\Users\uvijayac\Desktop\Robot\rf.py", line 23, in run_tests
    report=report_file)
  File "C:\Python27\lib\site-packages\robot\run.py", line 471, in run
    return RobotFramework().execute(*datasources, **options)
  File "C:\Python27\lib\site-packages\robot\utils\application.py", line 83, in execute
    return self._execute(list(arguments), options)
  File "C:\Python27\lib\site-packages\robot\utils\application.py", line 89, in _execute
    return self._report_error(unicode(err), help=True)
  File "C:\Python27\lib\site-packages\robot\utils\application.py", line 110, in _report_error
    self._logger.error(message)
  File "C:\Python27\lib\site-packages\robot\output\loggerhelper.py", line 59, in error
    self.write(msg, 'ERROR')
  File "C:\Python27\lib\site-packages\robot\output\loggerhelper.py", line 62, in write
    self.message(Message(message, level, html))
  File "C:\Python27\lib\site-packages\robot\output\logger.py", line 109, in message
    logger.message(msg)
  File "C:\Python27\lib\site-packages\robot\output\monitor.py", line 66, in message
    self._writer.error(msg.message, msg.level, clear=self._running_test)
  File "C:\Python27\lib\site-packages\robot\output\monitor.py", line 142, in error
    self._highlight('[ ', level, ' ] ' + message, error=True)
  File "C:\Python27\lib\site-packages\robot\output\monitor.py", line 158, in _highlight
    self._write(before, newline=False, error=error)
  File "C:\Python27\lib\site-packages\robot\output\monitor.py", line 154, in _write
    stream.flush()
IOError: [Errno 9] Bad file descriptor
>>> 

0 个答案:

没有答案