<em>src_folder</em> - will contain a list of folders where the test scripts are placed. In this example, we'll be keeping all our tests in the <b>tests</b> directory

@@ -88,25 +88,25 @@ There are two ways to configure Chromedriver to automate on the chrome browser.

In this example, we will be using the Standalone usage since there is no dependency on Java. But it requires a one-time configuration. Let's install the <b>ChromeDriver</b> npm package:

```bash

[code lang='bash']

yarn add --dev chromedriver

```

[/code]

Then disable the selenium server in the <em>nightwatch.json</em> file by adding the following configuration at the end:

```json

[code lang='js']

"selenium": {

"start_process": false

},

```

[/code]

Then in the <b>test_settings</b> configuration, we'll have to configure the selenium port and host since the default port used by chromedriver is <b>9515</b>. Let's update the <b>test_settings</b> config:

```json

[code lang='js']

"selenium_port": 9515,

"selenium_host": "localhost",

"default_path_prefix": ""

```

[/code]

We have to clear the <em>default_path_prefix</em>, as it is by default set to <em>/wd/hub</em> which chromedriver doesn't require it.

@@ -115,7 +115,7 @@ A global file is the js file which will be loaded by the test runner and made av

Let's create a file called <b>chromedriver.global.js</b>:

```js

[code lang='js']

var chromedriver = require('chromedriver');

module.exports = {

@@ -129,17 +129,17 @@ module.exports = {

done();

}

};

```

[/code]

Now we'll have to load this file through the configuration file. Add the following config at the end of the <em>nightwatch.json</em>:

Each file in the <em>tests</em> directory is considered as test suite. Here, in the <em>HomeTest.js</em> we have created one test called <b>Test Home Page</b>. Each test function will have one parameter which holds the webdriver instance. Here, we are calling that instance as <b>client</b>. All the nightwatch webdriver commands are accessed through this instance.

@@ -192,13 +192,13 @@ The <em>client.end()</em> is mandatory to close the browser instance and stop th