Hauke T.
Hauke T.
> Switching to a frame by index? We could technically support it by e.g. just switch to the frame that matches the index of the list we get from Chromedriver...
> What do you think? Hi, that won't work, because the `index` is not the same as the `position` in the DOM. * by `index` I mean the result of...
Well, not necessarily flattened. ```ts describe('IFrames', () => { it('browsingContextGetTree', async () => { await browser.url(`https://htho.github.io/wdio-repro-iframes/`); await expect($("#B")).toExist(); const ctx = await browser.browsingContextGetTree({}); console.log(JSON.stringify(ctx, null, 4)); }); }); ``` This...
Based on browsingContextGetTree I found a solution: ```ts import { expect, browser } from '@wdio/globals' beforeEach(async () => { await browser.url(`https://htho.github.io/wdio-repro-iframes/`); }); // without this, the next test will load...
Well, the code/function is too complicated and too fragile to add it as a "workaround" to the *documentation*. (Where people would copy&paste it to their codebase.) It should be unit/e2e-tested,...
Of course, we could raise that issue, but I don't think they will consider it. For a recorder the index approach is good enough. After all a record repeats all...
I use `@jest/environment-jsdom-abstract` to implement inject a mocked `location` object into JSDOM. While it works without jest, it doesn't work in jest. Maybe you'll find this helpful: https://stackoverflow.com/questions/79784243/mock-jsdom-location-using-jest-environment-jsdom-abstract