jeudi 5 mars 2020

Salesforce's iframes

In order to support new lightning of salesforce, I'm trying to rewrite existing e2e tests. We have an integrated app, which opens in inframe in both cases (classic design and new lighting). In the case of old site design, we have to dig into the second level of nesting

<iframe ...>
   ...
   <iframe id='my app'>

In the case of the newest design, yet another one level of nesting was added (my iframe is also in the deep). I'm facing the problem, that I'm not able to switch to the second iframe. I always get "The iframe in which the test is currently operating does not exist anymore." Even if I want to await the simplest Selector with "div" element for example.

await t.expect(Selector('div').find('iframe').exists).eql(true);
await t.switchToIframe(Selector('div').find('iframe'));
const nextIframe = Selector('div');
const dom = await nextIframe(); <--- here it throws

I've checked the the first one selector, it returns exactly what I want.

What can cause my problem?

Aucun commentaire:

Enregistrer un commentaire