Skip to main content

Posts

Showing posts from August, 2020

Cypress-Page-Object-Model Framework

  Cypress-Page-Object-Framework Cypress : a JavaScript End to End testing framework. Benefits of Cypress :- 1.     Cypress is also able to intercept AJAX request and provide fake responses. This approach is known as stubbing. 2.     Cypress is a Node server process. Cypress and the Node process constantly communicate, synchronize, and perform tasks on behalf of each other. 3.     Modify DOM elements directly - like forcing hidden elements to be shown 4.     Control time by moving forward or backward  so that timers or polls automatically fire without having to wait for the required time in your tests 5.     Cypress operates within your application, that means it has native access to every single object. Whether it is the window, the document, a DOM element, your application instance, a function, a timer, a service worker, or anything else - you have access to it in your Cypress tests. There is no object serialization, there is no over-the-wire protocol - you have access to everything.

Selenium Page Object Automation Framework Using Java

  Selenium Page Object Automation-Framework Selenium page object automation framework using java & Maven & TestNG & Extent Report Page Object Model (POM) : Design pattern. The Page Object Design Pattern provides the following advantages: There is a clean separation between test code and page specific code such as locators (or their use if you’re using a UI Map) and layout. There is a single Object repository for the services or operations offered by the page rather than having these services scattered throughout the tests. Example :  HomePage,Login Page are object repository  Page Factory :  Page Factory is a class provided by   Selenium WebDriver  to support Page Object Design patterns. In Page Factory we have @FindBy annotation. The  PageFactory.initElements method is used to initialize web elements. @ FindBy  can accept tagName, partialLinkText, name, linkText, id, css, className, xpath  @FindBy ( xpath = "xpath " )   @FindBy ( tagName = " tagName &qu