I'm attempting to input test credit card info into Braintree hosted payment fields.
Each input field is its own iframe so I'm doing the following.
await t.switchToIframe(selector);
await t.typeText(selector, num);
example of Braintree hosted fields
https://developers.braintreepayments.com/guides/hosted-fields/overview/javascript/v2
The input field is clicked but text is not typed in
Get this error in the console

After switching iFrames
should be able to type text into the input field
Hello @Jayele1 ,
Thank you for the information. I have reproduced the issue in the following test:
import { Selector } from 'testcafe';
fixture `New Fixture`
.page `https://developers.braintreepayments.com/guides/hosted-fields/overview/javascript/v2`;
test('New Test', async t => {
await t
.switchToIframe(Selector('[title="Codepen example of a Hosted Fields integration"]'))
.switchToIframe(Selector('#result-iframe'))
.switchToIframe(Selector('#braintree-hosted-field-number'))
.click(Selector('#credit-card-number'))
.typeText(Selector('#credit-card-number'), '12345')
.expect(Selector('#credit-card-number').value).eql('12345');
});
We will research it and update this thread as soon as we have any news.
Thank you!
Is this a duplicate of DevExpress/testcafe#4793 ?
@rob4629
This issue looks very similar to DevExpress/testcafe#4793. We need to research it thoroughly to say whether it is a duplicate of DevExpress/testcafe#4793.
@rob4629 @Jayele1
I researched this issue and found that it is not related to DevExpress/testcafe#4793. The cause of the issue is very similar to https://github.com/DevExpress/testcafe-hammerhead/issues/2012. However, we still need to do some research. I'll move this issue to the testcafe-hammerhead repository.
@Jayele1, you mentioned that you cannot type text into the input field. However, the problem is in codepen iframe. Did you try to use braintree input fields in your project without codepen? Are there any problems?
UPD.
When I reproduced this issue, I got the iframe did not load content error but not the blocked a frame with origin error. However, I checked DevExpress/testcafe#4793 on Safari one more time and got the blocked a frame with origin error. So these issues still can be related.
Hi @AlexKamaev, yes where I am seeing the error is a project without codepen. Also I ran the same test on chrome instead of safari and it was able to work for me. So this looks like a safari specific issue like you found here DevExpress/testcafe#4793 Thanks for your help!