assert_
glossary ↓ downloads
track: java · selenium
suite 04 · suite test

Suite test: First Selenium framework

7 questionsevery test must pass to merge

This is the suite's regression gate. Answer every question, then run the suite. Wrong answers show an explanation — read it, then re-run. In this course, like on a real team, you don't merge on a red build.

01.Forgetting driver.quit() causes…
Every ChromeDriver() starts a real process. Suite 05's @AfterEach guarantees cleanup even when tests fail.
02.NoSuchElementException appears. Your first debugging move?
It's an Error (suspect the test). The exception prints the locator it tried — verify it against the live page before touching Java.
03.What's wrong with Thread.sleep(5000) as a waiting strategy?
Fixed waits treat the symptom: 200 tests × 5s = 16 wasted minutes per run, and a slow day still breaks it.
04.wait.until(ExpectedConditions.visibilityOfElementLocated(by)) proceeds…
It polls every half-second: fast when the app is fast, patient when it's slow. That's the flakiness cure.
05.In modern Selenium, browser drivers (chromedriver etc.) are…
If Chrome is installed, new ChromeDriver() just works — Selenium Manager fetches the matching driver behind the scenes.
06.In a clean Page Object Model, assertions belong…
A page that asserts is unreusable. getErrorMessage() reports; assertTrue(…) judges — in the test.
07.To read what a user has typed into an input field, use…
getText() reads visible text between tags — inputs keep their content in the value attribute instead.
passing marks this suite test complete on the roadmap · revision aid: the suite cheatsheet
← The Page Object Model Test frameworks & structure →