💡 Skip to
Step 2if using Gitpod
-
After cloning, install dependencies:
npm install
-
Run the example tests
npm run wdio
💡 If using Gitpod, open Port
6080to see the test(s) running
Opening an existing project can be daunting, but there are a few places to look first to get a handle on what's going on.
💡 By default, WDIO uses the
PageObjectandspecpatterns along with theMochatest framework for their Automation.
-
The
/testdirectory would be the first place to look for things that matter:/specs- the test files that use the Page Objects
-
In this project, we are testing DemoQA.com, so look at the
/demoqadirectory/demoqa- any files, like Page Objects, that are relevant to our web app
-
The
wdio.conf.jsconfiguration file is where you can define settings for your test automation
In VS Code, you can turn on debugging via the Command Palette:
-
Open Command Palette
- Mac:
SHIFT + COMMAND + P - Windows:
SHIFT + CTRL + P
- Mac:
-
Search for
Debug: Toggle Auto Attach -
Select
Always
💡 Now you can add breakpoints to your test! Run the test normally and observe the test stops at your breakpoint with controls to Continue, Step Over, and even inspect variables!