Getting No keyword with name 'create session' found error while running the test

Hey All,

I am new to the Robot Framework & Starting from Scratch. Below is my request for a API. I am trying to get a record but the session is not created.

*** Settings ***
Library RequestsLibrary.utils

*** Variables ***
${Books} 1

*** Test Cases ***
create session myssion ${base_url}
${response}= get request myssion BookStore/v1/${Books}

log to console ${response.status_code}
log to console ${response.content}
log to console ${response.headers}

Can any one help me onto this please?

First, you should fix the code formatting in this message, you can edit the code block, by using triple backticks, like (discard the '):

My code block

You did not show the exact error problem, but if the error is: No keyword with name 'create session myssion ${base_url} it means you did not use the minimum spacing of two spaces to separate keywords and arguments.
If that is not the case, then it could be the wrong import of the library which should be Library RequestsLibrary.


I think the same what Hélio told you. You have to use minimum 2 spaces for formatting your code.
So try:

create session  myssion ${base_url}

you see there are 2 spaces between “n” from word session and “m” from word myssion.

May i ask which IDE are you using for writing your RF code?
As a hint - i’m using PyCharm Community Edition and have a Plugin called: “Hyper RobotFrameWork Support” This works for me the best and it will mostly avoid coding format issues

1 Like

Thanks for the help it has been worked

Thanks for the help it has been worked @camlib

So, what was the problem?

1 Like

spaces is the issue here while pasting here it pasted normly after giving two or 3 spaces it has been worked tq @HelioGuilherme66