Make sure you have the following installed beforehand:
When using this test suite for the first time, you need to install the project dependencies. You have to do this by using NPM package manager in your terminal:
- Navigate to project root folder
- Install dependencies by running
npm i
To run all tests, run the protractor conf.js
command from the project root folder.
Sometimes, you will get an error:
session not created: This version of ChromeDriver only supports Chrome version XX
To fix this, please run: webdriver-manager update
and update protractor to the newest version by running npm i -g protractor
To make sure each specfile will run correctly, we use a "beforeAll" to prepare for the tests:
browser.get
to load the pagebrowser.wait
to wait for an important element, to make sure the page is loaded correctly.- A function to close the cookiebar if present. To make sure protractor can click elements.