Importing an library in Robot Framework comes in RED color. – User friendly Tech help
Issue: – We tried adding the Selenium2Libray in robot framework but its shown in red color(in settings) and we are not able to implement any of the keywords.
n
nRoot cause: – Anything coming in red in settings after importing generally means that particular library is not properly installed.
n
nLet’s check whether we were able to install selenium2library.
nType python in cmd and type “import selenium2library”, in our case it would give the error message something call stack error.
nWe can visualize the same error after importing selenium2library in ride and going to Tools > View in ride.
n
n
We found some files were missing like in our case its decorator dependency that RIDE is not able to locate when loading “Selenium2Library”
n
nNote: – Most of the time it’s some missing files that are not installed which results in libraries name coming in red on adding to RIDE. Like same can happen on importing “ExcelLibrary” or “Database library”
n
nSolution:-
nGo ahead and install the missing dependency, in our case its “decorator”
nDownload the dependency
nOpen the command prompt to the extracted downloaded file
nsetup.py install
n
nAnd we are done.
n
nNote:- As discussed same solution can be applied to any external library that is coming as red on importing into RIDE inside settings tab.
n
nLearn Robot Framework