你好,我收到这个错误,
Traceback (most recent call last):
File "C:UsersGebruikerDesktopemail-account-generator-masterEmailAccountGenerator.py", line 40, in <module>
driver = webdriver.Remote(service.service_url, capabilities);
File "C:UsersGebruikerAppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremotewebdriver.py", line 139, in __init__
raise WebDriverException("Desired Capabilities must be a dictionary")
selenium.common.exceptions.WebDriverException: Message: Desired Capabilities must be a dictionary
我的代码问题可能:
service = service.Service(r'C:UsersGebruikerDesktopemail-account-generator-masterchromedriver.exe');
service.start()
capabilities = {'C:Program Files (x86)GoogleChromeApplicationchrome.exe',}
driver = webdriver.Remote(service.service_url, capabilities);
>>> type({'a'})
<class 'set'>
>>> type({'a':'b'})
<class 'dict'>
{'C:Program Files (x86)GoogleChromeApplicationchrome.exe',}
是集合而不是字典