You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
457 B

from seleniumrequests import Firefox
from selenium.webdriver.firefox.options import Options
def new_browser(headless=True):
options = Options()
options.add_argument("--window-size=1920,1080")
if headless:
options.headless = True
# options.add_argument('--headless')
browser = Firefox(options=options, executable_path='/usr/local/bin/geckodriver')
else:
browser = Firefox(options=options)
return browser