Recall & Review
beginner
What is a Base Page Class in Selenium testing?A Base Page Class is a common parent class that holds shared methods and properties for all page classes. It helps avoid repeating code and makes tests easier to maintain.Click to reveal answer
beginner
Why do we use locators in the Base Page Class?
Locators find elements on a web page. In the Base Page Class, we store common locators or methods to find elements so all pages can reuse them safely and clearly.
Click to reveal answer
intermediate
Example method in Base Page Class: How to wait for an element to be visible?
Use WebDriverWait with expected_conditions. For example, a method like wait_for_element(locator) waits until the element is visible before continuing.
Click to reveal answer
intermediate
What is the benefit of having a Base Page Class when the website changes?When locators or common actions change, you update only the Base Page Class. This fixes all page classes that use it, saving time and reducing errors.
Click to reveal answer
beginner
How does the Base Page Class improve test readability?It groups common actions like clicking or typing into named methods. Tests read like simple instructions, making them easier to understand and follow.
Click to reveal answer
What is the main purpose of a Base Page Class in Selenium?
✗ Incorrect
The Base Page Class holds shared methods and locators to avoid repeating code across page classes.
Which Selenium feature is commonly used in Base Page Class to wait for elements?
✗ Incorrect
WebDriverWait with expected_conditions waits smartly for elements to appear, improving test reliability.
Where should you update locators if the website changes?
✗ Incorrect
Updating locators in the Base Page Class updates all page classes that use them, making maintenance easier.
Which of these is NOT a benefit of using a Base Page Class?
✗ Incorrect
The Base Page Class helps organize code but does not automatically fix broken tests.
What should a Base Page Class NOT contain?
✗ Incorrect
Assertions belong in test scripts, not in the Base Page Class which focuses on page actions and locators.
Explain what a Base Page Class is and why it is useful in Selenium testing.
Think about how to avoid repeating code for every page.
You got /4 concepts.
Describe how you would implement a method in the Base Page Class to wait for an element to be visible.
Focus on waiting smartly instead of using fixed delays.
You got /4 concepts.