Selenium close_fds

时间:2018-01-19 02:09:49

标签: selenium python-3.6

您好我正在尝试运行下面的python脚本

from selenium import webdriver

driver=webdriver.Chrome('C:\\Users\\Julian\\Downloads\\chromedriver_win32\\chromedriver.exe')

driver.get('https://www.youtube.com')

运行它后,我被带到一个名为service.py的文件,并指向以下

:Exceptions:
 - WebDriverException : Raised either when it can't start the service
   or when it can't connect to the service
"""
try:
    cmd = [self.path]
    cmd.extend(self.command_line_args())
    self.process = subprocess.Popen(cmd, env=self.env,d 
                                    close_fds=(platform.system() != 'Windows'),
                                    stdout=self.log_file,
                                    stderr=self.log_file,
                                    stdin=PIPE)

突出显示的特定行

                                    close_fds=(platform.system() != 'Windows'),

有人能指出我应该做的或改变的方向吗?任何帮助都非常感谢!

1 个答案:

答案 0 :(得分:0)

我只需删除d。必须偶然打字。