LoZzO
LoZzO

Reputation: 13

Robot Framework with Pycharm -- Autocomplete doesn't work

I've installed PyCharm with the robotframework support plugin. The .robot files are identified successfully and I was able to create a simple script and run it in pyCharm.

However, my problem is that no keywords nor even the robotframework libraries (selenium2library) are recognized by pycharm in order to be autocompleted when typing them.

I also have the intellibot plugin installed.

Is there something that I'm missing? Is there another configuration file somewhere?

Thanks,

Upvotes: 1

Views: 18648

Answers (10)

Mallikarjun
Mallikarjun

Reputation: 1

uninstall Intellibot and Try this Robot Framework Language Server (https://plugins.jetbrains.com/plugin/16086-robot-framework-language-server)

Upvotes: 0

Andrew
Andrew

Reputation: 88

I am going through the same problems... I've tried IntelliBot, IntelliBot #patched, Robot Framework Support plugins. Now I am testing the Hyper RobotFramework Support plugin [link] and for now, looks the best from all of these.

With it I have some auto-complete support, also ctrl+click (navigation) works nice (better than in IntelliBot). Not perfect, but the best it has been so far.

I have installed:

  • PyCharm 2021.3.2
  • Python 3.10.2
  • Robot Framework 4.1.3
  • selenium 4.1.3
  • robotframework-seleniumlibrary 6.0.0

(on windows you can run the command pip list to see the version of the libraries that have been installed using pip)

Hyper RobotFramework Support

Upvotes: 0

Francois Muller
Francois Muller

Reputation: 566

I have been troubled by this for what seems to be forever.

Here are my configuration steps, and so far everything is working like a charm.

My setup:

  • Installed Python 3.9.x => added path to variables in "windows environment Variables" Check python and pip versions.
  • install selenium
  • install robotframework
  • install robotframework-seleniumlibrary
  • Install Pycharm and set Interpreter to Python 3.9.x
  • Install Plugin: "IntelliBot @SeleniumLibrary Patched" - Do not install Selenium2Library This is what causes the IDE issues.
  • Restart IDE and enjoy. And for those just getting into Robotframework, dont forget to add webdrivers.

For this I made a folder in root (called it webdrivers) and also added this to my Windows Enviro variables. This allows me to call them from any project folder.

enter image description here

Upvotes: 0

Tushar Likhar
Tushar Likhar

Reputation: 51

In our main_resources.robot we need to give file path as below for the library files which contain definition of function

Library ../lib/SampleRest/SampleRest.py

When you do cntl+click on above SampleRest.py it should be navigated to that file

Your SampleRest.py should contain all your function definitions as below

try:
    from .api import *
except:
    from api import *


class SampleRest(
    events,
    repository,
    devices
):
    """
    This library will provides keywords to automating the cloud test cases
    """
    ROBOT_LIBRARY_SCOPE = 'GLOBAL'
    ROBOT_LIBRARY_VERSION = 1.0

    def __init__(self):
        for base in SampleRest.__bases__:
            base.__init__(self)

Once I declare this I can use any of functions present in above devices.py file from robot file and it will be successfully navigated Also please check your robotframework-seleniumlibrary version it should be 3.3.1 because for latest version navigation is an issue

Upvotes: 0

Aliaksandr Plekhau
Aliaksandr Plekhau

Reputation: 493

I recomend to use lte2000 fork: https://github.com/lte2000/intellibot

It works fine for me (Pycharm 2020.1, Robot Framework 3.2.2 and SeleniumLibrary 4.5.0)

Upvotes: 0

Pap Nándor
Pap Nándor

Reputation: 21

My solution:

  1. Uninstall the 'Robot framework support' (PyCharm/File/Settings/Plugins)
  2. Uninstall 'Intellibot' (PyCharm/File/Settings/Plugins) (Uninstall all similar plugins!)
  3. Exit PyCharm
  4. Uninstall robotframework-seleniumlibrary (Open command prompt with administration mode: pip uninstall robotframework-seleniumlibrary)
  5. Install robotframework-seleniumlibrary 3.3.1 (Command prompt: pip install robotframework-seleniumlibrary==3.3.1)
  6. Open PyCharm
  7. Install 'IntelliBot @SeleniumLibrary Patched' (PyCharm/File/Settings/Plugins)

(If it isn't working then try the following: PyCharm/File/Invalidate Caches/Restart... and click the 'Invalidate and Restart')

Upvotes: 2

javediqbal1419
javediqbal1419

Reputation: 21

use plugin Intellbot@SeleniumLibrary Patched and robotframework-seleniumlibrary version 3.3.1 It works for me after lot of research from the internet

Upvotes: 0

Huy Tran 02
Huy Tran 02

Reputation: 11

You can try install "Robot Framework support" plugin. it working for me.

Upvotes: 1

Anand
Anand

Reputation: 193

There is a bug in the intellibot plugin. To resolve you need to 1. Uninstall your current intellibot plugin 2. Search for "IntelliBot @SeleniumLibrary Patched" in the plugins repository. 3. Install this patched plugin. This worked for me.

Upvotes: 1

Piotr Mazur
Piotr Mazur

Reputation: 46

Try to set up your Library to robotframework-selenium2library == 1.8.0, then the issue will disappear.

If you have the last version it doesn't work for me.

Upvotes: 3

Related Questions