pythonseleniumvisual-studio-codeautocompletesyntax-highlighting

How can I use Intellisense for Selenium on VS Code?


I cannot use Intellisense or highlightining for Selenium on VSCODE. For example, 'send_keys' command is not offered while typing or 'driver.find_element_by_xpath' is not colorful. I have installed Python extension and looked for Selenium extension, but not found anything.

enter image description here

Here is my 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": ""
}

Solution

  • It seems that VS Code does not support prompt "sent_keys()" at present; As for the color display of "driver.find_element_by_xpath", you could try different theme extensions, which will display colors, for example,"Tokyo Hack","SynthWave'84".