小编Vis*_*ute的帖子

导入测试库'RequestsLibrary'失败:ImportError:没有名为RequestsLibrary Traceback的模块

我正在使用Robot打HTTP服务。但这向我展示了以下问题

  1. 找不到名称为“创建会话”的关键字。

  2. 导入测试库'RequestsLibrary'失败:ImportError:没有名为RequestsLibrary Traceback的模块(最近一次调用):

我已经安装了RequestsLibrary。我的TC是:

*** Settings ***
Library  Collections
Library  String
#Library  RequestsLibrary
Library  OperatingSystem
Library    ExtendedRequestsLibrary
Suite    Teardown  Delete All Sessions

*** Test Cases ***
Get Requests
    [Tags]  get
    Create Session  google  http://www.google.com
#    Create Session  github  https://api.github.com

    ${resp}=  Get  google  /
    Should Be Equal As Strings  ${resp.status_code}  200

    ${resp}=  Get  github  /users/bulkan
    Should Be Equal As Strings  ${resp.status_code}  200
    Dictionary Should Contain Value  ${resp.json()}  Bulkan Evcimen
Run Code Online (Sandbox Code Playgroud)

httprequest python-2.7 robotframework web-api-testing

3
推荐指数
1
解决办法
5563
查看次数