Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add options argument for chrome driver #345

Conversation

StephenDavidson
Copy link

Allows user to add custom options to the chrome browser.

@andrewsmedina
Copy link
Member

@StephenDavidson thank you. Can you add a test?

@eggnita eggnita mentioned this pull request Apr 24, 2018
@neilsh
Copy link
Contributor

neilsh commented May 14, 2018

@andrewsmedina What would a test for this actually entail? It seems like this change is necessary for the existing tests to actually run properly.

@neilsh
Copy link
Contributor

neilsh commented May 14, 2018

I guess there's also the larger question of whether it's preferable to have a general chrome_options object, or pass in separate args for individual options like the current/conflicting code does:

def __init__(self, options=None, user_agent=None, wait_time=2,
fullscreen=False, incognito=False, headless=False, **kwargs):
options = Options() if options is None else options
if user_agent is not None:
options.add_argument("--user-agent=" + user_agent)
if incognito:
options.add_argument("--incognito")
if fullscreen:
options.add_argument('--kiosk')
if headless:
options.add_argument('--headless')
options.add_argument('--disable-gpu')

@andrewsmedina andrewsmedina added this to the 0.9 milestone May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants