Frames, windows, pop-ups and uploads in UI checks
Reach content that lives in a frame, a new window, a pop-up or a hidden inner tree, upload a file and keep a picture when a check fails.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a building with locked inner rooms. The main hall has a sign on the wall. Behind a door is a small room with its own sign. From the hall you cannot read the sign in the small room. You must walk in first.
Daily List is a to-do list app. Its upgrade page shows a card form that comes from a payment partner. The form sits in a small room inside the page, called a frame. Tom's check looks for the card box and finds nothing.
The box is there. The check is standing in the hall. It must step into the room first, and step back out when it is done.
The terms page opens in a new window. The check must switch to that window too, and then come back.
The picture has limits. In a building you see the doors. On a page the frame can be invisible, so you learn to ask: could this content live in another room?
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Knowing which room the check is standing in, and stepping in or out before it looks.
- Ask where the content lives
- Step into the room
- Do the work
- Step back out
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The main hall | The outer page |
| A locked inner room | A frame or a shadow tree |
| A different building | A new window |
| Walking in and back out | Switching context and returning |
WHERE THIS PICTURE STOPS
- In a building you see the doors. A frame may be invisible.
- A building has one hall. A page can have rooms inside rooms.
- You can ask someone for the key. A closed shadow tree has none.
HOOK
Which room am I in?
REMEMBER IT THIS WAY
A sequence: the real steps, in order.
When a box cannot be found, ask if it sits in a frame or a new window. Step in, do the work, step back out.
| In the trick | What it stands for |
|---|---|
| Step in | Switching context |
| Do the work | A frame or a shadow tree |
| Step out | Switch to that window too, and then come back |
TELL A FRIEND
A sign in an inner room cannot be read from the hall. must or window before it can read what is there.
OFTEN MIXED UP WITH Waits and timing in automated checks. The waits lesson makes sure content is ready. This lesson makes sure the check is looking in the right place.
PRACTISE AND KEEP
Sources for this topic — 7 sources
- Market practice
Working with IFrames and frames (Selenium documentation) ↗ — Selenium · Switch into a frame by element, name or index, and return to the top level with default content (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Working with windows and tabs (Selenium documentation) ↗ — Selenium · Wait for a second window, switch to the handle that is not the original, and switch back (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
JavaScript alerts, prompts and confirmations (Selenium documentation) ↗ — Selenium · Switch to an alert and accept or dismiss it; type into a prompt (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
File Upload (Selenium documentation) ↗ — Selenium · Selenium cannot drive the operating system file dialog, so send the full file path to an input of type file (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Using the shadow Document Object Model (DOM) (Mozilla developer docs) ↗ — Mozilla · A shadow root can be open or closed; closed hides it from the shadowRoot lookup; this is encapsulation, not protection (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
The iframe element (Mozilla developer docs, HTML reference) ↗ — Mozilla (developer documentation) · The iframe element embeds another document inside the current page (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Actions API (Selenium documentation) ↗ — Selenium · Move to element performs a hover; drag and drop is click and hold, move, release (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.