fusiontest 0.2.43__tar.gz → 0.2.44__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. {fusiontest-0.2.43 → fusiontest-0.2.44}/PKG-INFO +1 -1
  2. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/action_model.py +21 -18
  3. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/PKG-INFO +1 -1
  4. {fusiontest-0.2.43 → fusiontest-0.2.44}/pyproject.toml +1 -1
  5. {fusiontest-0.2.43 → fusiontest-0.2.44}/README.md +0 -0
  6. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/__init__.py +0 -0
  7. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/__init__.py +0 -0
  8. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/sites/shop/bugs.js +0 -0
  9. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/sites/shop/help.html +0 -0
  10. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/sites/shop/index.html +0 -0
  11. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/suites/shop-bugs.yaml +0 -0
  12. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/suites/shop.yaml +0 -0
  13. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/bench/suites/todomvc.yaml +0 -0
  14. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/cli.py +0 -0
  15. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/__init__.py +0 -0
  16. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/app_errors.py +0 -0
  17. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/bugs.py +0 -0
  18. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/goal_verifier.py +0 -0
  19. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/netguard.py +0 -0
  20. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/promise_checker.py +0 -0
  21. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/replay.py +0 -0
  22. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/reproduce.py +0 -0
  23. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/runner.py +0 -0
  24. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/screen_parser.py +0 -0
  25. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/secrets.py +0 -0
  26. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/shared_traces.py +0 -0
  27. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/core/tokens.py +0 -0
  28. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/__init__.py +0 -0
  29. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/fusiontest_dashboard.yaml +0 -0
  30. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/github.yaml +0 -0
  31. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/hacker_news.yaml +0 -0
  32. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/httpbin.yaml +0 -0
  33. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/todomvc.yaml +0 -0
  34. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/demos/wikipedia.yaml +0 -0
  35. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/desktop/__init__.py +0 -0
  36. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/desktop/macos_adapter.py +0 -0
  37. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/desktop/playwright_adapter.py +0 -0
  38. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/desktop/windows_adapter.py +0 -0
  39. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/discovery/__init__.py +0 -0
  40. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/discovery/goal_generator.py +0 -0
  41. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/guardrails/__init__.py +0 -0
  42. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/guardrails/engine.py +0 -0
  43. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/mobile/__init__.py +0 -0
  44. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/mobile/android_adapter.py +0 -0
  45. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/mobile/ios_adapter.py +0 -0
  46. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/reporting/__init__.py +0 -0
  47. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/reporting/reporter.py +0 -0
  48. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/training/__init__.py +0 -0
  49. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/training/data_collector.py +0 -0
  50. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/training/dataset_builder.py +0 -0
  51. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest/training/trainer.py +0 -0
  52. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/SOURCES.txt +0 -0
  53. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/dependency_links.txt +0 -0
  54. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/entry_points.txt +0 -0
  55. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/not-zip-safe +0 -0
  56. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/requires.txt +0 -0
  57. {fusiontest-0.2.43 → fusiontest-0.2.44}/fusiontest.egg-info/top_level.txt +0 -0
  58. {fusiontest-0.2.43 → fusiontest-0.2.44}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fusiontest
3
- Version: 0.2.43
3
+ Version: 0.2.44
4
4
  Summary: AI-powered UI testing for mobile and desktop — by FusionLeap.io
5
5
  Author-email: FusionLeap <hello@fusionleap.io>
6
6
  License: MIT
@@ -298,6 +298,12 @@ _ACTION_ELEMENT_TAIL_CHARS = 40
298
298
  PROMPT_HISTORY_ACTIONS = 15
299
299
  _CONTENT_LINE_RE = re.compile(r'^\s*(\w+): "(.*)"$')
300
300
  _ELEMENT_LINE_RE = re.compile(r'^\s*\[\d+\] ')
301
+ # A bare list item ("[31] list_item") has no text to match a goal against and
302
+ # isn't a control: ~5% of the element list on fusionleap.io pages.
303
+ _BARE_LIST_ITEM_RE = re.compile(r'^\s*\[\d+\] list_item\s*$')
304
+ # Rules that only apply when the screen has such elements.
305
+ _HAS_TEXT_FIELD_RE = re.compile(r'^\s*\[\d+\] (text_field|text_area|search_field|textbox|searchbox|spinbutton)\b', re.M)
306
+ _HAS_PICKER_RE = re.compile(r'^\s*\[\d+\] picker\b| options: ', re.M)
301
307
 
302
308
 
303
309
  def compact_screen_for_action(screen_text: str) -> str:
@@ -317,6 +323,8 @@ def compact_screen_for_action(screen_text: str) -> str:
317
323
  lines.append(line)
318
324
  continue
319
325
  if not in_content:
