Recall & Review
beginner
What is Selenium used for in software testing?
Selenium is a tool used to automate web browsers. It helps testers check if websites work correctly by simulating user actions like clicking buttons or filling forms.
Click to reveal answer
beginner
What is the first step in writing a Selenium script in Python?
The first step is to import the Selenium WebDriver module and set up the browser driver, like ChromeDriver, to control the browser.Click to reveal answer
beginner
How do you open a website using Selenium in Python?
You use the 'get' method of the WebDriver instance with the website URL as the argument, for example: driver.get('https://example.com').
Click to reveal answer
beginner
Why is it important to close the browser at the end of a Selenium script?
Closing the browser frees up system resources and ensures the test ends cleanly. You do this with driver.quit() or driver.close().
Click to reveal answer
beginner
What is a locator in Selenium?
A locator is a way to find elements on a web page, like buttons or text boxes. Common locators include ID, name, class name, and XPath.Click to reveal answer
Which Python package do you import to use Selenium WebDriver?
✗ Incorrect
The correct package to import for Selenium WebDriver in Python is selenium.webdriver.
What method opens a webpage in Selenium WebDriver?
✗ Incorrect
The get() method is used to open a webpage by passing the URL.
Which command closes all browser windows and ends the WebDriver session?
✗ Incorrect
driver.quit() closes all browser windows and ends the session cleanly.
Which locator is the most reliable to find a web element?
✗ Incorrect
ID is usually unique and the most reliable locator to find elements.
What do you need to run Selenium scripts on Chrome browser?
✗ Incorrect
ChromeDriver is required to control the Chrome browser with Selenium.
Describe the basic steps to write and run your first Selenium script in Python.
Think about what you need to start, do, and finish a test.
You got /5 concepts.
Explain why locators are important in Selenium and name some common types.
Imagine trying to click a button without knowing where it is.
You got /3 concepts.