Browser library keywords are undefined but testcases work

Hi,

I dont know what happened, I was trying to disable automatic screenshots in the browser.py file and all of a sudden I get a lot of error. I retried to uninstall and install everything and still have the issues.

My testcases work fine and everything but the keywords show red line below them:

When I want to find declaration of my browser library I get the message “Cannot find declaration to go to”. But whenever I go to the declaration of any other library it opens a .py file in pycharm.

Could someone please help me to get rid of the errors so that I can get also suggestions during coding?

Are you using VS Code with RobotCode?

Hi @falcon030 ,

No I am using robot framework language server with pycharm.

Unfortunately I have no experience with PyCharm.

It could be that pycharm and VSCode have updated enough that the lsp (assuming you are using the one from Robocorp) is becoming more unstable.

I cannot advise on pycharm- but for VSCode after VSCode recent updates I have needed to completely restart the IDE to get keywords recognized. Refresh cache works 50% of the time.

It could be that the path settings for where your dependencies are installed are not correct. At least for VSCode you need to set the Python path and for the lsp you need to set the robot framework path.

1 Like

Not in any way experienced with robot framework in pycharm, but i have previously used Hyper RobotFramewrok Support (by jnhyperion) plugin instead of the robocorp LSP.

Maybe give that a try? :slightly_smiling_face:

You are a boss, it works fine now! Thanks my friend!