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:
Top 10 Cypress Commands
- cy.visit():
cy.visit()
command is used to navigate to the URL https://example.cypress.io
. The describe
and it
blocks are used to define a test suite and a test case, respectively. In this case, the test case simply visits the specified URL, but you could add additional commands to interact with the page or perform assertions once the page has loaded.- cy.get():
- cy.contains():
In this example, the cy.contains()
command is used in several ways:
To click on a specific text on the page:
cy.contains('Type').click();
To locate an input field within a form and type into it:
cy.contains('form').find('input[name="email"]').type('fake@email.com');
To click a submit button:
cy.contains('Submit').click();
To make an assertion that a specific text is present on the page:
cy.contains('Your form has been submitted!');
In each of these examples, the cy.contains()
command is used to search for a specific string of text on the page, and then perform an action or make an assertion based on that search result.
- cy.click():
- cy.type():
cy.type()
command is used to enter text into two input fields on a form. The first line of text is entered into an input field with the name "email", while the second line of text is entered into an input field with the name "password". Additionally, the special key {enter}
is used to simulate the pressing of the "Enter" key, which would typically submit the form. After the form is submitted, an assertion is made to verify that the expected text is present on the page.- cy.clear():
- Write a script in Cypress to automate gmail.
- cy.wait():
- cy.wrap():
myObject
is an object with a method doSomething
. By wrapping it with cy.wrap
, we can access the properties and methods of myObject
using the Cypress command-like syntax. In this case, we are accessing the doSomething
method of myObject
and invoking it using invoke
.- cy.should():
- How to rerun failed test cases using Cypress?
- cy.log():
In this example, the
cy.log
method is used to log the message 'This is a log message'
to the browser's console and to the Cypress test runner. You can use cy.log
to log any type of data, including strings, numbers, objects, and arrays. The logged data will be displayed in the Cypress test runner and can be used for debugging or for tracking the progress of your tests.These commands cover a range of basic UI interactions and are a good starting point for building automated tests with Cypress.
Basic Linux Commands for Automation QA
****************************************
TOP 15 BDD - CUCUMBER Interview Q&A
************************************************
✍️AUTHOR: LinkedIn Profile
************************************************
Learn (API-Microservice)Testing+ Selenium UI Automation-SDET with Self Paced Videos prepared by FAANG employees and LIVE Doubt Session
*************************************************
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