support 1.x automation env var in tauri-driver (#10738)

* support 1.x and 2.x automation env var

* changefile
This commit is contained in:
chip 2024-08-22 14:29:10 +02:00 committed by GitHub
parent f4d5241b37
commit 5f64ed2b78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-driver": patch:bug
---
support both 1.x and 2.x automation env vars in `tauri-driver`

View File

@ -45,7 +45,8 @@ pub fn native(args: &Args) -> Command {
};
let mut cmd = Command::new(native_binary);
cmd.env("TAURI_WEBVIEW_AUTOMATION", "true");
cmd.env("TAURI_AUTOMATION", "true"); // 1.x
cmd.env("TAURI_WEBVIEW_AUTOMATION", "true"); // 2.x
cmd.arg(format!("--port={}", args.native_port));
cmd.arg(format!("--host={}", args.native_host));
cmd