<s> from selenium import webdriver <EOL> from seleniumbase . fixtures import constants <EOL> def get_driver ( browser_name ) : <EOL> '''<STR_LIT>''' <EOL> if browser_name == constants . Browser . FIREFOX : <EOL> try : <EOL> profile = webdriver . FirefoxProfile ( ) <EOL> profile . set_preference ( "<STR_LIT>" , False ) <EOL> return webdriver . Firefox ( profile ) <EOL> except : <EOL> return webdriver . Firefox ( ) <EOL> if browser_name == constants . Browser . INTERNET_EXPLORER : <EOL> return webdriver . Ie ( ) <EOL> if browser_name == constants . Browser . PHANTOM_JS : <EOL> return webdriver . PhantomJS ( ) <EOL> if browser_name == constants . Browser . GOOGLE_CHROME : <EOL> try : <EOL> chrome_options = webdriver . ChromeOptions ( ) <EOL> chrome_options . add_argument ( "<STR_LIT>" ) <EOL> return webdriver . Chrome ( chrome_options = chrome_options ) <EOL> except Exception : <EOL> return webdriver . Chrome ( ) </s>
