All blog posts
-
Grokking 75:Roman to Integer (easy)
Problem Statement Given the Roman numeral string s, convert it into its equivalent integer and return it. Roman numerals use combinations of seven symbols: I, V, X, L, C, D, and M, representing values 1, 5, 10, 50, 100, 500, and 1000 respectively. For example, I is equivalent to 1, II is equivalent to 2, and XI is equivalent to 11 (X + I). In some cases, a smaller numeral before a larger numeral indicates subtraction (e.g.,…
-
Grokking 75: Kids With the Greatest Number of Candies
Kids With the Greatest Number of Candies Problem Statement There are n kids with candies. You are given a candies array containing integers, where candies[i] denotes the number of candies the ith kid has, and an integer extraCandies, represents the number of extra candies that you have. Return a boolean array result of length n, where result[i] is true if, after giving all the extraCandies to the ith kid, he/she will…
-
Grokking 75 – Top Coding Interview
Welcome to Grokking 75 – Top Coding Interview Questions Your ultimate guide to acing coding interviews. This course is designed to help you tackle high-frequency questions that have been asked in top tech companies — including FAANG — over the past 6 to 12 months. If you’re short on time and need to ensure your…
-
Cross-Origin Testing in Cypress: Strategies and Solutions
Understanding the Same-Origin Policy Challenge Modern browsers enforce strict same-origin policies that prevent scripts from one origin from interacting with content from another origin. This presents unique challenges for test automation, which Cypress elegantly solves through several innovative approaches. How Cypress Handles Cross-Origin Restrictions Cypress implements sophisticated strategies to work within browser security constraints: When…
-
Cypress wrap(): Handling Objects, Elements, and Promises
Cypress’s cy.wrap() command is a powerful tool for integrating non-Cypress values into your test command chain. Understanding cy.wrap() The cy.wrap() command yields the object passed into it. If the object is a promise, it yields the resolved value. Syntax Arguments Key Use Cases 1. Working with Objects 2. Handling DOM Elements Basic Element Wrapping Conditional…
-
Cypress Architecture: A Detailed Exploration
Cypress is a powerful end-to-end testing framework for web applications. Its unique architecture sets it apart from other testing tools like Selenium, making it easier to write, debug, and execute tests. In this blog, we will delve into the details of Cypress architecture and explore how it functions with real-time examples. Cypress Architecture Overview Cypress…
-
Alternative to Docker for Selenium Automation on Windows
Podman on Windows: A Lightweight Docker Alternative Docker on Windows is known for being resource-intensive, requiring a background daemon to run containers. If you’re looking for a more efficient solution, Podman offers a lightweight, secure, and daemonless alternative with full Docker compatibility. How Podman Works on Windows Since Windows can’t natively run Linux containers, Podman…
-
Cypress part 7
Cypress Actionability and Interaction with Elements What you’ll learn How Cypress determines if an element is actionable How to debug when elements are not actionable How to ignore Cypress’ actionability checks Common patterns for handling asynchronous code in Cypress When to assign variables and when not to How to use aliases to share objects between…
-
Cypress part 6
Writing and Organizing Tests in Cypress What You’ll Learn How to organize Cypress tests and supported file types. Writing tests with hooks, exclusions, and configurations. Understanding test statuses. Auto-watched files in Cypress. Folder Structure When adding a new project, Cypress scaffolds a default folder structure for E2E and Component testing: E2E: /cypress.config.js /cypress/fixtures/example.json /cypress/support/commands.js /cypress/support/e2e.js…
-
Cypress part 5
Introduction to Cypress App – A Beginner’s Guide to Testing Introduction to Cypress App – A Beginner’s Guide to Testing Introduction Cypress is a powerful and user-friendly testing framework designed for modern web applications. This guide will introduce you to Cypress, covering essential concepts, querying elements, handling asynchronous commands, and best practices for writing stable…