1、打开C:\Python27\Lib\site-packages\robotide\contrib\testrunner,找到testrunner.py。
修改代码块def _create_temporary_directory(self)。如果创建目录失败,
请修改cmd的权限,默认用管理员权限运行。
- 注释的一行代码为RIDE临时存储目录;
- 增加的三行代码是基于当天日期时间创建目录。
#Need to import datetime
import datetime
#
def _create_temporary_directory(self):
# self._output_dir = tempfile.mkdtemp(".d", "RIDE")
# Create log directory which is time-based.
base = 'f:\\robotframework\\'
self._output_dir = os.path.join(base, 'logs', datetime.datetime.now().strftime('%Y%m%d_%H%M%S'))
os.mkdir(self._output_dir)
#
atexit.register(self._remove_temporary_directory)
2、修改代码块def run_commandy(self, command, cwd)
def run_command(self, command, cwd):
self._pid_to_kill = None
#Create target log dir
self._create_temporary_directory()
#
self._process = Process(cwd)
self._process.run_command(command)