Why to use autocomplete selenium keywords?
When you start typing the first few letters of the keyword, you get a list of predictions. It’s called Autocomplete. There is a difference between having good knowledge of coding and memorizing all the keywords from the library. Memorizing all the library keywords doesn't judge your knowledge of coding. That’s where having these autocomplete keywords in IDE comes in handy.
IDE PyCharm automatically enables the autocompleting keywords feature. But In order to have this work on VS code, it takes a couple modifications on IDE.
Follow the below steps to enable autocomplete keyword feature on VSCode:
In the VS Code, get the following extension: Robot Framework intellisense FORK
Click on the gear icon present next to the extension.
Click Extension Settings
Look for RF Language Server:Libraries
Click Edit in Settings.jsonThis opens in the editor. Add the below library to the settings.Json file. Start typing seleniumLibrary and autocpmplete shows the versions. Select the desired version.
- {"rfLanguageServer.libraries": ["SeleniumLibrary-3.3.1"]}
Save.
Go back to the .robot file. When you start typing, the keywords will be displayed to autocomplete.
To get the keywords from any other libraries(Eg: BuiltIn, String, etc), in the settings.json file add the corresponding libraries.
Hope this article was helpful. Happy Automating :)
Nice write up! Hope this helps the community.
ReplyDeleteThis piece is on point. Thank you !
ReplyDeleteIt worked for me! THANKS :)
ReplyDeleteDirectly to the point. Thanks.
ReplyDeletecouldn't find "Edit in Settings.json" menu by clicking on Extension settings
ReplyDelete