326
+ if _BARE_LIST_ITEM_RE.match(line):
327
+ continue
320
328
  if (len(line) > _ACTION_ELEMENT_CHARS and _ELEMENT_LINE_RE.match(line)
321
329
  and " options: " not in line): # a picker's choices must stay visible
322
330
  head = _ACTION_ELEMENT_CHARS - _ACTION_ELEMENT_TAIL_CHARS
@@ -1064,25 +1072,20 @@ class ActionModel(LLMCaller):
1064
1072
  "",
1065
1073
  trimmed_screen,
1066
1074
  "",
1067
- "IMPORTANT RULES:",
1068
- "- If the goal is purely about VERIFYING or CHECKING that something is visible, and the relevant content IS already visible on screen, use action_type 'done' with a reasoning explaining what you see.",
1069
- "- If the goal cannot be satisfied with the current screen (wrong page, required control missing, blocker, etc.), use action_type 'fail' with a short reasoning. NEVER use 'done' for failure or 'not achievable' outcomes.",
1070
- "- If the goal requires navigation or interaction, use the appropriate action.",
1071
- "- Each action taken so far notes what it changed on screen (→ …). That is what you observed: once those notes show what the goal asks you to verify, use 'done' rather than repeating actions to check again.",
1072
- "- Match elements FLEXIBLY: if the goal says 'click Visitor Identification' but you see a link like 'Anonymous Visitors Unknown' or a link with href containing 'visitor-identification', those are the same thing. Use the element that's actually on screen.",
1073
- "- When the goal says 'navigate back', use the 'back' action type, not look for a back button.",
1074
- "- 'type' replaces the field's whole content (value \"\" clears it) and only fills it. To submit it (search boxes, add-item inputs, forms without a visible submit button), next use 'press' with value 'Enter' on the same element. 'press' also takes Escape, Tab, ArrowDown, ArrowUp.",
1075
- "- For a picker (dropdown), use 'select' on the picker with value set to the option's text exactly as listed in its options — never tap an option.",
1076
- "- Only use 'scroll' if you've already looked at all interactive elements and none match. Don't scroll repeatedly — if no match after one scroll, try tapping the closest match.",
1077
- "- NEVER scroll more than twice for the same goal. If the element isn't visible after scrolling, tap the closest matching element.",
1078
- "",
1079
- "Respond with a JSON array of up to 3 ranked action objects. Each must have:",
1080
- ' { "action_type": "tap|type|press|select|swipe|scroll|back|wait|done|fail", "element_index": <int or null>, "element_label": "<string>", "value": "<string or empty>", "confidence": <0-1>, "reasoning": "<one sentence>" }',
1081
- "",
1082
- "action_type 'done' means the goal is already achieved based on what's visible — no further action needed.",
1083
- "action_type 'fail' means the goal cannot be completed from this screen state — no further action will help.",
1075
+ "RULES:",
1076
+ "- If the screen, or the notes on your earlier actions (→ …), already show what the goal asks for, use 'done' and say what you saw. Don't repeat actions to check again.",
1077
+ "- On the wrong page? Get to the right one first (links, menus, 'back'). Use 'fail' only when the goal can't be achieved at all (control missing, blocked) — never 'done' for that.",
1078
+ "- Match elements by meaning, not exact wording, and use the one that's listed.",
1079
+ "- Use 'back' to go back. Scroll only if nothing listed matches, and at most twice per goal.",
1080
+ *(["- 'type' replaces a field's content (value \"\" clears it). To submit a field without a "
1081
+ "button, then 'press' Enter on it ('press' also takes Escape, Tab, ArrowDown, ArrowUp)."]
1082
+ if _HAS_TEXT_FIELD_RE.search(trimmed_screen) else []),
1083
+ *(["- For a picker, 'select' it with value = the option's text exactly as listed; never tap an option."]
1084
+ if _HAS_PICKER_RE.search(trimmed_screen) else []),
1084
1085
  "",
1085
- "Respond with ONLY the JSON array. No explanation outside the JSON.",
1086
+ "Answer with ONLY a JSON array of up to 3 ranked actions, each:",
1087
+ ' {"action_type": "tap|type|press|select|swipe|scroll|back|wait|done|fail", "element_index": <int or null>, '
1088
+ '"element_label": "<string>", "value": "<string or empty>", "confidence": <0-1>, "reasoning": "<one sentence>"}',
1086
1089
  ]
1087
1090
 
1088
1091
  return "\n".join(sections)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fusiontest
3
- Version: 0.2.43
3
+ Version: 0.2.44
4
4
  Summary: AI-powered UI testing for mobile and desktop — by FusionLeap.io
5
5
  Author-email: FusionLeap <hello@fusionleap.io>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fusiontest"
7
- version = "0.2.43"
7
+ version = "0.2.44"
8
8
  description = "AI-powered UI testing for mobile and desktop — by FusionLeap.io"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes