> For the complete documentation index, see [llms.txt](https://testingvn.gitbook.io/playwright/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://testingvn.gitbook.io/playwright/implement-test-cases/frame.md).

# Frame

```typescript
import {test, expect} from '@playwright/test';

test('verify nested frames content', async ({page}) => {   
    await page.goto('/nested_frames');
    const topFrame = page.frameLocator("[name='frame-top']");

    const leftFrameBody = topFrame?.frameLocator("[name='frame-left']")?.locator('body');
    await expect(leftFrameBody).toHaveText('LEFT');

    const middleFrameBody = topFrame?.frameLocator("[name='frame-middle']")?.locator('body');
    await expect(middleFrameBody).toHaveText('MIDDLE');

    const rightFrameBody = topFrame?.frameLocator("[name='frame-right']")?.locator('body');
    await expect(rightFrameBody).toHaveText('RIGHT');

    const bottomFrameBody = page.frameLocator("[name='frame-bottom']")?.locator('body');
    await expect(bottomFrameBody).toHaveText('BOTTOM');
})

```
