Repository: tauri
Issue: [bug] Tauri 1.4.0 selenium page crashes on Ubuntu
Labels: type: bug,scope: webdriver,status: needs triage

### Describe the bug

I followed the example here: https://tauri.app/v1/guides/testing/webdriver/example/selenium/#testing to create the selenium tests for my app on Ubuntu.
Everything was working well before upgrading my tauri from 1.3 to 1.4.
The error was in before hook when I build my selenium Webdriver:
```
before(async function () {
  // start tauri-driver
  tauriDriver = spawn(
    path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver'),
    [],
    { stdio: [null, process.stdout, process.stderr] }
  )

  const capabilities = new Capabilities()
  capabilities.set('tauri:options', { application })
  capabilities.setBrowserName('wry')

  // start the webdriver client
  driver = await new Builder()
    .withCapabilities(capabilities)
    .usingServer('http://127.0.0.1:4444/')
    .build()
})
```

The log trace showed:
```
[00:00:04.217] (7fe1da922d80) ERROR  thread 'main' panicked at 'called `Option::unwrap()` on a `None` value': /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/wry-0.24.3/src/webview/webkitgtk/mod.rs:391
```

### Reproduction

_No response_

### Expected behavior

There should be no error and panic.

### Platform and versions

```text
[✔] Environment
    - OS: Ubuntu 22.04 X64
    ✔ webkit2gtk-4.0: 2.40.4
    ✔ rsvg2: 2.52.5
    ✔ rustc: 1.69.0 (84c898d65 2023-04-16)
    ✔ Cargo: 1.69.0 (6e9a83356 2023-04-12)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.1.0
    - npm: 9.8.0

[-] Packages
    - tauri [RUST]: git+https://github.com/gmchale79/tauri?branch=feat/flexible_updater_reqs#4c84e6f6d270d9c9d38c0f52de0cc5ef72cfef3c (1.4.1)
    - tauri-build [RUST]: git+https://github.com/gmchale79/tauri?branch=feat/flexible_updater_reqs#4c84e6f6d270d9c9d38c0f52de0cc5ef72cfef3c (1.4.0)
    - wry [RUST]: 0.24.3
    - tao [RUST]: 0.16.2
    - @tauri-apps/api [NPM]: 1.3.0 (outdated, latest: 1.4.0)
    - @tauri-apps/cli [NPM]: 1.4.0

[-] App
    - build-type: bundle
    - CSP: img-src data:; font-src data:; default-src 'self'
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite
```


### Stack trace

```text
[00:00:09.299] (7f2dc8a1ad80) ERROR  thread 'main' panicked at 'called `Option::unwrap()` on a `None` value': /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/wry-0.24.3/src/webview/webkitgtk/mod.rs:391
   0: <backtrace::capture::Backtrace as core::default::Default>::default
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.68/src/capture.rs:410:9
   1: log_panics::Config::install_panic_hook::{{closure}}
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/log-panics-2.1.0/src/lib.rs:115:29
   2: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/alloc/src/boxed.rs:2001:9
      std::panicking::rust_panic_with_hook
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:696:13
   3: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:581:13
   4: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
   5: rust_begin_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
   6: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
   7: core::panicking::panic
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:114:5
   8: core::option::Option<T>::unwrap
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/option.rs:942:21
   9: wry::webview::webkitgtk::InnerWebView::url
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/wry-0.24.3/src/webview/webkitgtk/mod.rs:391:15
  10: wry::webview::WebView::url
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/wry-0.24.3/src/webview/mod.rs:729:5
  11: tauri_runtime_wry::handle_user_message
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri-runtime-wry/src/lib.rs:2446:25
  12: tauri_runtime_wry::send_user_message
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri-runtime-wry/src/lib.rs:170:5
  13: <tauri_runtime_wry::WryDispatcher<T> as tauri_runtime::Dispatch<T>>::url
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri-runtime-wry/src/lib.rs:1277:5
  14: tauri::window::Window<R>::url
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri/src/window.rs:1502:5
  15: tauri::window::Window<R>::on_message
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri/src/window.rs:1518:23
  16: tauri::manager::WindowManager<R>::prepare_ipc_handler::{{closure}}
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri/src/manager.rs:601:19
  17: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/alloc/src/boxed.rs:2001:9
  18: tauri_runtime_wry::create_ipc_handler::{{closure}}
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri-runtime-wry/src/lib.rs:3316:5
  19: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/alloc/src/boxed.rs:2001:9
  20: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/alloc/src/boxed.rs:2001:9
  21: wry::webview::webkitgtk::InnerWebView::new::{{closure}}
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/wry-0.24.3/src/webview/webkitgtk/mod.rs:94:11
  22: <O as webkit2gtk::auto::user_content_manager::UserContentManagerExt>::connect_script_message_received::script_message_received_trampoline
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/webkit2gtk-0.18.2/src/auto/user_content_manager.rs:299:7
  23: g_closure_invoke
  24: <unknown>
  25: g_signal_emit_valist
  26: g_signal_emit
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>
  31: <unknown>
  32: <unknown>
  33: <unknown>
  34: <unknown>
  35: <unknown>
  36: <unknown>
  37: <unknown>
  38: g_main_context_dispatch
  39: <unknown>
  40: g_main_context_iteration
  41: gtk_main_iteration_do
  42: gtk::auto::functions::main_iteration_do
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/gtk-0.15.5/src/auto/functions.rs:405:24
  43: tao::platform_impl::platform::event_loop::EventLoop<T>::run_return::{{closure}}
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/tao-0.16.2/src/platform_impl/linux/event_loop.rs:1060:11
  44: glib::main_context::<impl glib::auto::main_context::MainContext>::with_thread_default
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/glib-0.15.12/src/main_context.rs:156:12
  45: tao::platform_impl::platform::event_loop::EventLoop<T>::run_return
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/tao-0.16.2/src/platform_impl/linux/event_loop.rs:958:5
  46: tao::platform_impl::platform::event_loop::EventLoop<T>::run
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/tao-0.16.2/src/platform_impl/linux/event_loop.rs:912:21
  47: tao::event_loop::EventLoop<T>::run
             at /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/tao-0.16.2/src/event_loop.rs:179:5
  48: <tauri_runtime_wry::Wry<T> as tauri_runtime::Runtime<T>>::run
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri-runtime-wry/src/lib.rs:2255:5
  49: tauri::app::App<R>::run
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri/src/app.rs:875:5
  50: tauri::app::Builder<R>::run
             at /home/ubuntu/.cargo/git/checkouts/tauri-74f65ee698429ae3/4c84e6f/core/tauri/src/app.rs:1723:5

  52: core::ops::function::FnOnce::call_once
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:250:5
  53: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:134:18
  54: std::rt::lang_start::{{closure}}
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:166:18
  55: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:287:13
      std::panicking::try::do_call
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487:40
      std::panicking::try
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451:19
      std::panic::catch_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148:48
      std::panicking::try::do_call
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487:40
      std::panicking::try
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451:19
      std::panic::catch_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140:14
      std::rt::lang_start_internal
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148:20
  56: std::rt::lang_start
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:165:17
  57: main
  58: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  59: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:392:3
  60: _start
```


### Additional context

_No response_