Instantly share code, notes, and snippets.

@JakobTestScouts /.py Secret
Created Feb 27, 2018

Embed
What would you like to do?
my "script"
def browser_choice(browser):
if browser.lower() == "chrome":
chrome_options = Options()
chrome_options.add_argument("disable-extensions")
chrome_options.add_argument("disable-infobars")
#chrome_options.add_argument("test-type")
chrome_options.add_argument("ignore-certificate-errors")
chrome_options.add_argument('--no-sandbox')
display = Display(visible=0, size=(1920, 1080))
display.start()
capabilities = webdriver.DesiredCapabilities.CHROME
drivers = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver', chrome_options=chrome_options,
desired_capabilities=capabilities)
drivers.get("https://xxx.xxxxxxx.xxx")
return drivers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment