Thursday, 9 February 2023

Cypress demo script for Gmail automation

 



SDET Interview Question and Answers.  

Jenkins Interview Questions and Answers

Appium Interview Questions and Answers

Selenium Interview Questions and answers

GIT Interview Questions and Answer


What is Cypress?

Cypress is a purely JavaScript-based front-end testing tool built for the modern web. It aims to address the pain points developers or QA engineers face while testing an application. Cypress is a more developer-friendly tool that uses a unique DOM manipulation technique and operates directly in the browser.


INSTALL CYPRESS

If you haven't installed Cypress yet then refer to this link on:


Demo script for Cypress to automate gmail


describe('Gmail Automation with Cypress', () => {
  beforeEach(() => {
    cy.visit('https://gmail.com');
  });

  it('Logs in to Gmail account', () => {
    cy.get('input[type="email"]').type('your_email@gmail.com');
    cy.get('#identifierNext').click();
    cy.get('input[type="password"]').type('your_password');
    cy.get('#passwordNext').click();
    cy.get('.Wixet').should('be.visible');
  });

  it('Sends an email', () => {
    cy.get('[role="button"][aria-label="Compose"]').click();
    cy.get('textarea[name="to"]').type('recipient_email@gmail.com');
    cy.get('input[name="subjectbox"]').type('Test email from Cypress');
    cy.get('.Am.Al.editable.LW-avf').type('This is a test email sent from Cypress.');
    cy.get('[aria-label="Send ‪(Ctrl-Enter)‬"]').click();
    cy.get('.bAq').should('contain', 'Your message has been sent.');
  });

  it('Checks the sent email', () => {
    cy.get('a[title="Sent Mail"]').click();
    cy.get('.yO').should('contain', 'Test email from Cypress');
  });
});


This script tests logging into a Gmail account, sending an email, and checking if the sent email is in the "Sent Mail" folder. Note that you'll need to replace your_email@gmail.com and your_password with your actual Gmail email and password.

Learn Top 11 Cypress commands with real time examples


For any doubts or career guidance, reach out to me :



Similar Topics :
  1. Cypress demo script for Gmail automation
  2. Automating Gmail with Cypress demo script
  3. Step by step Cypress demo script for Gmail
  4. Cypress Gmail automation demo
  5. Cypress demo for automating Gmail login
  6. Cypress script for Gmail automation testing
  7. Cypress Gmail automation example
  8. Cypress script to automate Gmail inbox
  9. Cypress demo for automating Gmail UI testing
  10. Gmail automation with Cypress demo code
*******************************************************************
For any doubts or career guidance, reach out to me 


********************************************************************





Do remember that knowing Linux is one of the most important aspect to work as an SDET.

Basic Linux Commands for Automation QA


****************************************

TOP 15 BDD - CUCUMBER Interview Q&A


************************************************

✍️AUTHORLinkedIn Profile

************************************************

Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employees and LIVE Doubt Session 

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With Class Notes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122. 
This includes classnotes, 300+ interview questions, 3 projects, Java Coding question set for product companies along with career guidance from FAANG employees for Automation and SDET.

For more details whatsapp : https://lnkd.in/dnBWDM33

*************************************************

SeleniumWebdriver Automation Testing Interview Questions:

https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/2022/03/top-80-api-testing-interview-questions.html

DevOps Interview Q&A:

https://automationreinvented.blogspot.com/2021/11/top-11-devops-interview-questions-and.html 

Kubernetes Interview Question Set

https://automationreinvented.blogspot.com/search/label/Kubernetes

Docker Interview Question Set

https://automationreinvented.blogspot.com/Docker

Linux Interview question Set

https://automationreinvented.blogspot.com/search/label/Linux

Automation Testing/SDET Framework Design

https://automationreinvented.blogspot.com/search/label/FrameworkDesign

Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java

GIT Interview Question Set:

https://automationreinvented.blogspot.com/2021/09/top-40-git-interview-questions-and.html

Coding Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

https://automationreinvented.blogspot.com/search/label/Python

No comments:

Post a Comment

All Time Popular Posts

Most Featured Post

Introduction to Web Testing with Playwright

  Introduction to Web Testing with Playwright 📌  Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 📌  YouTube channel:  https://lnkd.in/gGUG...