机器人框架助手插件不会在崇高的文本3中自动完成

时间:2017-08-16 23:47:11

标签: sublime-text-plugin

致力于工作的自动化测试和老板想要比使用Selenium的直接Python更简单的东西。所以我们已经使用Robot Framework来简化测试用例的创建。

我的问题是直到今天我的关键字自动完成在Sublime文本3中工作得很好。我正在努力将Appium和Appium库添加到该自动完成,然后它停止工作。我已经尝试恢复到原来的状态,但似乎缺少某些东西或者没有工作,我不知道是什么。我知道Robot Framework Assistant的“create database”命令是基于sublime控制台而烦恼的。谁能告诉我可能会缺少什么?

My current PATH

The errors in Sublime console

这是sublime控制台中提到的数据库目录中日志文件的内容。我做了一个pip install finder,但似乎没有解决任何问题:

Traceback (most recent call last): File "C:\Users\kepperson\AppData\Roaming\Sublime Text 3\Packages\Robot Framework Assistant\dataparser\run_scanner.py", line 9, in <module> from queue.scanner import Scanner File "C:\Users\kepperson\AppData\Roaming\Sublime Text 3\Packages\Robot Framework Assistant\dataparser\queue\scanner.py", line 7, in <module> from finder import finder ImportError: cannot import name 'finder'

我的插件设置:

/*
Robot Framework Assistant default settings


/*
    Sublime settings to make Robot Framework data editing more
    clearer and easier. Refer the Sublime default settings for
    more details.
*/
"translate_tabs_to_spaces": true,

"trim_trailing_white_space_on_save": true,

"draw_white_space": "all",

/*
    Same as the Sublime default in Build 3103 with one exception,
    it does not contain the * character. When the * is not in
    word_separators the snippets containing * in tabTrigger
    work out of the box.

    If * is needed as a word separator, then the snippets
    should be accessed by pressing tab key multiple times.

*/
"word_separators": "./\\()\"'-:,.;<>~!@#$%^&|+=[]{}`~?",

/*
    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:\\sq_automation\\test_cases",

/*
    Defines how keyword argument are formatted when keyword
    completion is used. When set to false, each argument is
    formatted to individual lines. If set to true keyword
    and arguments are returned in single line.
*/
"robot_framework_keyword_argument_format": true,

/*
    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": "robot",

/*
    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:\\python36\\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://sq_automation"
    ],

/*
    Automatic database update on saving file

    The robot_framework_automatic_database_update setting controls the
    internal database updating. If the set to true, the internal
    database table and index are created after a Robot Framework test data
    file is saved. If set to false, the internal database tables are
    only updated when the `Create Database`, `Create Database Tables`
    or `Update Internal Database For Active Tab`
    commands are run.

    The setting only controls the Robot Framework test data. If a
    libraries or a variable files are updated, then `Create Database`,
    `Create Database Tables` or `Create Database Table From Active Tab`
    commands must be run to update the internal database.

*/
"robot_framework_automatic_database_update": true,

/*
    Robot Framework libraries in XML

    When the library is not available during parsing time,
    example if library is imported with Remote library interface.
    Then this setting can be used to import libraries in libdoc XML
    format.

    Libraries found from the this path are globally available, in
    same manner as the BuiltIn library

*/
"robot_framework_libraries_in_xml": "/path/to/library/documentation",

/*
    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}"
    ],

/*
    Path to internal database

    By default internal database is created in plugin installation
    directory, in database folder. Sometimes it could be useful to
    change the default database location.

    Example if the robot_framework_workspace is defined in the
    Sublime workspace file and user wants to change between
    different projects. Then it is useful to define
    robot_framework_database_path setting also be project specific.
    When the internal database is project specific, user does not
    recreate the database when the project is changed.

    The robot_framework_database_path must be a path to a folder.
    If the setting is not path to a folder, then the database
    is created in the plugin installation directory.

*/
"robot_framework_database_path": false,

/*
    Sublime Text log_commands

    This setting controls will the 'Robot Framework: Command Logging'
    command enable or disable the Sublime Text log_commands API call.
    If the robot_framework_log_commands setting evaluates as Python
    True, then log_commands API call is enabled. If setting
    evaluates as Python False, log_commands API call is disabled.

    If log_commands API call is enabled. all commands run from key
    bindings and the menu will be logged to the console.
*/
"robot_framework_log_commands": false

如果需要更多信息,我会尽力获取。

1 个答案:

答案 0 :(得分:0)

在完美的风格中,我看到我的路径是&#34; robot_framework_module_search_path&#34;:使用//而不是\\所以这已经解决了,我是愚蠢的。