From eab9b560a6c81f14c258c864a9db1231165789a9 Mon Sep 17 00:00:00 2001 From: Shriyansh Agnihotri Date: Tue, 4 Feb 2025 12:03:42 +0530 Subject: [PATCH] fixing run script for command --- .env-example | 2 -- tests/test_features/productSearch/productSearch.feature | 2 +- testzeus_hercules/__main__.py | 6 ++++-- testzeus_hercules/core/tools/get_input_fields.py | 2 +- testzeus_hercules/core/tools/get_interactive_elements.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env-example b/.env-example index e5b5745..8b5a5e9 100644 --- a/.env-example +++ b/.env-example @@ -1,11 +1,9 @@ LLM_MODEL_NAME=PUT YOUR MODEL NAME HERE, for example: gpt-4o, gpt-4o LLM_MODEL_API_KEY=PUT YOUR MODEL API KEY HERE -# LLM_MODEL_BASE_URL=IF YOU ARE USING OpenAI, remove this line, otherwise add the base URL, for example: https://api.groq.com/openai/v1 # If you want to use json file for config (see sample agents_llm_config.json and the Readme) # AGENTS_LLM_CONFIG_FILE=agents_llm_config.json # AGENTS_LLM_CONFIG_FILE_REF_KEY=The key for the config stanza to use from the file -# PROJECT_SOURCE_ROOT=folder where to save data. # optional # CDP_ENDPOINT_URL=ws://localhost:9222/devtools/browser/b12de40a-fc1c-4ebb-81d9-046e901f376d diff --git a/tests/test_features/productSearch/productSearch.feature b/tests/test_features/productSearch/productSearch.feature index 82dd259..bbeb508 100644 --- a/tests/test_features/productSearch/productSearch.feature +++ b/tests/test_features/productSearch/productSearch.feature @@ -6,5 +6,5 @@ Feature: Check search and filtering on the Wrangler website Given a user is on the URL as https://wrangler.in When the user clicks on Search icon And on the search bar, the user enters text as "Rainbow jacket" - And the user selects "Turtle neck" as the filter + And the user filters "Turtle neck" Then only one product should be displayed as the result \ No newline at end of file diff --git a/testzeus_hercules/__main__.py b/testzeus_hercules/__main__.py index 5832206..79fa7f7 100644 --- a/testzeus_hercules/__main__.py +++ b/testzeus_hercules/__main__.py @@ -159,7 +159,7 @@ async def process_test_directory(test_dir: str) -> None: await sequential_process() -async def main() -> None: +async def a_main() -> None: """ Main function that checks for bulk execution flag and runs tests accordingly """ @@ -251,6 +251,8 @@ def is_width_gt_120() -> bool: logger.info("Single test execution mode") await sequential_process() +def main() -> None: + asyncio.run(a_main()) if __name__ == "__main__": # pragma: no cover - asyncio.run(main()) + main() diff --git a/testzeus_hercules/core/tools/get_input_fields.py b/testzeus_hercules/core/tools/get_input_fields.py index d6171ed..5377b8e 100644 --- a/testzeus_hercules/core/tools/get_input_fields.py +++ b/testzeus_hercules/core/tools/get_input_fields.py @@ -18,7 +18,7 @@ @tool( agent_names=["browser_nav_agent"], - description="""DOM Type dict Retrieval Tool, giving all input elements on page. + description="""DOM Type dict Retrieval Tool, giving only html input types elements on page. Notes: [Elements ordered as displayed, Consider ordinal/numbered item positions]""", name="get_input_fields", ) diff --git a/testzeus_hercules/core/tools/get_interactive_elements.py b/testzeus_hercules/core/tools/get_interactive_elements.py index 358d2ec..1ea223f 100644 --- a/testzeus_hercules/core/tools/get_interactive_elements.py +++ b/testzeus_hercules/core/tools/get_interactive_elements.py @@ -19,7 +19,7 @@ @tool( agent_names=["browser_nav_agent"], description="""DOM Type dict Retrieval Tool, giving all interactive elements on page. -Notes: [Elements ordered as displayed, Consider ordinal/numbered item positions]""", +Notes: [Elements ordered as displayed, Consider ordinal/numbered item positions, List ordinal represent z-index on page]""", name="get_interactive_elements", ) async def get_interactive_elements() -> Annotated[str, "DOM type dict giving all interactive elements on page"]: