Skip to content

Commit d02e3ee

Browse files
authored
Update fillCreditCard selector to use __privateStripeFrame preffix (#3854)
1 parent 6a91f17 commit d02e3ee

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/e2e/utils/payments.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,21 @@ export async function fillCreditCardDetailsShortcode( page, card ) {
128128
*/
129129
export async function fillCreditCardDetailsLegacy( page, card ) {
130130
await page
131-
.frameLocator( '#wc-stripe-card-number-element iframe' )
131+
.frameLocator(
132+
'#wc-stripe-card-number-element iframe[name^="__privateStripeFrame"]'
133+
)
132134
.locator( 'input[name="cardnumber"]' )
133135
.fill( card.number );
134136
await page
135-
.frameLocator( '#wc-stripe-card-expiry-element iframe' )
137+
.frameLocator(
138+
'#wc-stripe-card-expiry-element iframe[name^="__privateStripeFrame"]'
139+
)
136140
.locator( 'input[name="exp-date"]' )
137141
.fill( card.expires.month + card.expires.year );
138142
await page
139-
.frameLocator( '#wc-stripe-card-code-element iframe' )
143+
.frameLocator(
144+
'#wc-stripe-card-code-element iframe[name^="__privateStripeFrame"]'
145+
)
140146
.locator( 'input[name="cvc"]' )
141147
.fill( card.cvc );
142148
}

0 commit comments

Comments
 (0)