Browse Source

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

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

* changefile
chip 11 months ago
parent
commit
5f64ed2b78
2 changed files with 7 additions and 1 deletions
  1. 5 0
      .changes/tauri-driver-1.x.md
  2. 2 1
      tooling/webdriver/src/webdriver.rs

+ 5 - 0
.changes/tauri-driver-1.x.md

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

+ 2 - 1
tooling/webdriver/src/webdriver.rs

@@ -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