Handling WebElements

Multiple Tabs/Windows

Learning Outcome

5

Verify page titles, URLs, and content after switching.

4

Perform actions and validations across multiple pages.

3

Switch between parent and child tabs/windows.

2

Capture newly opened tabs/windows using context.waitForPage().

1

how Playwright handles multiple tabs &windows using Page objects

Topic Name-Recall(Slide3)

Hook/Story/Analogy(Slide 4)

Transition from Analogy to Technical Concept(Slide 5)

Core Concepts (Slide 6)

Core Concepts (Slide 7)

Core Concepts (.....Slide N-3)

Summary

5

Child pages can be closed after completing the task.

4

Testers can perform actions and validate page details.

3

It allows switching between parent and child pages.

2

It can capture newly opened tabs or windows.

1

Playwright Java handles multiple browser pages in one test.

Quiz

A test opens a child tab and you need to validate its URL. Which code is most appropriate?

A. page.url()

B. browser.url()

C. childPage.url()

D. context.url()

Quiz-Answer

A test opens a child tab and you need to validate its URL. Which code is most appropriate?

A. page.url()

B. browser.url()

C. childPage.url()

D. context.url()