【问题标题】:How can I use Intellisense for Selenium on VS Code?如何在 VS Code 上将 Intellisense 用于 Selenium?
【发布时间】:2020-10-29 02:26:50
【问题描述】:

我无法在 VSCODE 上对 Selenium 使用 Intellisense 或高亮显示。例如,键入时不提供“send_keys”命令,或者“driver.find_element_by_xpath”不是彩色的。我已经安装了 Python 扩展并寻找 Selenium 扩展,但没有找到任何东西。

这是我的 settings.json:

  {
    "editor.suggestSelection": "first",
    "python.languageServer": "Microsoft",
    "python.pythonPath": "/usr/local/opt/python/bin/python3.7",
    "editor.fontSize": 14,
    "python.linting.pylintEnabled": true,
    "python.linting.enabled": true,
    "python.linting.flake8Enabled": false,
    "python.autoComplete.extraPaths": [
        
    ],
    "java.semanticHighlighting.enabled": true,
    "vsintellicode.modelDownloadPath": ""
}

【问题讨论】:

    标签: python selenium visual-studio-code autocomplete syntax-highlighting


    【解决方案1】:

    目前看来VS Code不支持提示“sent_keys()”; 至于“driver.find_element_by_xpath”的颜色显示,你可以尝试不同的主题扩展,它会显示颜色,例如,“Tokyo Hack”,“SynthWave'84”。

    【讨论】:

      【解决方案2】:

      您可以尝试使用 Kite AI。它将帮助您自动完成所有 Selenium 关键字

      • 首先安装Kite engine

      • 然后从 VS Code 安装 Kite 扩展。

      【讨论】:

        猜你喜欢
        • 2019-09-15
        • 2018-01-17
        • 2019-08-04
        • 1970-01-01
        • 1970-01-01
        • 2016-12-14
        • 1970-01-01
        • 2021-06-18
        • 1970-01-01
        相关资源
        最近更新 更多