Questions tagged «firefox-headless»

5
如何使用python在Selenium中以编程方式使Firefox无头?
我正在使用python,selenium和firefox运行此代码,但仍获得firefox的“ head”版本: binary = FirefoxBinary('C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe', log_file=sys.stdout) binary.add_command_line_options('-headless') self.driver = webdriver.Firefox(firefox_binary=binary) 我还尝试了一些二进制的变体: binary = FirefoxBinary('C:\\Program Files\\Nightly\\firefox.exe', log_file=sys.stdout) binary.add_command_line_options("--headless")
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.