@cached_property<EOL><INDENT>def driver(self):<DEDENT>
from dallinger.config import get_config<EOL>config = get_config()<EOL>if not config.ready:<EOL><INDENT>config.load()<EOL><DEDENT>driver_url = config.get("<STR_LIT>", None)<EOL>driver_type = config.get("<STR_LIT>")<EOL>driver = None<EOL>if driver_url:<EOL><INDENT>capabilities = CAPABILITY_MAP.get(driver_type.lower())<EOL>if capabilities is None:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(driver_type)<EOL>)<EOL><DEDENT>driver = webdriver.Remote(<EOL>desired_capabilities=capabilities, command_executor=driver_url<EOL>)<EOL><DEDENT>else:<EOL><INDENT>driver_class = DRIVER_MAP.get(driver_type.lower())<EOL>if driver_class is not None:<EOL><INDENT>driver = driver_class()<EOL><DEDENT><DEDENT>if driver is None:<EOL><INDENT>raise ValueError("<STR_LIT>".format(driver_type))<EOL><DEDENT>driver.set_window_size(<NUM_LIT>, <NUM_LIT>)<EOL>logger.info("<STR_LIT>".format(driver_type))<EOL>return driver<EOL>
Returns a Selenium WebDriver instance of the type requested in the
        configuration.