Selenium + Python ·
6. Pytest Fixtures for Driver Management
Prev
Next
Statement
Submissions
Solution
AI Help
6. Pytest Fixtures for Driver Management
Listen
Pytest Fixture with Yield
@pytest.fixture def browser(): driver = webdriver.Chrome() yield driver driver.quit()
Task
Complete the fixture: `yield driver` and call `driver.quit()`.
💡
Common doubts
Where do shared fixtures live?
Did you like the problem?
Lesson 6 of 8
Python
Reset
Copy
Loading code editor…
Submit
Next