I am hitting HTTP service using Robot. But it is showing me the following issues
No keyword with name 'Create Session' found.
Importing test library 'RequestsLibrary' failed: ImportError: No module named RequestsLibrary Traceback (most recent call last):
I have installed RequestsLibrary. My TC is:
*** 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
The error is that the RequestLibrary is not installed, but the source you've posted actually imports ExtendedRequestsLibrary. You need to have it installed:
pip install robotframework-extendedrequestslibrary
The command to install RequestLibrary - the one that is commented - is:
pip install robotframework-requests
As the library (libraries) were not installed, you got the first error - the Create Session is defined in them, and w/o the library Robot Framework does not find it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With