标签:信息 remember elm xtu ima request http 一个 images
Set Request Body关键字用来设置http 请求时的body 信息,尤其是在post 请求时,经常需要用到这个关键字。
该关键字接收一个参数,[ body ]
示例1:登录博客园(http://www.cnblogs.com/)时,设置登录请求时的body为:{"input1":"V+bOQYKu0ZQXtauwxpGZC4YvvxwLI6/zA9U6Hx2JxXDZIpDXT2Fzravj7AiR5YDsSqEUkYZFnB+komrnfzF5dzBHXN3FOxHdQ5oRoMdDHh/zdxTUuqg/9ev4V4yyT9T8V9fElmxs+BVrF2kNZU35VtkaftQW8qn08Tl0GgdzEZY=","input2":"GAK4VTm2i+a/6bLHRIu8/oEeKJKav3SrU/DS5l3O0BmD/Xk6PEd0vk8GuLs6/obV3dl+y8Hub2Ey9+pO6ip53KIsNKPOeU1y0P0aCIxMGK0jWcs+ydClgeN0KRvxNlO/LTcW1hrXVcRBRAAhRcezdT2OTbYE4frZKIMShHqz+sE=","remember":false}
Set Request Body {"input1":"V+bOQYKu0ZQXtauwxpGZC4YvvxwLI6/zA9U6Hx2JxXDZIpDXT2Fzravj7AiR5YDsSqEUkYZFnB+komrnfzF5dzBHXN3FOxHdQ5oRoMdDHh/zdxTUuqg/9ev4V4yyT9T8V9fElmxs+BVrF2kNZU35VtkaftQW8qn08Tl0GgdzEZY=","input2":"GAK4VTm2i+a/6bLHRIu8/oEeKJKav3SrU/DS5l3O0BmD/Xk6PEd0vk8GuLs6/obV3dl+y8Hub2Ey9+pO6ip53KIsNKPOeU1y0P0aCIxMGK0jWcs+ydClgeN0KRvxNlO/LTcW1hrXVcRBRAAhRcezdT2OTbYE4frZKIMShHqz+sE=","remember":false}
执行结果:
RobotFramework下的http接口自动化Set Request Body 关键字的使用
标签:信息 remember elm xtu ima request http 一个 images
原文地址:http://www.cnblogs.com/laoqing/p/7237217.html