From 4ffd760cb6339588c2e39b8705c778c3495b3563 Mon Sep 17 00:00:00 2001 From: Matthias BRUNEL Date: Thu, 29 Aug 2024 17:14:58 +0200 Subject: [PATCH] destroy in right function --- lavague-core/lavague/core/evaluator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lavague-core/lavague/core/evaluator.py b/lavague-core/lavague/core/evaluator.py index fb06df0e..24de2fdb 100644 --- a/lavague-core/lavague/core/evaluator.py +++ b/lavague-core/lavague/core/evaluator.py @@ -138,6 +138,8 @@ def evaluate( print("ERROR: ", i) traceback.print_exc() nodes = [] + if driver: + driver.destroy() nodes = "\n".join(nodes) results.at[i, "result_nodes"] = nodes results.at[i, "recall"] = ( @@ -208,8 +210,6 @@ def evaluate( print("ERROR: ", i) traceback.print_exc() test_action = FAIL_ACTION - if driver: - driver.destroy() results.at[i, "correct_action"] = action["name"] == test_action["name"] results.at[i, "correct_xpath"] = ( normalize_xpath(action["args"]["xpath"])