This repository was archived by the owner on Nov 2, 2020. It is now read-only.
This repository was archived by the owner on Nov 2, 2020. It is now read-only.
Import Failure when Library resource has a variable #152
Open
Description
Import Error on Windows Sublime 3114, Robot Framework Assistant 4.1.0 when a variable is in the Library resources
Example:
*** Settings ***
Resource ../resources/resources.txt
Resource ../resources/object_repository.txt
Resource ../resources/keywords.txt
Resource ../resources/${res_LAB}.txt
When Create Database is run, the log file reports an import error (from scan_index.log
)
('Import failure on file: c:\\users\\user\\documents\\_robotwork\\selfcare\\test_cases\\testscript.txt,', 'could not locate: ../resources/${res_LAB}.txt')
Curiously, we tried adding${res_LAB}
to "robot_framework_builtin_variables":
to see if it gets ignored, but no luck
Here is the User Settings file:
{
"extensions":
[
"txt"
],
/*
Robot Framework Workspace
Defines a root folder where Test Suite located.
Before the Robot Framework Assistant can provide the keyword
and variable completion features, it needs to scan and index
the test suite and resource files. The argument defines the root folder
where scanning of robot data is performed.
In windows the backslash is the folder separator and in json
backslash is the escape character. Therefore, in windows write
double backslash to write literal backslash.
Linux example: "/home/User/myRobotTests"
Windows example: "c:\\Users\\User\\Desktop\\myRobotTests"
*/
"robot_framework_workspace": "C:\\Users\\user\\Documents\\_robotwork\\suite\\test_cases",
/*
File extension defines which types of files the Robot Framework
Assistant plugin will search and index from the folder defined
in the robot_framework_workspace option.
This setting does not affect to the which files are uses the
syntax highlight.
*/
"robot_framework_extension": "txt",
/*
Path to Python binary
In order the scanning and indexing of keywords and variables to
work, path to Python binary must be defined. It must be the same
Python binary where the Robot Framework is installed.
In Linux like environments this could be like: /usr/bin/python
and in Windows this could be like: C:\Python27\python.exe
*/
"path_to_python": "C:\\Python27\\python.exe",
/*
Module search path defines a list of paths where the
Robot Framework libraries are searched. Example if you have imported
a library with the library name, then module search path must
contain the folder where the library can be located.
The Robot Framework Assistant uses the Robot Framework API to parse
the test data and libraries. All changes, which are not system
wide, to locate the libraries, must also be added in the
module search path in the Robot Framework Assistant
More details how libraries is searched in Robot Framework can be
found from be the Robot Framework User guide:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#module-search-path
*/
"robot_framework_module_search_path":
[
"C:\\Python27\\libs",
"C:\\Python27\\Lib\\site-packages",
],
/*
Robot Framework variables
Robot Framework comes by default some predefined and built in
variables. These variables names may change between different
Robot Framework versions. Use this setting to define the
Robot Framework default variables.
The variables in the default settings are from Robot Framework
version 2.9.2
*/
"robot_framework_builtin_variables":
[
"${/}",
"${:}",
"${\\n}",
"${CURDIR}",
"${DEBUG_FILE}",
"${EMPTY}",
"@{EMPTY}",
"&{EMPTY}",
"${EXECDIR}",
"${False}",
"${LOG_FILE}",
"${LOG_LEVEL}",
"${None}",
"${null}",
"${OUTPUT_DIR}",
"${OUTPUT_FILE}",
"${PREV_TEST_MESSAGE}",
"${PREV_TEST_NAME}",
"${PREV_TEST_STATUS}",
"${REPORT_FILE}",
"${SPACE}",
"${SUITE_DOCUMENTATION}",
"${SUITE_NAME}",
"${SUITE_SOURCE}",
"${TEMPDIR}",
"${TEST_DOCUMENTATION}",
"${TEST_NAME}",
"${True}",
"&{SUITE_METADATA}",
"@{TEST_TAGS}",
"${res_LAB}"
],
}