<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Kotesh_🔯</title>
    <description>The latest articles on Forem by Kotesh_🔯 (@kotesh_mudila).</description>
    <link>https://forem.com/kotesh_mudila</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F205617%2F57b1b4a5-955e-4e4f-b115-7d29c756fc25.jpg</url>
      <title>Forem: Kotesh_🔯</title>
      <link>https://forem.com/kotesh_mudila</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kotesh_mudila"/>
    <language>en</language>
    <item>
      <title>Testing PCI Iframes Easily</title>
      <dc:creator>Kotesh_🔯</dc:creator>
      <pubDate>Tue, 03 Feb 2026 06:41:09 +0000</pubDate>
      <link>https://forem.com/kotesh_mudila/testing-pci-iframes-easily-gp7</link>
      <guid>https://forem.com/kotesh_mudila/testing-pci-iframes-easily-gp7</guid>
      <description>&lt;p&gt;Cracking the "Impossible" Payment Test: Automating PCI Iframes in Cypress&lt;br&gt;
If you’ve ever tried to automate a checkout flow in Cypress, you’ve likely hit the wall. I hit it hard.&lt;/p&gt;

&lt;p&gt;I was ready to write an official Architecture Decision Record (ADR) declaring payment automation impossible. My logic was sound: "Payment automation is blocked by PCI iframes. Browser security policies prevent script access. We must rely on Manual QA."&lt;/p&gt;

&lt;p&gt;It seemed like the end of the road. But after digging through resources, stack overflow threads, and documentation, I realized the blocker wasn't the payment gateway—it was the test runner configuration.&lt;/p&gt;

&lt;p&gt;Here is how I solved the "impossible" problem with a single configuration flag.&lt;/p&gt;

&lt;p&gt;The Problem: The Cross-Origin Barrier&lt;br&gt;
Modern payment gateways use Secure Payment Fields hosted within  elements. This is great for security (PCI compliance), but a nightmare for end-to-end testing.&lt;/p&gt;

&lt;p&gt;When Cypress tries to interact with an input field inside a cross-origin iframe, the browser throws a security error. The test runner simply cannot "see" or "touch" the elements inside that frame.&lt;/p&gt;

&lt;p&gt;Usually, this forces teams into one of two bad options:&lt;/p&gt;

&lt;p&gt;Skip the payment step (Flaky tests).&lt;br&gt;
Stick to manual QA (Slow feedback loops).&lt;br&gt;
The Solution: chromeWebSecurity&lt;br&gt;
The missing piece was a single flag inside cypress.config.js.&lt;/p&gt;

&lt;p&gt;By default, Cypress runs with Chromium's web security turned on to emulate a real browser environment. However, for testing purposes, we can disable this constraint.&lt;/p&gt;

&lt;p&gt;The Setup&lt;br&gt;
Open your cypress.config.js (or .ts) and update the e2e configuration:&lt;/p&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;const { defineConfig } = require("cypress");&lt;/p&gt;

&lt;p&gt;module.exports = defineConfig({&lt;br&gt;
  e2e: {&lt;br&gt;
    setupNodeEvents(on, config) {&lt;br&gt;
      // implement node event listeners here&lt;br&gt;
    },&lt;br&gt;
    // THE MAGIC FLAG&lt;br&gt;
    chromeWebSecurity: false,&lt;br&gt;
  },&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;Once this flag is set, Cypress treats cross-origin iframes as part of the same domain. The "No Access" wall vanishes.&lt;/p&gt;

&lt;p&gt;This solution works, but it comes with a specific trade-off.&lt;/p&gt;

&lt;p&gt;You are turning off browser security inside your test runner.&lt;/p&gt;

&lt;p&gt;Good: This is perfectly safe for a Test Environment. You are not compromising your actual production database or payment processor. You are simply relaxing the rules for your automated scripts to verify functionality.&lt;/p&gt;

&lt;p&gt;Bad: Do not use this flag in your actual production application code. This is strictly for E2E testing.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Browser security was never the real blocker. It was just a setting I hadn't flipped yet.&lt;/p&gt;

&lt;p&gt;By adding chromeWebSecurity: false, we moved from a manual regression bottleneck to a fully automated pipeline.&lt;/p&gt;

&lt;p&gt;If you're staring at an "impossible" test today, check your configuration first. You might just be one flag away from the green checkmark.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>cypress</category>
      <category>iframes</category>
    </item>
    <item>
      <title>Underrated disparities b/w var, let and const you should be aware of [Part-1]</title>
      <dc:creator>Kotesh_🔯</dc:creator>
      <pubDate>Thu, 06 Apr 2023 08:09:16 +0000</pubDate>
      <link>https://forem.com/kotesh_mudila/underrated-disparities-bw-var-let-and-const-you-should-be-aware-of-part-1-4543</link>
      <guid>https://forem.com/kotesh_mudila/underrated-disparities-bw-var-let-and-const-you-should-be-aware-of-part-1-4543</guid>
      <description>&lt;p&gt;We all know that var, let and const are keywords in Javascript with their own behaviours while declaring variables using them, such as SCOPING &amp;amp; RE-DECLARATION bla..bla..bla...&lt;/p&gt;

&lt;p&gt;But here I will just give keep it short and simple with multiple parts, so that you won't get lost in an overwhelming bunches of words and sentenses.&lt;br&gt;
so get ready for a short series of content chunks⚡&lt;/p&gt;

&lt;h2&gt;
  
  
  THE SCOPE 🔭
&lt;/h2&gt;

&lt;p&gt;That's just a set of curly braces { } 👇🏻&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F67tgofku9qi7h2hyeyft.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F67tgofku9qi7h2hyeyft.png" alt="Representation of Scope in Javascript" width="800" height="293"&gt;&lt;/a&gt;&lt;br&gt;
If they belong to a function then it's called as Function Scope 👇🏻 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffj4af4f9wl6108yg8cav.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffj4af4f9wl6108yg8cav.png" alt="Representation of Function Scope in Javascript" width="800" height="293"&gt;&lt;/a&gt;&lt;br&gt;
and the space which is outside of both Function-scope and scope (Just a curly-brace set Shown in first image), is the Global Scope 👇🏻&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwnpsnlidxjbjemim8fx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwnpsnlidxjbjemim8fx.png" alt="Representation of Global Scope in Javascript" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that's a short and sweet overview of the SCOPE.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
