我喜欢使用精彩的 网络驱动器 包。但是有一件事有点奇怪,那就是Firefox浏览器类型不支持命令行选项,谁能帮助我如何用命令行选项运行firefox无头模式呢,我猜测我可以使用firefox profile,但是经过大量的谷歌搜索,我找不到与firefox profile链接的无头模式。
data Browser = Firefox { -- |The firefox profile to use. If Nothing,
-- a default temporary profile is automatically created
-- and used.
ffProfile :: Maybe (PreparedProfile Firefox)
-- |Firefox logging preference
, ffLogPref :: LogLevel
-- |Server-side path to Firefox binary. If Nothing,
-- use a sensible system-based default.
, ffBinary :: Maybe FilePath
-- |Available after Firefox 52, and required only for Firefox
-- geckodriver. Indicates whether untrusted and self-signed TLS
-- certificates are implicitly trusted on navigation for the
-- duration of the session.
, ffAcceptInsecureCerts :: Maybe Bool
}
| Chrome { -- |Version of the Chrome Webdriver server server to use
--
-- for more information on chromedriver see
-- <https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver>
chromeDriverVersion :: Maybe String
-- |Server-side path to Chrome binary. If Nothing,
-- use a sensible system-based default.
, chromeBinary :: Maybe FilePath
-- |A list of command-line options to pass to the
-- Chrome binary.
, chromeOptions :: [String]
-- |A list of extensions to use.
, chromeExtensions :: [ChromeExtension]
-- | Experimental options not yet exposed through a standard API.
, chromeExperimentalOptions :: Object
}