Saurav Pattnaik
Saurav Pattnaik

Reputation: 11

Blocked a frame with origin from accessing a cross origin frame in ios safari-appium java

For our web portal, we are getting the below error, when automating entering payment details in web page for ios safari, Blocked a frame with origin from accessing a cross origin frame.

Our portal is using adyen payment vendor for entering card details and making payment. We are able to automate entering payment details in android chrome devices but only for iphone safari we are getting this error. I searched it from internet and found our safari is going to block frame for cross origin due to security restrictions. As our web portal domain and this iframe domain(https://ayden.test.com) are different driver.switchto().frame() is failing with this exception. Is there solutions for it?

We tried with native context but we are not able to inspect these card fields neither in appium inspector nor from pagesource. Not sure, why we are unable to inspect these particular elements in native context. All the other fields in the web page are accessible in native context. So, currently we don't have any solution for it for ios safari

Note: It is only happening in ios safari. In android chrome, we are able to switch to this iframe using normal driver.switchTo().iframe() as for chrome there is CORS restriction

enter image description here

Upvotes: 1

Views: 588

Answers (1)

Kwok He
Kwok He

Reputation: 251

I'm making an educated guess here, let me know if it helped:

According to Adyen's documentation, you'll need to whitelist your domain for your client key in their Customer Area.

Adyen uses your client key to authenticate requests from your payment environment. For example, Web Drop-in and Web Component integrations need the client key to:

  • Render input fields to securely collect and encrypt card details.
  • Detect the card type from the number the shopper entered in the payment form.
  • Do server-side barcode or QR code rendering for payment methods such as Swish or Boleto Bancário.

Upvotes: 0

Related Questions