gliviu / autocomplete-robot-framework

An autocomplete-plus provider for Robot Framework
https://atom.io/packages/autocomplete-robot-framework
MIT License
9 stars 5 forks source link

Not suggesting XML library keywords #12

Closed eduardfarkas closed 3 years ago

eduardfarkas commented 3 years ago

Hi! I just started to use this plugin and its amazing. I noticed that XML library that is included as standard in RF is not suggesting anything.

I am using RF 3.2.2

Could you take a look?

Thanks, Edd

gliviu commented 3 years ago

Hello Can you provide more details? I just installed RF 3.2.2 and it works fine. You can open a robot file then go to Packages -> Robot Framework -> Show autocomplete status. This is what I see

File: test2.robot
    Status: Parsed/Ok
    Path: .../test2.robot
    Libraries
        BuiltIn
            Status: Loaded
            Source: /home/.../.local/lib/python2.7/site-packages/robot/libraries/BuiltIn.py
            Libdoc: /tmp/robot-lib-cache/BuiltIn.xml
    Resources
        No resources imported
Environment:
    Python executable: /usr/bin/python
    Python version: 2.7.17 (default, Sep 30 2020, 13:38:04) [GCC 7.5.0]
    Platform: linux2
    PYTHONPATH: n/a
    JYTHONPATH: n/a
    CLASSPATH: n/a
    IRONPYTHONPATH: n/a
    Module search path:
        /.../autocomplete-robot-framework/lib
        /usr/lib/python2.7
        /usr/lib/python2.7/plat-x86_64-linux-gnu
        /usr/lib/python2.7/lib-tk
        /usr/lib/python2.7/lib-old
        /usr/lib/python2.7/lib-dynload
        /home/.../.local/lib/python2.7/site-packages
        /usr/local/lib/python2.7/dist-packages
        /opt/aerospike/lib/python
        /usr/lib/python2.7/dist-packages
        /usr/lib/python2.7/dist-packages/gtk-2.0
        /.../autocomplete-robot-framework/fallback-libraries
eduardfarkas commented 3 years ago

Hi,

Here is the information. I dont know why, but other builtin libraries work. Hopefully this helps


File: TEST_EDITACE_XML.robot
    Status: Parsed/Ok
    Path: C:\Projects\testing-automation-rf\TestCases\M2M\Regression\TEST_EDITACE_XML.robot
    Libraries
        BuiltIn
            Status: Loaded
            Source: C:\Users\eddie\AppData\Local\Programs\Python\Python38\lib\site-packages\robot\libraries\BuiltIn.py
            Libdoc: C:\Users\eddie\AppData\Local\Temp\robot-lib-cache\BuiltIn.xml
        OperatingSystem
            Status: Loaded
            Source: C:\Users\eddie\AppData\Local\Programs\Python\Python38\lib\site-packages\robot\libraries\OperatingSystem.py
            Libdoc: C:\Users\eddie\AppData\Local\Temp\robot-lib-cache\OperatingSystem.xml
        XML
            Status: Loaded
            Source: C:\Users\eddie\AppData\Local\Programs\Python\Python38\lib\site-packages\robot\libraries\XML.py
            Libdoc: C:\Users\eddie\AppData\Local\Temp\robot-lib-cache\XML.xml
    Resources
        common.resource
            Status: Resolved
            Path: C:\Projects\testing-automation-rf\Resources\common.resource
Environment:
    Python executable: C:\Users\eddie\AppData\Local\Programs\Python\Python38\python.exe
    Python version: 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)]
    Platform: win32
    PYTHONPATH: n/a
    JYTHONPATH: n/a
    CLASSPATH: n/a
    IRONPYTHONPATH: n/a
    Module search path:
        C:\Users\eddie\.atom\packages\autocomplete-robot-framework\lib
        C:\Users\eddie\AppData\Local\Programs\Python\Python38\python38.zip
        C:\Users\eddie\AppData\Local\Programs\Python\Python38\DLLs
        C:\Users\eddie\AppData\Local\Programs\Python\Python38\lib
        C:\Users\eddie\AppData\Local\Programs\Python\Python38
        C:\Users\eddie\AppData\Roaming\Python\Python38\site-packages
        C:\Users\eddie\AppData\Local\Programs\Python\Python38\lib\site-packages
        C:\Projects\testing-automation-rf\Resources
        C:\Projects\testing-automation-rf\Resources\DB\Connections
        C:\Projects\testing-automation-rf\Resources\M2M
        C:\Projects\testing-automation-rf\TestCases\M2M\Regression
        C:\Users\eddie\.atom\packages\autocomplete-robot-framework\fallback-libraries
gliviu commented 3 years ago

Your configuration looks ok. I'm having the same config and I'm able to import from XML. rfxml Can you use the same robot file that is working for me?

*** Settings ***
Library  XML

*** test cases ***
tc1
  kw1

*** keywords ***
kw1
  Add Element  source  element

Also an idea would be to delete C:\Users\eddie\AppData\Local\Temp\robot-lib-cache and restart Atom.

Another thing you could do is to double check if the XML keywords are properly parsed. For this you could install hyperclick-robot-framework and ctrl-click the Add Element keyword. It should open the related robotframework .py file. rfxml2

In any case, if you don't figure it out try attaching C:\Users\eddie\AppData\Local\Temp\robot-lib-cache\XML.xml here

eduardfarkas commented 3 years ago

Deleting C:\Users\eddie\AppData\Local\Temp\robot-lib-cache helped. Now it loads everything properly.

BIG thanks to you.

Have a great day, Edd