diff --git a/test/e2e/webdriver/driver.js b/test/e2e/webdriver/driver.js index 28a9ac11503f..acc96d948e1f 100644 --- a/test/e2e/webdriver/driver.js +++ b/test/e2e/webdriver/driver.js @@ -416,7 +416,7 @@ class Driver { await fs.writeFile(`${filepathBase}-dom.html`, htmlSource); const uiState = await this.driver.executeScript( () => - window.stateHooks.getCleanAppState && + window.stateHooks?.getCleanAppState && window.stateHooks.getCleanAppState(), ); await fs.writeFile(