Create a new folder for this recipe and create a new file inside it, named index.html.
This file will contain our Vue application and it is what we will test. Write the following in this file:
<!DOCTYPE html><html><head> <title>Nightwatch tests</title> <script src="https://unpkg.com/vue/dist/vue.js"></script></head><body> <div id="app"> </div> <script> </script></body></html>
As you can see, this is just the usual boilerplate for a small Vue application. Inside the <div>, put a header and a button; when we click on the button, the text Hello Nightwatch! will be displayed:
<div id="app"> <h2>Welcome to my test page</h2> <button @click="show = true">Show</button> <p v-show="show">Hello Nightwatch!</p></div>
Inside the script ...