Add persistent ChromeDriver support for faster WebDriver startup
When webdriver_start is called, now checks if chromedriver is already running on the configured port and reuses it instead of spawning a new process. This significantly reduces startup time for subsequent sessions. New config option: [webdriver] persistent_chrome = true # Keep chromedriver running between sessions When enabled, webdriver_quit closes the browser session but leaves chromedriver running for reuse by the next session.
This commit is contained in:
@@ -179,6 +179,10 @@ pub struct WebDriverConfig {
|
||||
pub chromedriver_binary: Option<String>,
|
||||
#[serde(default)]
|
||||
pub browser: WebDriverBrowser,
|
||||
#[serde(default)]
|
||||
/// Keep chromedriver running after session ends for faster subsequent startups
|
||||
/// When true, chromedriver process is not killed on webdriver_quit
|
||||
pub persistent_chrome: bool,
|
||||
}
|
||||
|
||||
impl Default for AgentConfig {
|
||||
|
||||
Reference in New Issue
Block a user