From ae03c0ea9a2eb8c96eebf98926dcad4507d081cd Mon Sep 17 00:00:00 2001 From: Bogay Date: Wed, 1 Jan 2025 21:25:54 +0800 Subject: [PATCH] fix(client): new_with_connector: correctly setup session `Session::with_capabilities_and_connector` would issue a new session, so we should call it in the constructor. --- src/client.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client.rs b/src/client.rs index 8e4f452..e1352f2 100644 --- a/src/client.rs +++ b/src/client.rs @@ -67,8 +67,7 @@ impl Client { where C: connect::Connect + Unpin + 'static + Clone + Send + Sync, { - let (client, wdb) = Session::create_client_and_parse_url(webdriver, connector).await?; - Session::setup_session(client, wdb, None).await + Session::with_capabilities_and_connector(webdriver, &Default::default(), connector).await } /// Reconnect to a previously established WebDriver session using its ID.