diff --git a/lib/driver.js b/lib/driver.js
index <HASH>..<HASH> 100644
--- a/lib/driver.js
+++ b/lib/driver.js
@@ -263,7 +263,7 @@ class XCUITestDriver extends BaseDriver {
     this.jwpProxyActive = false;
     this.proxyReqRes = null;
 
-    if (this.wda) {
+    if (this.wda && this.wda.jwproxy) {
       await this.proxyCommand(`/session/${this.sessionId}`, 'DELETE');
       await this.wda.quit();
     }
Make sure wda proxy is there when we delete session