Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
axiom41 opened this issue May 6, 2020 · 10 comments · Fixed by #2221
Closed

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

axiom41 opened this issue May 6, 2020 · 10 comments · Fixed by #2221
Assignees
Labels
bug Malfunctions that should be fixed to comply with the expected behavior fixed Issues that have been fixed and can be closed already good first issue Good for newcomers prio-high Critical to user experience
Milestone

Comments

@axiom41
Copy link

axiom41 commented May 6, 2020

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

@HelioGuilherme66 HelioGuilherme66 added bug Malfunctions that should be fixed to comply with the expected behavior prio-high Critical to user experience labels May 6, 2020
@HelioGuilherme66 HelioGuilherme66 added this to the v2.0 milestone May 6, 2020
@HelioGuilherme66
Copy link
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.

@HelioGuilherme66 HelioGuilherme66 self-assigned this May 6, 2020
@HelioGuilherme66
Copy link
Member

HelioGuilherme66 commented Jun 17, 2020

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).

@HelioGuilherme66 HelioGuilherme66 added the good first issue Good for newcomers label Jun 20, 2020
@HelioGuilherme66 HelioGuilherme66 added the fixed Issues that have been fixed and can be closed already label Jul 6, 2020
@HelioGuilherme66
Copy link
Member

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

@sarozNep
Copy link

sarozNep commented Jan 8, 2021

I still have this issue in Robot Framework 3.2.2

@Temizzi
Copy link

Temizzi commented Mar 4, 2021

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?

@HelioGuilherme66
Copy link
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.

@vncs1880
Copy link

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).

@Temizzi
Copy link

Temizzi commented Mar 28, 2021

@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

@rbradhika530
Copy link

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

@HelioGuilherme66
Copy link
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
Labels
bug Malfunctions that should be fixed to comply with the expected behavior fixed Issues that have been fixed and can be closed already good first issue Good for newcomers prio-high Critical to user experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants