- WebdriverIO Tutorial
- WebdriverIO - Home
- WebdriverIO - Introduction
- WebdriverIO - Prerequisite
- WebdriverIO - Architecture
- WebdriverIO - Getting Started with NodeJS
- WebdriverIO - Installation of NPM
- WebdriverIO - VS Code Installation
- WebdriverIO - Package.json
- WebdriverIO - Mocha Installation
- Selenium Standalone Server Installation
- WebdriverIO - Configuration File generation
- WebdriverIO - VS Code Intellisense
- WebdriverIO - Wdio.conf.js file
- WebdriverIO - Xpath Locator
- WebdriverIO - CSS Locator
- WebdriverIO - Link Text Locator
- WebdriverIO - ID Locator
- WebdriverIO - Tag Name Locator
- WebdriverIO - Class Name Locator
- WebdriverIO - Name Locator
- Expect Statement for Assertions
- WebdriverIO - Happy Path Flow
- WebdriverIO - General Browser Commands
- WebdriverIO - Handling Browser Size
- WebdriverIO - Browser Navigation Commands
- Handling Checkboxes & Dropdowns
- WebdriverIO - Mouse Operations
- Handling Child Windows/Pop ups
- WebdriverIO - Hidden Elements
- WebdriverIO - Frames
- WebdriverIO - Drag & Drop
- WebdriverIO - Double Click
- WebdriverIO - Cookies
- WebdriverIO - Handling Radio Buttons
- Chai Assertions on webelements
- WebdriverIO - Multiple Windows/Tabs
- WebdriverIO - Scrolling Operations
- WebdriverIO - Alerts
- WebdriverIO - Debugging Code
- WebdriverIO - Capturing Screenshots
- WebdriverIO - JavaScript Executor
- WebdriverIO - Waits
- WebdriverIO - Running Tests in Parallel
- WebdriverIO - Data Driven Testing
- Running Tests from command-line parameters
- Execute Tests with Mocha Options
- Generate HTML reports from Allure
- WebdriverIO Useful Resources
- WebdriverIO - Quick Guide
- WebdriverIO - Useful Resources
- WebdriverIO - Discussion
WebdriverIO - VS Code Intellisense
Once we have completed installation of the Visual Studio Code, we should add the intellisense in the editor so that once we begin writing the WebdriverIO commands, the auto-suggestions of the WebdriverIO methods are displayed.
The details on how to do a VS Code installation are discussed in detail in the Chapter titled VS Code Installation.
This is a very important feature that should be added so that the end-users do not need to memorize the raw code for the WebdriverIO.
Add intellisense to VS Code
The steps to add intellisense to the VS Code for the WebdriverIO are listed below −
Step 1 − Click on the New File button appearing to the right of the WebdriverIO project.
The following screen will appear on your computer −
Step 2 − Enter the file name as jsconfig.json. Here, we have to specify the path of the spec files where we are implementing our test.
If we want to apply intellisense feature to all the spec files within the test folder, we can specify the relative path as test/spec/*.js.
The following screen will appear on your computer −
Step 3 − Add the below code inside the file.
{ "include": [ //relative path of all spec files "test/specs/*.js", "**/*.json", "node_modules/@wdio/sync", "node_modules/@wdio/mocha-framework" ] }
Step 4 − In the spec file, start writing a WebdriverIO object or a method and we shall obtain the entire auto - suggestions.
The following screen will appear on your computer −