from robot.api.deco import library,keyword
from robot.libraries.BuiltIn import BuiltIn
@library
class Shop:
def __init__(self):
self.selLib = BuiltIn().get_library_instance("SeleniumLibrary")
The last line is not working it is giving some error in robot file getting this error in the robot file
Should be able to create custom keyword
That error does not come from Robot Framework. It is coming from robotcode LSP which is just a feature for your IDE. You wont get this error when actually running your code.
So, when robotcode scans your code - it will try to initialize your class in order to find out what keywords it will expose - But because its lsp, not robot framework, robot isnt running and thus and you are calling a feature that needs robot framework internals, you get that exception.
You could: