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
MyDriver does not accept custom profile #16
Comments
Hi, could you please tell me what do you mean by a custom profile? |
Hi, The use case is: to disable download dialog for certain type of downloaded file. In order to do that, selenium allows customization of browser profile, such as: profile = webdriver.FirefoxProfile() then self.driver = driver(profile) helps I verified above hack and they worked. If you could help expose that parameter to settings elegantly as you did for other parameters, that'd very helpful. Br, |
Hi simo, At the moment your use-case looks too specific to me, and subclassing seems to be an adequate solution. |
class MyDriver(object):
def init(self):
driver = getattr(webdriver, settings.SELENIUM_DRIVER, None)
assert driver, "settings.SELENIUM_DRIVER contains non-existing driver"
if driver is webdriver.Remote:
....
else:
self.driver = driver() <- there is no way to pass custom profile to local selenium instance.!!!! <_<
The text was updated successfully, but these errors were encountered: