robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
168 stars 13 forks source link

[ENHANCEMENT] Importing jar file as a library #239

Closed joel-bgl closed 3 months ago

joel-bgl commented 3 months ago

Hello, I'm using remoteswinglibrary as a library. It's a jar file : remoteswinglibrary-2.3.1.jar This file is located under the folder: C:\Program Files\Python310\Lib\site-packages

My .robotfile is like that : Setting Documentation Lower-Level Keywords Library SikuliLibrary Library BuiltIn Library Collections Library String Library DateTime Library RemoteSwingLibrary port=61698 Library SeleniumLibrary AS Selenium2Library Library OperatingSystem Library Process Library Screenshot Library AutoItLibrary Library Dialogs Resource ../../COMMON/UTILS/TestDispo-Technical-Keywords.robot Resource ../../COMMON/UTILS/UTILS-Technical-Keywords.robot Resource STI-Variables.robot Resource STI-Objects.robot

SeleniumLibrary is not recognize:

Importing test library 'RemoteSwingLibrary' failed: ModuleNotFoundError: No module named 'RemoteSwingLibrary' Traceback (most recent call last): None PYTHONPATH: c:\Temp\Workspace\Framework_Boost\resources c:\Temp\Workspace\Framework_Boost\lib c:\Users\xxxxxx.vscode\extensions\d-biehl.robotcode-0.78.0\bundled\libs c:\Users\xxxxxx.vscode\extensions\d-biehl.robotcode-0.78.0\bundled\tool\robotcode c:\Program Files\Python310\python310.zip c:\Program Files\Python310\DLLs c:\Program Files\Python310\lib

In the Code, I have this kind of message: No keyword with name 'RemoteSwingLibrary.Select Window' found.robotcode.namespace(KeywordNotFound)

Does there is a way to recognize jar library ?

Thank you.

joel-bgl commented 3 months ago

I'm newbie with VSC just find how to set PYTHONPATH. I've added the jar file path/name as an item to Robotcode › Robot: Python Path.