🚀 SpeedwayTech Multiple Windows Practice

Practice Parent Window • Child Window • New Tab • Popup • Multiple Pages

🎯 Multiple Window Practice

In Playwright, every browser tab or window is represented by a Page object. Use this page to practice:

context.waitForEvent('page') page.waitForEvent('popup') context.pages() page.bringToFront() page.close() page.title() page.url()
Main Window Status: Active

1️⃣ Open External Websites in New Tabs

Playwright Window

Opens Playwright official website in a new tab.

TutorialsNinja Window

Opens TutorialsNinja demo application in a new tab.

No external window opened yet.

2️⃣ New Tab Using target="_blank"

This is a normal HTML link that opens another browser tab.

Open Playwright Using Link Open Example Website

3️⃣ SpeedwayTech Child Window

This button opens a completely new child window. The child window contains input fields, buttons and text that you can automate using Playwright.

Child Window Status: Not Opened

4️⃣ Popup Window Practice

This button opens a smaller popup window. You can capture it using:

const popupPromise = page.waitForEvent('popup'); await button.click(); const popup = await popupPromise;
Popup Status: Not Opened

5️⃣ Open Two Child Windows

Click the buttons below to open Child Window 1 and Child Window 2. This is useful for practicing:

context.pages() pages[0] pages[1] pages[2]
Multiple Window Status: Ready

6️⃣ Main Window Information

Window Information Will Appear Here

📝 Playwright Practice Tasks

  1. Open the main SpeedwayTech practice page.
  2. Click Open Playwright Window.
  3. Capture the newly opened Page object.
  4. Print the new page URL and title.
  5. Verify the URL contains playwright.dev.
  6. Close the new window.
  7. Open SpeedwayTech Child Window.
  8. Enter username inside the child window.
  9. Click Login.
  10. Verify the welcome message.
  11. Bring the parent window to front.
  12. Print the total number of pages using context.pages().