|
| 1 | +--- |
| 2 | +title: "Why Can’t Selenium ChromeDriver Interact With 3DS Authentication Pages?" |
| 3 | +metadesc: "Learn why Selenium hangs on 3DS payment pages and how a simple desired capability prevents ChromeDriver from waiting indefinitely." |
| 4 | +order: 24.20 |
| 5 | +page_id: "why-cant-selenium-chromedriver-interact-with-3ds-authentication-pages?" |
| 6 | +warning: false |
| 7 | +contextual_links: |
| 8 | +- type: section |
| 9 | + name: "Contents" |
| 10 | +- type: link |
| 11 | + name: "Steps to Add the Desired Capability to the Test Case" |
| 12 | + url: "#steps-to-add-the-desired-capability-to-the-test-case" |
| 13 | +--- |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +When you navigate to 3D Secure (3DS) authentication pages such as Visa or Mastercard, Selenium on Chrome or Edge may freeze or time out during execution. |
| 18 | + |
| 19 | +**Why This Happens** |
| 20 | + |
| 21 | +3DS authentication screens load a third-party iframe that runs continuous background scripts from the payment gateway. |
| 22 | + |
| 23 | +Inside these iframes: |
| 24 | + - Long-running JavaScript and postMessage listeners are always active. |
| 25 | + - Messages are continuously exchanged with the payment provider. |
| 26 | + - The browser keeps processing events and never reaches a fully loaded state. |
| 27 | + |
| 28 | +As a result: |
| 29 | + - ChromeDriver waits indefinitely for the page to finish loading |
| 30 | + - The pageLoad event never completes |
| 31 | + - Selenium becomes unresponsive after navigation |
| 32 | + |
| 33 | +To prevent Selenium from waiting indefinitely, you need to add a desired capability to your test case that stops ChromeDriver from waiting for the full page load. |
| 34 | + |
| 35 | +This article discusses how to add the desired capability to the test case. |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +## **Steps to Add the Desired Capability to the Test Case** |
| 40 | + |
| 41 | +1. From the left navigation bar, go to **Create Tests > Test Cases**. |
| 42 | +  |
| 43 | + |
| 44 | +2. In the Test Case Explorer section, expand a **Feature** and a **Scenario** and select the required test case. |
| 45 | +  |
| 46 | + |
| 47 | +3. In the Test Case Details page, click **Run**. |
| 48 | +  |
| 49 | + |
| 50 | +4. In the **Ad-Hoc Run** overlay, expand the **Desired Capabilities** section, enter the following: |
| 51 | + |
| 52 | + | **Key** | **Data Type** | **Value** | |
| 53 | + | ------------- | ------------- | ------------- | |
| 54 | + | pageLoadStrategy | String | none | |
| 55 | + |
| 56 | +  |
| 57 | + |
| 58 | +5. Click **Run Now**. |
| 59 | +  |
| 60 | + |
| 61 | +--- |
0 commit comments