Skip to content

Keywords not highlighted and no suggestion for them in RIDE #2195

Closed

Description

@axiom41

Hello.
After updating robotframework-seleniumlibrary to 4.4.0, many of its keywords seem that are not recognized and “highlighted in blue” in RIDE editor (v1.7.4.2, using RF 3.2.1), and keyword suggestion does not work (for example, on “click element”, “Input text”, "Capture Page Screenshot", etc.):

image

Test execution seems to work fine anyway, but syntax highlighting and keyword suggestion are too important in test writing.

At the moment, I had to revert to v4.3.0 that works fine:

image

I also received this from robotframework-seleniumlibrary developer, where i initially submitted the issue:

In Robot Framework 3.2 the dynamic library API get_keyword_arguments changed and SeleniumLibrary 4.4, by PythonLibCore changes, use the changed format if RF 3.2 or greater is used. This is RIDE specific problem, please report the problem in RIDE issue tracker. Closing this issue.

Could you please check and verify on your side, or provide some workaround to make v4.4.0 working?

Many thanks in advance for your support

Best regards

Activity

  1. added
    bug
    prio-high
    on May 6, 2020
  2. added this to the v2.0 milestone on May 6, 2020
  3. HelioGuilherme66 commented on May 6, 2020

    @HelioGuilherme66
    Member

    The only possible workaround, is to generate SeleniumLibrary XML for keywords documentation and then import as explained in Import Failed Help button in Suite Settings section.

  4. HelioGuilherme66 commented on Jun 17, 2020

    @HelioGuilherme66
    Member

    Seems that there is no workaround for this problem. I have generated SeleniumLibrary.xml and place it on known places, but still the docs are not loaded. This may be because there are some docs in DB, and the missing ones are not loaded from the XML file. Also there is no Import XML option, because it did not failed.

    Attached is the SeleniumLibrary.xml.txt (must remove .txt).
    SeleniumLibrary.xml.txt

    --EDIT--
    Attached is the SeleniumTestabilityLibrary.xml.txt (must remove .txt). New from instructions on FAQ.
    SeleniumTestabilityLibrary.xml.txt

    --EDIT--
    @axiom41
    The above XML file is now correct, and we can have the keywords docs for SeleniumLibrary 4.4.0.
    The file will be on (Windows): %APPDATA%\RobotFramework\ride\library_xmls\SeleniumLibrary.xml
    Linux and MacOS: ~/.robotframework/ride/library_xmls/SeleniumLibrary.xml

    The easiest way to update this documentation is (all libraries keyword docs will have to re-generated, this may cause some delay when opening "for the first time" a test suite with a "new" Library import):

    1. With RIDE closed, delete the DB file at: %APPDATA%\RobotFramework\ride\librarykeywords.db or ~/.robotframework/ride/librarykeywords.db
    2. Uninstall SeleniumLibrary 4.4.0 (you may need to use sudo -H):
      pip uninstall robotframework-seleniumlibrary
    3. Start RIDE and open or create a basic test suite using SeleniumLibrary, for example:
    *** Settings ***
    Library           SeleniumLibrary
    
    *** Test Cases ***
    SeleniumTest
        Open Browser
    
    1. On the test suite settings, there is the Library import statement with SeleniumLibrary on red color. Right click on it and use Import Library Spec XML to locate the SeleniumLibrary.xml file attached in this comment.
    2. Install SeleniumLibrary 4.4.0 (you may need to use sudo -H):
      pip install robotframework-seleniumlibrary

    After some seconds, the red color changes to black and you can go to Grid Editor and use the keyword docs (Open Browser should be in blue color, or the one you selected for keywords).

  5. added
    fixed
    on Jul 6, 2020
  6. HelioGuilherme66 commented on Jul 6, 2020

    @HelioGuilherme66
    Member

    Closing because can be tested on soon to be pre-released, v2.0b1.

  7. sarozNep commented on Jan 8, 2021

    @sarozNep

    I still have this issue in Robot Framework 3.2.2

  8. Temizzi commented on Mar 4, 2021

    @Temizzi

    I have the same issue.. I am running:

    • RIDE 1.7.4.2 running on Python 3.7.0.
    • robotframework-seleniumlibrary 5.1.0

    How to solve this?

  9. HelioGuilherme66 commented on Mar 9, 2021

    @HelioGuilherme66
    Member

    @sarozNep and @Temizzi Please try with v2.0b1 like I mentioned on #2195 (comment)

    I am not surprised that robotframework-seleniumlibrary 5.1.0 documentation can be broken.

  10. vncs1880 commented on Mar 25, 2021

    @vncs1880

    Hello @HelioGuilherme66 thank you for the help. Apart from actually fixing the issue I noticed you had difficulties to implement your suggested workaround. May I suggest also facilitating future workarounds (i.e. things you mentioned like providing means to import xml even if it did not fail, or a button to delete the db)

    Seems that there is no workaround for this problem. I have generated SeleniumLibrary.xml and place it on known places, but still the docs are not loaded. This may be because there are some docs in DB, and the missing ones are not loaded from the XML file. Also there is no Import XML option, because it did not failed.

    Attached is the SeleniumLibrary.xml.txt (must remove .txt).
    SeleniumLibrary.xml.txt

    --EDIT--
    Attached is the SeleniumTestabilityLibrary.xml.txt (must remove .txt). New from instructions on FAQ.
    SeleniumTestabilityLibrary.xml.txt

    --EDIT--
    @axiom41
    The above XML file is now correct, and we can have the keywords docs for SeleniumLibrary 4.4.0.
    The file will be on (Windows): %APPDATA%\RobotFramework\ride\library_xmls\SeleniumLibrary.xml
    Linux and MacOS: ~/.robotframework/ride/library_xmls/SeleniumLibrary.xml

    The easiest way to update this documentation is (all libraries keyword docs will have to re-generated, this may cause some delay when opening "for the first time" a test suite with a "new" Library import):

    1. With RIDE closed, delete the DB file at: %APPDATA%\RobotFramework\ride\librarykeywords.db or ~/.robotframework/ride/librarykeywords.db
    2. Uninstall SeleniumLibrary 4.4.0 (you may need to use sudo -H):
      pip uninstall robotframework-seleniumlibrary
    3. Start RIDE and open or create a basic test suite using SeleniumLibrary, for example:
    *** Settings ***
    Library           SeleniumLibrary
    
    *** Test Cases ***
    SeleniumTest
        Open Browser
    
    1. On the test suite settings, there is the Library import statement with SeleniumLibrary on red color. Right click on it and use Import Library Spec XML to locate the SeleniumLibrary.xml file attached in this comment.
    2. Install SeleniumLibrary 4.4.0 (you may need to use sudo -H):
      pip install robotframework-seleniumlibrary

    After some seconds, the red color changes to black and you can go to Grid Editor and use the keyword docs (Open Browser should be in blue color, or the one you selected for keywords).

  11. Temizzi commented on Mar 28, 2021

    @Temizzi

    @sarozNep and @Temizzi Please try with v2.0b1 like I mentioned on #2195 (comment)

    I am not surprised that robotframework-seleniumlibrary 5.1.0 documentation can be broken.

    Yesy v2.0b1 fixed the syntax highlight problem.. But I got a warning message saying that module 'psutil' was not found right after I launch RIDE (everytime) as below...

    image

    Besides, after some times, I have no idea why suddenly, the "Run" tab is also missing and unable to run/start any test case. Due to this, I had to fall back to version 1.7.4.2

  12. rbradhika530 commented on Jul 12, 2022

    @rbradhika530

    Hi@HelioGuilherme66 I am facing similar issue, selenium library coming in red color, even after importing XML file and Instaling selenium library again issue is same.
    Can you please suggest solution for this, currently I am using v2.0b2.dev9

  13. HelioGuilherme66 commented on Jul 12, 2022

    @HelioGuilherme66
    Member

    @rbradhika530 Sometimes it takes some time ;) to load the keyword docs. A restart of RIDE should fix it. If not then there should be complete error logged in Tools->View RIDE Log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugfixedgood first issueprio-high

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions