Sonal
(Sonal)
16 February 2021 14:25
1
Hi all ,
I recently installe Imap library2 and trying out simple examples
Open Mailbox server=outlook.office365.com/../ … user=skjdhfjksdhjkf password=skjdhfkjdshf
Close Mailbox
on executing I am getting Test case contains no keywords.
on pip list : i could find the library name but still it doesnot finds the keywords.
damies13
(Dave)
17 February 2021 10:06
2
I know it might seem obvious but I’ll ask anyway… do you have the Library line below in the settings section of your robot file?
*** Settings ***
Library ImapLibrary
That would be the most obvious answer to why you are getting this error.
Sonal
(Sonal)
17 February 2021 10:33
3
HI Damies , yes offcourse , some of the other solution also described as using Imaplibrary2 i used the same but still same result.
damies13
(Dave)
17 February 2021 10:50
4
Great, just wanted to get the obvious out of the way
Can you run
robot --version
and
pip -V
just to check pip and robot are both using the same python version (I once had an issue where there were pip was python 3.7 and robot was using python 3.4 and so robot couldn’t see the libraries installed with pip.
Sonal
(Sonal)
17 February 2021 12:05
5
pip 20.2.3
Robot Framework 3.1.2 (Python 3.8.1 on win32)
Sonal
(Sonal)
17 February 2021 12:05
6
i have the updated version of Imap
damies13
(Dave)
17 February 2021 12:08
7
not the pip version the python version that pip is using on mine it shows at the end of the line in brackets
pip 20.2.3 from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip (python 3.9)
damies13
(Dave)
17 February 2021 12:09
9
did the updated version of Imap help?
Sonal
(Sonal)
17 February 2021 12:10
10
NO same problem , I have installed other lib like selenium Lib with same version of pip and robot and it works Fine
damies13
(Dave)
17 February 2021 12:22
11
Sorry if it seems i’m asking silly questions, I’ve never used the Imap library, so i’m just following basic troubleshooting hoping it helps you
did you get something like this in your log? I’m guessing not or you would have mentioned it:
Importing test library 'ImapLibrary' failed
the next question is: is there at least 1 tab or 2 spaces in front of Open Mailbox and Close Mailbox
Like this:
imap test 1
Open Mailbox server=outlook.office365.com/../… user=skjdhfjksdhjkf password=skjdhfkjdshf
Close Mailbox
Not like this (This will cause “Test case contains no keywords” regardless which library you use):
imap test 2
Open Mailbox server=outlook.office365.com/../… user=skjdhfjksdhjkf password=skjdhfkjdshf
Close Mailbox
Dave.
Sonal
(Sonal)
17 February 2021 12:25
12
Hi Dave,
I can confirm i am following the normal tabs between the keywords, and no i dont get this msg on my terminal importing failed
damies13
(Dave)
17 February 2021 12:35
13
One thing i noticed in the docs for Open Mailbox, there is no option for server= only host=
try changing server=outlook.office365.com
to host=outlook.office365.com
I would expect you to have a different error if this was the issue but worth a try
Sonal
(Sonal)
17 February 2021 12:36
14
Yes This is something i marked it , tried also but it doesnt even go till there , same result no keywords found
damies13
(Dave)
17 February 2021 12:44
15
I had a quick look through the issues for robot framework, there was some issues with importing some libraries in robotframework v3.1 and I noticed you are using Robot Framework 3.1.2, I have Robot Framework 3.2.2, so it might be worth updating your robot framework version
pip install -U robotframework
Hi @Sonal , I am facing the same issue. Would like to check if you had any luck.