Skip to content
CodeKruPro

Match the pattern to the need

QuizMediumPython only

Which pairs of need and Python solution match? A factory is a function that decides which object to create. A page object is a class that stands for one web page. Pick all that apply.

  • Create Chrome or Firefox from a config value: a factory function such as create_driver(browser)
  • Load settings once for the whole run: a module-level object or a session-scoped fixture
  • Test users with many optional fields: a dataclass with defaults
  • Share one WebDriver between all xdist workers through a singleton
  • Keep locators and actions out of test functions: page objects

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in