Dealing with libraries absolute paths
When library is added to red.xml RED will check if it is located in workspace or not. Depending on the
outcome it will be written with workspace-relative path or absolute one. The problem with the latter is that
it is not portable between different users and/or systems. This commonly happens for libraries installed into
site-packages using pip:
Solution
Solution to this problem is to combine resources linking and path variables so that the path
in red.xml will use relative path to linked location. In such setup there would be no absolute paths used by
red.xml thus making it easier to be shared across different users. In order to achieve that:
Open
General -> Workspace -> Linked Resourcespreference page,create new variable and make it point to e.g.
site-packages:
choose
New -> Folderfrom context menu in chosen location somewhere inside your project,expand
Advanced >>button and chooseLinked Folder,use
SITE_PACKAGESvariable and append location ofSeleniumLibrarydirectory,
now the link will be created resulting in link entry in
.projectfile (no directory is created in the project) and the directory should be visible in Project Explorer,
finally the entry in
red.xmlcan be changed (this has to be done manually) to use workspace relative path to the linked file:
The steps above make the project portable between different machines - there is only relative path inside
red.xml plus parameterized entry inside .project file. The only thing that needs to be done
is to define SITE_PACKAGES variable accordingly for different project users.