Recall & Review
beginner
What is the purpose of ChromeDriver in Selenium testing?
ChromeDriver is a tool that allows Selenium to control the Google Chrome browser for automated testing. It acts as a bridge between Selenium scripts and the Chrome browser.
Click to reveal answer
beginner
How do you set up GeckoDriver for Firefox in Selenium with Python?
Download the GeckoDriver executable, place it in a known folder, and specify its path in your Selenium script using: <br><code>from selenium.webdriver.firefox.service import Service<br>from selenium import webdriver<br>driver = webdriver.Firefox(service=Service(executable_path='path/to/geckodriver'))</code>Click to reveal answer
intermediate
Why is it important to match the WebDriver version with the browser version?
Because WebDriver controls the browser, if their versions don't match, commands may fail or behave unexpectedly. Matching versions ensures smooth communication and reliable test execution.
Click to reveal answer
intermediate
What is the role of the PATH environment variable in WebDriver setup?
Adding the WebDriver executable (like chromedriver.exe) to the PATH lets Selenium find it automatically without specifying the full path in code, making setup easier and cleaner.
Click to reveal answer
beginner
Show a simple Python code snippet to start Chrome browser using ChromeDriver in Selenium.
from selenium import webdriver
# Assuming chromedriver is in PATH
driver = webdriver.Chrome()
driver.get('https://example.com')
driver.quit()
This opens Chrome, goes to example.com, then closes the browser.Click to reveal answer
What must you do before using ChromeDriver in Selenium tests?
✗ Incorrect
You need to download ChromeDriver and make sure its version matches your Chrome browser for Selenium to control it properly.
Which WebDriver is used to automate Firefox browser?
✗ Incorrect
GeckoDriver is the WebDriver used to automate Firefox browser.
How can Selenium find the WebDriver executable without specifying its full path in code?
✗ Incorrect
Adding the WebDriver executable to the PATH environment variable allows Selenium to find it automatically.
What happens if the WebDriver version does not match the browser version?
✗ Incorrect
Mismatch between WebDriver and browser versions can cause Selenium commands to fail or behave incorrectly.
Which Python import is needed to use WebDriver for Chrome?
✗ Incorrect
You import webdriver from selenium to use ChromeDriver in Python.
Explain the steps to set up ChromeDriver for Selenium testing in Python.
Think about downloading, version matching, environment setup, and code usage.
You got /5 concepts.
Why is it important to keep WebDriver and browser versions compatible?
Consider how communication between WebDriver and browser works.
You got /4 concepts.