The usual Node project way 🔥
- Run
npm install
- After all dependencies get installed successfully, run
npm run wdio:test
- Enjoy the colors!
This is an end to end suite that handles the dreaded Google page and its complex locators
Executes just once before the test suite starts
- Loads
Google
website
Validates that
- The page has a
Google
logo - The page has an
I'm feeling lucky
button
Executes a
Google search
and validates that results are shown
- Enter
cats
within theGoogle search input box
- Results should be displayed
- Url now contains
/search
Extra validation that our term
cats
was the one actually searched for
- Input box on top contains
cats
as a value
Validates that after results are shown,
Images
andVideos
tabs are available
- The page displays
Images
tab - The page displays
Videos
tab
Clicks on the
Images
tab, clicks on the second result image and validates that there's aVisit
button displayed
- Click on the
Images
tab - Select the second image
- Validate that the
Visit
button is displayed
Validate that the
"hypothetical" Open in new tab
button is displayed next to theVisit
button This should fail
- Validate that the
Open in new tab
button is displayed