alex-ber / selenium-support

BSD 2-Clause "Simplified" License
1 stars 0 forks source link

seleniumsuppport.SeleniumWebDriver doesn't support capability parameters #1

Open alex-ber opened 3 years ago

alex-ber commented 3 years ago

seleniumsuuport.SeleniumWebDriver is contex-manager that returns web_driver. In order to create one, different parameters may be supplied. It does support using Option class (even it supports Google Chome's experimental feature), but it lacks support for DesiredCapabilities.

For example, If want to works with self signed certificates in Mozilla Firefox I should write something like this (from http://allselenium.info/selfsigned-certificates-python-selenium/):

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

desired_capabilities = DesiredCapabilities.FIREFOX.copy()
desired_capabilities['acceptInsecureCerts'] = True

driver = webdriver.Firefox(capabilities=desired_capabilities)
driver.get('https://url')
print(driver.title)
driver.close()

but I can't passed capabilities to Web Driver.

alex-ber commented 3 years ago

I have created this issues mainly for documentation purposes, but maybe somebody will want to fix this.