Project contains Automated Test written in TypeScript/JavaScript using Cypress as an open source automation testing framework. My task is to automate testing of way2automation site, covering some of the scenarios with the steps provided.
To get automated test in your local copy up and running follow these simple example steps.
To publish and install packages to and from the public npm registry or a private npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer.
Note: to download the latest version of npm, on the command line, run the following command:
npm install -g npm
Please refer to the following
-
Clone the repo
git clone https://github.com/veydecapia/cypress-exercise.git
-
Install NPM packages. This downloads dependencies defined in a package.json file and generates a node_modules folder with the installed modules.
npm install
It would install first the required npm packages.
-
To run the created Automated test. Open cypress
npx cypress open
This will open the Cypress test runner.
Click search-course.spec.ts to open and run the whole test suite.
-
After the test is complete.
Note: 20 test cases should passed.Latest Test Result
-
You can view the generated json file under fixtures folder.
cypress > fixtures > actions.json
Expected json file to be generated
-
You can view the generated full page screenshot under screenshots folder.
cypress > screenshots > specs > search-course.spec.ts
Expected Full Screenshot
Automation exercise using Cypress which covers the below provided steps.
- Navigate to the web page
- List each of the action name for each categories in JSON format i.e. { interaction: ['draggable',...], widget: ['accordion', ...] }
- Get the associated link of the action "Submit Button Clicked" from the category "Dynamic Elements"
- Visit the retrieved link
- Fill up the dummy registration form by using an email from getnada.com >> Do I need to click the submit button?
- Click on the link "EXPLORE LIFETIME MEMBERSHIP"
- Scroll to "20+ Courses video library FREE ACCESS"
- Navigate to "Automation Architect Selenium with 7 live projects" from the carousel by clicking on the left arrow button
- Click on the "Get Started" button
- Assert the url page to be equals to "https://www.selenium-tutorial.com/p/automation-architect-in-selenium-7-live-projects"
- Search for the course "CucumberParallelWithPageObjects - Project Code"
- Click "Start" button
- Wait for the page to load and navigate back to url "https://www.selenium-tutorial.com/p/automation-architect-in-selenium-7-live-projects"
- Select "Pay in British Pounds"
- Assert the value is equals to "£15"
- Click on "Enroll in Course"
- Assert that the button is changed from "Enroll in Course" to "Processing..."
- Assert the page loaded contains "Order Summary"
- Click on each of the input boxes
- Verify when navigating away on each boxes, an error field will be displayed
- Screenshot the entire page.
Please also view and check my Automated browser end to end UI test built using Protractor.
TodoMVC https://github.com/veydecapia/todomvc-exercise
Your Name - [email protected]
Project Link: https://github.com/veydecapia/cypress-exercise.git