From 1fb171ebb4556af7347fc073ccdde23769787326 Mon Sep 17 00:00:00 2001 From: Nasif Date: Thu, 25 Jun 2026 17:49:56 +0600 Subject: [PATCH 1/2] Add check for `ai_plugin` setting before calling `send_dom_variables` --- Framework/MainDriverApi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Framework/MainDriverApi.py b/Framework/MainDriverApi.py index 8e5a2a9f..7e908196 100644 --- a/Framework/MainDriverApi.py +++ b/Framework/MainDriverApi.py @@ -1171,7 +1171,8 @@ def run_test_case( pass if CommonUtil.debug_status: - send_dom_variables() + if ConfigModule.get_config_value("Inspector", "ai_plugin").strip().lower() in CommonUtil.affirmative_words: + send_dom_variables() else: CommonUtil.Join_Thread_and_Return_Result("screenshot") if _auto_teardown_after_test_case(): From 617465d52e1ccc4e9a5bcff3c8a8f90f4e942095 Mon Sep 17 00:00:00 2001 From: Nasif Date: Thu, 25 Jun 2026 18:23:23 +0600 Subject: [PATCH 2/2] Change `getattr` to `getattr_static` - prevents executing code during attribute access - because in the case of `WebDriver` or `WebElement` objects, it could execute browser actions like scrolling --- Framework/MainDriverApi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Framework/MainDriverApi.py b/Framework/MainDriverApi.py index 7e908196..e1e194ae 100644 --- a/Framework/MainDriverApi.py +++ b/Framework/MainDriverApi.py @@ -1252,7 +1252,7 @@ def send_dom_variables(): if attr_name.startswith('__'): continue try: - attr_value = getattr(var_value, attr_name) + attr_value = inspect.getattr_static(var_value, attr_name) dir_[attr_name] = str(type(attr_value)) except Exception: # ignore getattr errors pass