from selenium import webdriver


def driver_de_head():
    # driver = webdriver.Chrome('/usr/bin/chromedriver')
    # driver = webdriver.Chrome()
    # driver = webdriver.Chrome(executable_path=r'C:/webdrivers/chromedriver.exe')
    driver = webdriver.Chrome()
    return driver


def driver_de_headless():
    options = webdriver.ChromeOptions()
    options.add_argument('--headless')
    options.add_argument('--no-sandbox')
    options.add_argument("start-maximized")
    options.add_argument("disable-infobars")
    options.add_argument("--disable-extensions")
    # driver = webdriver.Chrome(chrome_options=options)
    # driver = webdriver.Chrome(executable_path='/home/speed4you/chromedriver', chrome_options=options,
    driver = webdriver.Chrome(executable_path='c:/webdriver/', chrome_options=options,
                                              service_args=['--verbose', '--log-path=/tmp/chromedriver.log'])
    return driver
