RobotFramwork中上传文件接口处理

使用robotFramwork工具写上传文件接口,抓包工具抓包如截图所示:

传入的头部文件格式是Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

RobotFramwork中上传文件接口处理_第1张图片

RobotFramwork中上传文件接口处理_第2张图片

我们使用requests.post请求,用Catenate拼接路径

RobotFramwork中上传文件接口处理_第3张图片

${file_path}    Catenate    SEPARATOR=    ${CURDIR}    ${file_path} 

RobotFramwork中上传文件接口处理_第4张图片

你可能感兴趣的:(RobotFramWork,python)