Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWhile importing python library can we avoid to specify argument values #384
Comments
|
Hmn, I'm no expert here but seems to me that the way you are declaring your custom library's constructor means you need 2 arguments, a host parameter and a port parameter. So maybe changing your constructor and declaring a default host argument will help get you where you want to go. If I am understanding your problem correctly. |
|
You are right. If I change constructor it will solve my problem. |
|
Hi, yes, if your library constructor has arguments and you want RED to recognize this library and provide all the features then you either need to:
This is actually not something that RED itself requires, but this is inherited from Robot libdoc tool (https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#library-documentation-tool-libdoc) which is used by RED to generate list of keywords with their signatures and documentations. When generating those files |
I am able to use the python library keyword if I specify the argument value in red.xml.
But I have so many python libraries in the existing project and wanted to import all python files as a library. while importing it is giving error for the expected arguments.
I don't want to give argument values there. Because development is in progress and every day so many changes are coming in for the library. So, want to avoid every time to update and add an argument part
Please find below the error sample screenshot.

Also, suggest if there is any other way or workaround.
Is there a way to import python library without specifying a value for the argument.