gehuageyan commited on
Commit
f292e7e
·
verified ·
1 Parent(s): 2fcaca4

Publish original Headless Browser inputs from 91ca91ae26d6baf84fbc104431f13e577ca41abf (part 7)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. definitions.tar.gz +3 -0
  2. definitions/tasks/L1/stagehand/sc_agentloop_ax_role_name_ids__sh.json +74 -0
  3. definitions/tasks/L1/stagehand/sc_app_add_single_item__sh.json +100 -0
  4. definitions/tasks/L1/stagehand/sc_app_cart_persists_reload__sh.json +104 -0
  5. definitions/tasks/L1/stagehand/sc_app_cart_total_two_items__sh.json +108 -0
  6. definitions/tasks/L1/stagehand/sc_app_checkout_receipt__sh.json +104 -0
  7. definitions/tasks/L1/stagehand/sc_app_filter_narrows__sh.json +102 -0
  8. definitions/tasks/L1/stagehand/sc_app_filter_then_add__sh.json +109 -0
  9. definitions/tasks/L1/stagehand/sc_app_full_flow_aggregate__sh.json +112 -0
  10. definitions/tasks/L1/stagehand/sc_app_locked_without_login__sh.json +82 -0
  11. definitions/tasks/L1/stagehand/sc_app_login_greets__sh.json +84 -0
  12. definitions/tasks/L1/stagehand/sc_app_logout_locks__sh.json +92 -0
  13. definitions/tasks/L1/stagehand/sc_app_qty_accumulates__sh.json +104 -0
  14. definitions/tasks/L1/stagehand/sc_app_remove_item__sh.json +112 -0
  15. definitions/tasks/L1/stagehand/sc_computed_style_breadth__sh.json +87 -0
  16. definitions/tasks/L1/stagehand/sc_cs_eval_context_persists__sh.json +70 -0
  17. definitions/tasks/L1/stagehand/sc_cs_fresh_page_no_stale_globals__sh.json +78 -0
  18. definitions/tasks/L1/stagehand/sc_cs_ready_state_complete__sh.json +67 -0
  19. definitions/tasks/L1/stagehand/sc_cs_second_page_independent_nav__sh.json +74 -0
  20. definitions/tasks/L1/stagehand/sc_cs_session_survives_three_pages__sh.json +80 -0
  21. definitions/tasks/L1/stagehand/sc_cs_two_pages_isolated__sh.json +80 -0
  22. definitions/tasks/L1/stagehand/sc_cs_ua_surface__sh.json +71 -0
  23. definitions/tasks/L1/stagehand/sc_cs_url_surface__sh.json +65 -0
  24. definitions/tasks/L1/stagehand/sc_dyn_counter_clicks__sh.json +79 -0
  25. definitions/tasks/L1/stagehand/sc_dyn_paging_final__sh.json +84 -0
  26. definitions/tasks/L1/stagehand/sc_form_checkbox_check__sh.json +70 -0
  27. definitions/tasks/L1/stagehand/sc_form_checkbox_event__sh.json +71 -0
  28. definitions/tasks/L1/stagehand/sc_form_fill_overwrites__sh.json +77 -0
  29. definitions/tasks/L1/stagehand/sc_form_fill_readback__sh.json +72 -0
  30. definitions/tasks/L1/stagehand/sc_form_focus_active_element__sh.json +73 -0
  31. definitions/tasks/L1/stagehand/sc_form_label_click_toggles__sh.json +71 -0
  32. definitions/tasks/L1/stagehand/sc_form_press_enter_handler__sh.json +72 -0
  33. definitions/tasks/L1/stagehand/sc_form_radio_pick__sh.json +71 -0
  34. definitions/tasks/L1/stagehand/sc_form_select_option__sh.json +72 -0
  35. definitions/tasks/L1/stagehand/sc_form_submit_roundtrip__sh.json +83 -0
  36. definitions/tasks/L1/stagehand/sc_form_textarea_fill__sh.json +72 -0
  37. definitions/tasks/L1/stagehand/sc_fr_child_posts_parent__sh.json +72 -0
  38. definitions/tasks/L1/stagehand/sc_fr_child_self_navigation__sh.json +76 -0
  39. definitions/tasks/L1/stagehand/sc_fr_cross_origin_blocked__sh.json +76 -0
  40. definitions/tasks/L1/stagehand/sc_fr_dynamic_iframe_attach__sh.json +76 -0
  41. definitions/tasks/L1/stagehand/sc_fr_frame_tree_shape__sh.json +76 -0
  42. definitions/tasks/L1/stagehand/sc_fr_iframe_detach__sh.json +76 -0
  43. definitions/tasks/L1/stagehand/sc_fr_nested_two_levels__sh.json +76 -0
  44. definitions/tasks/L1/stagehand/sc_fr_sibling_isolation__sh.json +76 -0
  45. definitions/tasks/L1/stagehand/sc_fr_static_child_read__sh.json +72 -0
  46. definitions/tasks/L1/stagehand/sc_loc_adjacent_sibling__sh.json +66 -0
  47. definitions/tasks/L1/stagehand/sc_loc_attribute_selector_click__sh.json +72 -0
  48. definitions/tasks/L1/stagehand/sc_loc_class_count__sh.json +66 -0
  49. definitions/tasks/L1/stagehand/sc_loc_descendant_scope__sh.json +66 -0
  50. definitions/tasks/L1/stagehand/sc_loc_first_match_semantics__sh.json +71 -0
definitions.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:916a8f4eb889f05a26d57bb4f8196be83d437b28568f73eb1a1c0505c6c4301e
3
+ size 965026
definitions/tasks/L1/stagehand/sc_agentloop_ax_role_name_ids__sh.json ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/agentloop_ax_role_name_ids.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "best_effort",
5
+ "description": "Fetches the full accessibility tree through each driver's own CDP route, finds a deterministic button, and requires its role, computed accessible name, and backendDOMNodeId to survive the adapter boundary.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "ax_identity_read",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "role=button|name=ax-stable-63|backendDOMNodeId=",
15
+ "kind": "saved_contains",
16
+ "label": "role_name_backend_id_complete",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "document.getElementById('ax-stable').getAttribute('aria-label') === 'ax-stable-63'",
31
+ "op": "wait_for_function"
32
+ },
33
+ {
34
+ "name": "ax-stable-63",
35
+ "op": "ax_node_identity",
36
+ "role": "button",
37
+ "save_as": "answer"
38
+ }
39
+ ]
40
+ },
41
+ "features": [
42
+ "fw.stagehand.op.new_page",
43
+ "fw.stagehand.op.goto",
44
+ "fw.stagehand.op.wait_for_function",
45
+ "fw.stagehand.op.ax_node_identity",
46
+ "cdp.accessibility.get_full_ax_tree"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/v0_4/obs"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.observation",
63
+ "version.v0_4",
64
+ "purpose.issue_106",
65
+ "purpose.diagnostic"
66
+ ],
67
+ "task_id": "sc_agentloop_ax_role_name_ids__sh",
68
+ "task_version": 1,
69
+ "timeouts": {
70
+ "hard_kill_ms": 45000,
71
+ "task_ms": 30000
72
+ },
73
+ "title": "An agent-facing AX query preserves role, name, and backend DOM identity (stagehand)"
74
+ }
definitions/tasks/L1/stagehand/sc_app_add_single_item__sh.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_add_single_item.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, adds one item, and answers with the server-computed cart total.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "item_added",
11
+ "step": 6
12
+ },
13
+ {
14
+ "expected": "total-3",
15
+ "kind": "saved_equals",
16
+ "label": "server_total",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "!!document.getElementById('add-widget-a')",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "click",
48
+ "selector": "#add-widget-a"
49
+ },
50
+ {
51
+ "expression": "!!document.getElementById('cart-widget-a')",
52
+ "op": "wait_for_function"
53
+ },
54
+ {
55
+ "expression": "document.getElementById('cart-total').textContent === 'total-3'",
56
+ "op": "wait_for_function"
57
+ },
58
+ {
59
+ "op": "text_content",
60
+ "save_as": "answer",
61
+ "selector": "#cart-total"
62
+ }
63
+ ]
64
+ },
65
+ "features": [
66
+ "fw.stagehand.op.new_page",
67
+ "fw.stagehand.op.goto",
68
+ "fw.stagehand.op.fill",
69
+ "fw.stagehand.op.click",
70
+ "fw.stagehand.op.wait_for_function",
71
+ "fw.stagehand.op.text_content",
72
+ "cdp.runtime.evaluate",
73
+ "cdp.input.dispatch_mouse_event",
74
+ "cdp.network.request_will_be_sent"
75
+ ],
76
+ "grader": {
77
+ "checks": [
78
+ "answer_matches_expected"
79
+ ],
80
+ "endpoint": "/__grade__/expected_answer",
81
+ "kind": "server_side"
82
+ },
83
+ "layer": "L1",
84
+ "scene": {
85
+ "kind": "self_hosted_fixture",
86
+ "url": "/v0_4/app"
87
+ },
88
+ "subset_id": "l1.stagehand",
89
+ "tags": [
90
+ "family.multi_step_flow",
91
+ "version.v0_4"
92
+ ],
93
+ "task_id": "sc_app_add_single_item__sh",
94
+ "task_version": 1,
95
+ "timeouts": {
96
+ "hard_kill_ms": 45000,
97
+ "task_ms": 30000
98
+ },
99
+ "title": "Adding one item is reflected in the server-side cart total (stagehand)"
100
+ }
definitions/tasks/L1/stagehand/sc_app_cart_persists_reload__sh.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_cart_persists_reload.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, adds an item, reloads the document, and answers with the total restored from server state.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "restored",
11
+ "step": 8
12
+ },
13
+ {
14
+ "expected": "total-7",
15
+ "kind": "saved_equals",
16
+ "label": "total_after_reload",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "!!document.getElementById('add-widget-c')",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "click",
48
+ "selector": "#add-widget-c"
49
+ },
50
+ {
51
+ "expression": "!!document.getElementById('cart-widget-c')",
52
+ "op": "wait_for_function"
53
+ },
54
+ {
55
+ "op": "reload"
56
+ },
57
+ {
58
+ "expression": "document.getElementById('cart-total').textContent === 'total-7'",
59
+ "op": "wait_for_function"
60
+ },
61
+ {
62
+ "op": "text_content",
63
+ "save_as": "answer",
64
+ "selector": "#cart-total"
65
+ }
66
+ ]
67
+ },
68
+ "features": [
69
+ "fw.stagehand.op.new_page",
70
+ "fw.stagehand.op.goto",
71
+ "fw.stagehand.op.fill",
72
+ "fw.stagehand.op.click",
73
+ "fw.stagehand.op.wait_for_function",
74
+ "fw.stagehand.op.reload",
75
+ "fw.stagehand.op.text_content",
76
+ "cdp.runtime.evaluate",
77
+ "cdp.input.dispatch_mouse_event",
78
+ "cdp.network.request_will_be_sent"
79
+ ],
80
+ "grader": {
81
+ "checks": [
82
+ "answer_matches_expected"
83
+ ],
84
+ "endpoint": "/__grade__/expected_answer",
85
+ "kind": "server_side"
86
+ },
87
+ "layer": "L1",
88
+ "scene": {
89
+ "kind": "self_hosted_fixture",
90
+ "url": "/v0_4/app"
91
+ },
92
+ "subset_id": "l1.stagehand",
93
+ "tags": [
94
+ "family.multi_step_flow",
95
+ "version.v0_4"
96
+ ],
97
+ "task_id": "sc_app_cart_persists_reload__sh",
98
+ "task_version": 1,
99
+ "timeouts": {
100
+ "hard_kill_ms": 45000,
101
+ "task_ms": 30000
102
+ },
103
+ "title": "The cart survives a page reload via the session cookie (stagehand)"
104
+ }
definitions/tasks/L1/stagehand/sc_app_cart_total_two_items__sh.json ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_cart_total_two_items.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, adds two items with different prices, and answers with the aggregated total.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "both_added",
11
+ "step": 8
12
+ },
13
+ {
14
+ "expected": "total-14",
15
+ "kind": "saved_equals",
16
+ "label": "aggregate_total",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "!!document.getElementById('add-widget-a')",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "click",
48
+ "selector": "#add-widget-a"
49
+ },
50
+ {
51
+ "expression": "!!document.getElementById('cart-widget-a')",
52
+ "op": "wait_for_function"
53
+ },
54
+ {
55
+ "op": "click",
56
+ "selector": "#add-gizmo-x"
57
+ },
58
+ {
59
+ "expression": "!!document.getElementById('cart-gizmo-x')",
60
+ "op": "wait_for_function"
61
+ },
62
+ {
63
+ "expression": "document.getElementById('cart-total').textContent === 'total-14'",
64
+ "op": "wait_for_function"
65
+ },
66
+ {
67
+ "op": "text_content",
68
+ "save_as": "answer",
69
+ "selector": "#cart-total"
70
+ }
71
+ ]
72
+ },
73
+ "features": [
74
+ "fw.stagehand.op.new_page",
75
+ "fw.stagehand.op.goto",
76
+ "fw.stagehand.op.fill",
77
+ "fw.stagehand.op.click",
78
+ "fw.stagehand.op.wait_for_function",
79
+ "fw.stagehand.op.text_content",
80
+ "cdp.runtime.evaluate",
81
+ "cdp.input.dispatch_mouse_event",
82
+ "cdp.network.request_will_be_sent"
83
+ ],
84
+ "grader": {
85
+ "checks": [
86
+ "answer_matches_expected"
87
+ ],
88
+ "endpoint": "/__grade__/expected_answer",
89
+ "kind": "server_side"
90
+ },
91
+ "layer": "L1",
92
+ "scene": {
93
+ "kind": "self_hosted_fixture",
94
+ "url": "/v0_4/app"
95
+ },
96
+ "subset_id": "l1.stagehand",
97
+ "tags": [
98
+ "family.multi_step_flow",
99
+ "version.v0_4"
100
+ ],
101
+ "task_id": "sc_app_cart_total_two_items__sh",
102
+ "task_version": 1,
103
+ "timeouts": {
104
+ "hard_kill_ms": 45000,
105
+ "task_ms": 30000
106
+ },
107
+ "title": "Two different items sum to the server-computed total (stagehand)"
108
+ }
definitions/tasks/L1/stagehand/sc_app_checkout_receipt__sh.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_checkout_receipt.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, adds one item, checks out, and answers with the order id the server derived from the cart.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "receipt_shown",
11
+ "step": 8
12
+ },
13
+ {
14
+ "expected": "ord-13-1",
15
+ "kind": "saved_equals",
16
+ "label": "order_id",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "!!document.getElementById('add-gizmo-y')",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "click",
48
+ "selector": "#add-gizmo-y"
49
+ },
50
+ {
51
+ "expression": "!!document.getElementById('cart-gizmo-y')",
52
+ "op": "wait_for_function"
53
+ },
54
+ {
55
+ "op": "click",
56
+ "selector": "#checkout-btn"
57
+ },
58
+ {
59
+ "expression": "document.getElementById('receipt').textContent.indexOf('ord-') !== -1",
60
+ "op": "wait_for_function"
61
+ },
62
+ {
63
+ "op": "text_content",
64
+ "save_as": "answer",
65
+ "selector": "#receipt"
66
+ }
67
+ ]
68
+ },
69
+ "features": [
70
+ "fw.stagehand.op.new_page",
71
+ "fw.stagehand.op.goto",
72
+ "fw.stagehand.op.fill",
73
+ "fw.stagehand.op.click",
74
+ "fw.stagehand.op.wait_for_function",
75
+ "fw.stagehand.op.text_content",
76
+ "cdp.runtime.evaluate",
77
+ "cdp.input.dispatch_mouse_event",
78
+ "cdp.network.request_will_be_sent"
79
+ ],
80
+ "grader": {
81
+ "checks": [
82
+ "answer_matches_expected"
83
+ ],
84
+ "endpoint": "/__grade__/expected_answer",
85
+ "kind": "server_side"
86
+ },
87
+ "layer": "L1",
88
+ "scene": {
89
+ "kind": "self_hosted_fixture",
90
+ "url": "/v0_4/app"
91
+ },
92
+ "subset_id": "l1.stagehand",
93
+ "tags": [
94
+ "family.multi_step_flow",
95
+ "version.v0_4"
96
+ ],
97
+ "task_id": "sc_app_checkout_receipt__sh",
98
+ "task_version": 1,
99
+ "timeouts": {
100
+ "hard_kill_ms": 45000,
101
+ "task_ms": 30000
102
+ },
103
+ "title": "Checkout returns a server-computed order receipt (stagehand)"
104
+ }
definitions/tasks/L1/stagehand/sc_app_filter_narrows__sh.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_filter_narrows.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, types a filter prefix, and answers with the live match counter.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "filter_applied",
11
+ "step": 8
12
+ },
13
+ {
14
+ "expected": "wid:3",
15
+ "kind": "saved_equals",
16
+ "label": "narrowed",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "document.querySelectorAll('#items li').length === 5",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "fill",
48
+ "selector": "#filter-in",
49
+ "value": "wid"
50
+ },
51
+ {
52
+ "expression": "document.getElementById('filter-in').dispatchEvent(new Event('input', {bubbles: true})); 'fired'",
53
+ "op": "evaluate"
54
+ },
55
+ {
56
+ "expression": "document.getElementById('filter-count').textContent === 'wid:3'",
57
+ "op": "wait_for_function"
58
+ },
59
+ {
60
+ "op": "text_content",
61
+ "save_as": "answer",
62
+ "selector": "#filter-count"
63
+ }
64
+ ]
65
+ },
66
+ "features": [
67
+ "fw.stagehand.op.new_page",
68
+ "fw.stagehand.op.goto",
69
+ "fw.stagehand.op.fill",
70
+ "fw.stagehand.op.click",
71
+ "fw.stagehand.op.wait_for_function",
72
+ "fw.stagehand.op.evaluate",
73
+ "fw.stagehand.op.text_content",
74
+ "cdp.runtime.evaluate",
75
+ "cdp.input.dispatch_mouse_event",
76
+ "cdp.network.request_will_be_sent"
77
+ ],
78
+ "grader": {
79
+ "checks": [
80
+ "answer_matches_expected"
81
+ ],
82
+ "endpoint": "/__grade__/expected_answer",
83
+ "kind": "server_side"
84
+ },
85
+ "layer": "L1",
86
+ "scene": {
87
+ "kind": "self_hosted_fixture",
88
+ "url": "/v0_4/app"
89
+ },
90
+ "subset_id": "l1.stagehand",
91
+ "tags": [
92
+ "family.multi_step_flow",
93
+ "version.v0_4"
94
+ ],
95
+ "task_id": "sc_app_filter_narrows__sh",
96
+ "task_version": 1,
97
+ "timeouts": {
98
+ "hard_kill_ms": 45000,
99
+ "task_ms": 30000
100
+ },
101
+ "title": "Typing a filter narrows the item list to matching entries (stagehand)"
102
+ }
definitions/tasks/L1/stagehand/sc_app_filter_then_add__sh.json ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_filter_then_add.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, filters to the gizmo group, adds the first match, and answers with its cart line.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "added_from_filter",
11
+ "step": 9
12
+ },
13
+ {
14
+ "expected": "gizmo-x:1",
15
+ "kind": "saved_equals",
16
+ "label": "cart_line",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "document.querySelectorAll('#items li').length === 5",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "fill",
48
+ "selector": "#filter-in",
49
+ "value": "giz"
50
+ },
51
+ {
52
+ "expression": "document.getElementById('filter-in').dispatchEvent(new Event('input', {bubbles: true})); 'fired'",
53
+ "op": "evaluate"
54
+ },
55
+ {
56
+ "expression": "document.getElementById('filter-count').textContent === 'giz:2'",
57
+ "op": "wait_for_function"
58
+ },
59
+ {
60
+ "op": "click",
61
+ "selector": "#add-gizmo-x"
62
+ },
63
+ {
64
+ "expression": "!!document.getElementById('cart-gizmo-x')",
65
+ "op": "wait_for_function"
66
+ },
67
+ {
68
+ "expression": "document.getElementById('cart-gizmo-x').textContent.trim().replace(/ rm$/, '')",
69
+ "op": "evaluate",
70
+ "save_as": "answer"
71
+ }
72
+ ]
73
+ },
74
+ "features": [
75
+ "fw.stagehand.op.new_page",
76
+ "fw.stagehand.op.goto",
77
+ "fw.stagehand.op.fill",
78
+ "fw.stagehand.op.click",
79
+ "fw.stagehand.op.wait_for_function",
80
+ "fw.stagehand.op.evaluate",
81
+ "cdp.runtime.evaluate",
82
+ "cdp.input.dispatch_mouse_event",
83
+ "cdp.network.request_will_be_sent"
84
+ ],
85
+ "grader": {
86
+ "checks": [
87
+ "answer_matches_expected"
88
+ ],
89
+ "endpoint": "/__grade__/expected_answer",
90
+ "kind": "server_side"
91
+ },
92
+ "layer": "L1",
93
+ "scene": {
94
+ "kind": "self_hosted_fixture",
95
+ "url": "/v0_4/app"
96
+ },
97
+ "subset_id": "l1.stagehand",
98
+ "tags": [
99
+ "family.multi_step_flow",
100
+ "version.v0_4"
101
+ ],
102
+ "task_id": "sc_app_filter_then_add__sh",
103
+ "task_version": 1,
104
+ "timeouts": {
105
+ "hard_kill_ms": 45000,
106
+ "task_ms": 30000
107
+ },
108
+ "title": "An item added from a filtered view lands in the cart (stagehand)"
109
+ }
definitions/tasks/L1/stagehand/sc_app_full_flow_aggregate__sh.json ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_full_flow_aggregate.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Runs the entire flow and answers with greeting plus receipt, every part server-computed.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "flow_complete",
11
+ "step": 10
12
+ },
13
+ {
14
+ "expected": "hi-eve-7|ord-14-2",
15
+ "kind": "saved_equals",
16
+ "label": "aggregate",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "!!document.getElementById('add-widget-a')",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "click",
48
+ "selector": "#add-widget-a"
49
+ },
50
+ {
51
+ "expression": "!!document.getElementById('cart-widget-a')",
52
+ "op": "wait_for_function"
53
+ },
54
+ {
55
+ "op": "click",
56
+ "selector": "#add-gizmo-x"
57
+ },
58
+ {
59
+ "expression": "!!document.getElementById('cart-gizmo-x')",
60
+ "op": "wait_for_function"
61
+ },
62
+ {
63
+ "op": "click",
64
+ "selector": "#checkout-btn"
65
+ },
66
+ {
67
+ "expression": "document.getElementById('receipt').textContent.indexOf('ord-') !== -1",
68
+ "op": "wait_for_function"
69
+ },
70
+ {
71
+ "expression": "document.getElementById('greet').textContent + '|' + document.getElementById('receipt').textContent",
72
+ "op": "evaluate",
73
+ "save_as": "answer"
74
+ }
75
+ ]
76
+ },
77
+ "features": [
78
+ "fw.stagehand.op.new_page",
79
+ "fw.stagehand.op.goto",
80
+ "fw.stagehand.op.fill",
81
+ "fw.stagehand.op.click",
82
+ "fw.stagehand.op.wait_for_function",
83
+ "fw.stagehand.op.evaluate",
84
+ "cdp.runtime.evaluate",
85
+ "cdp.input.dispatch_mouse_event",
86
+ "cdp.network.request_will_be_sent"
87
+ ],
88
+ "grader": {
89
+ "checks": [
90
+ "answer_matches_expected"
91
+ ],
92
+ "endpoint": "/__grade__/expected_answer",
93
+ "kind": "server_side"
94
+ },
95
+ "layer": "L1",
96
+ "scene": {
97
+ "kind": "self_hosted_fixture",
98
+ "url": "/v0_4/app"
99
+ },
100
+ "subset_id": "l1.stagehand",
101
+ "tags": [
102
+ "family.multi_step_flow",
103
+ "version.v0_4"
104
+ ],
105
+ "task_id": "sc_app_full_flow_aggregate__sh",
106
+ "task_version": 1,
107
+ "timeouts": {
108
+ "hard_kill_ms": 45000,
109
+ "task_ms": 30000
110
+ },
111
+ "title": "The full login-add-add-checkout flow aggregates end to end (stagehand)"
112
+ }
definitions/tasks/L1/stagehand/sc_app_locked_without_login__sh.json ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_locked_without_login.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Clears any leftover session cookie, reloads, and confirms the server refuses the item list.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "locked_state",
11
+ "step": 4
12
+ },
13
+ {
14
+ "expected": "locked",
15
+ "kind": "saved_equals",
16
+ "label": "server_refused",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "document.cookie = 'abb_app_sid=; Max-Age=0; path=/'; 'cleared'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "op": "reload"
35
+ },
36
+ {
37
+ "expression": "document.getElementById('filter-count').textContent === 'locked'",
38
+ "op": "wait_for_function"
39
+ },
40
+ {
41
+ "op": "text_content",
42
+ "save_as": "answer",
43
+ "selector": "#filter-count"
44
+ }
45
+ ]
46
+ },
47
+ "features": [
48
+ "fw.stagehand.op.new_page",
49
+ "fw.stagehand.op.goto",
50
+ "fw.stagehand.op.evaluate",
51
+ "fw.stagehand.op.reload",
52
+ "fw.stagehand.op.wait_for_function",
53
+ "fw.stagehand.op.text_content",
54
+ "cdp.runtime.evaluate",
55
+ "cdp.input.dispatch_mouse_event",
56
+ "cdp.network.request_will_be_sent"
57
+ ],
58
+ "grader": {
59
+ "checks": [
60
+ "answer_matches_expected"
61
+ ],
62
+ "endpoint": "/__grade__/expected_answer",
63
+ "kind": "server_side"
64
+ },
65
+ "layer": "L1",
66
+ "scene": {
67
+ "kind": "self_hosted_fixture",
68
+ "url": "/v0_4/app"
69
+ },
70
+ "subset_id": "l1.stagehand",
71
+ "tags": [
72
+ "family.multi_step_flow",
73
+ "version.v0_4"
74
+ ],
75
+ "task_id": "sc_app_locked_without_login__sh",
76
+ "task_version": 1,
77
+ "timeouts": {
78
+ "hard_kill_ms": 45000,
79
+ "task_ms": 30000
80
+ },
81
+ "title": "The item list is locked without a session (stagehand)"
82
+ }
definitions/tasks/L1/stagehand/sc_app_login_greets__sh.json ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_login_greets.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Fills the user field, logs in, and answers with the greeting the server echoed back.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "login_done",
11
+ "step": 4
12
+ },
13
+ {
14
+ "expected": "hi-eve-7",
15
+ "kind": "saved_equals",
16
+ "label": "greeting",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "op": "text_content",
44
+ "save_as": "answer",
45
+ "selector": "#greet"
46
+ }
47
+ ]
48
+ },
49
+ "features": [
50
+ "fw.stagehand.op.new_page",
51
+ "fw.stagehand.op.goto",
52
+ "fw.stagehand.op.fill",
53
+ "fw.stagehand.op.click",
54
+ "fw.stagehand.op.wait_for_function",
55
+ "fw.stagehand.op.text_content",
56
+ "cdp.runtime.evaluate",
57
+ "cdp.input.dispatch_mouse_event",
58
+ "cdp.network.request_will_be_sent"
59
+ ],
60
+ "grader": {
61
+ "checks": [
62
+ "answer_matches_expected"
63
+ ],
64
+ "endpoint": "/__grade__/expected_answer",
65
+ "kind": "server_side"
66
+ },
67
+ "layer": "L1",
68
+ "scene": {
69
+ "kind": "self_hosted_fixture",
70
+ "url": "/v0_4/app"
71
+ },
72
+ "subset_id": "l1.stagehand",
73
+ "tags": [
74
+ "family.multi_step_flow",
75
+ "version.v0_4"
76
+ ],
77
+ "task_id": "sc_app_login_greets__sh",
78
+ "task_version": 1,
79
+ "timeouts": {
80
+ "hard_kill_ms": 45000,
81
+ "task_ms": 30000
82
+ },
83
+ "title": "Logging in yields a server-echoed greeting (stagehand)"
84
+ }
definitions/tasks/L1/stagehand/sc_app_logout_locks__sh.json ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_logout_locks.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, logs out, and answers with the server farewell plus the relocked list marker.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "logged_out",
11
+ "step": 6
12
+ },
13
+ {
14
+ "expected": "bye-eve-7:locked",
15
+ "kind": "saved_equals",
16
+ "label": "farewell_and_lock",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "op": "click",
44
+ "selector": "#logout-btn"
45
+ },
46
+ {
47
+ "expression": "document.getElementById('greet').textContent.indexOf('bye-') !== -1 && document.getElementById('filter-count').textContent === 'locked'",
48
+ "op": "wait_for_function"
49
+ },
50
+ {
51
+ "expression": "document.getElementById('greet').textContent + ':' + document.getElementById('filter-count').textContent",
52
+ "op": "evaluate",
53
+ "save_as": "answer"
54
+ }
55
+ ]
56
+ },
57
+ "features": [
58
+ "fw.stagehand.op.new_page",
59
+ "fw.stagehand.op.goto",
60
+ "fw.stagehand.op.fill",
61
+ "fw.stagehand.op.click",
62
+ "fw.stagehand.op.wait_for_function",
63
+ "fw.stagehand.op.evaluate",
64
+ "cdp.runtime.evaluate",
65
+ "cdp.input.dispatch_mouse_event",
66
+ "cdp.network.request_will_be_sent"
67
+ ],
68
+ "grader": {
69
+ "checks": [
70
+ "answer_matches_expected"
71
+ ],
72
+ "endpoint": "/__grade__/expected_answer",
73
+ "kind": "server_side"
74
+ },
75
+ "layer": "L1",
76
+ "scene": {
77
+ "kind": "self_hosted_fixture",
78
+ "url": "/v0_4/app"
79
+ },
80
+ "subset_id": "l1.stagehand",
81
+ "tags": [
82
+ "family.multi_step_flow",
83
+ "version.v0_4"
84
+ ],
85
+ "task_id": "sc_app_logout_locks__sh",
86
+ "task_version": 1,
87
+ "timeouts": {
88
+ "hard_kill_ms": 45000,
89
+ "task_ms": 30000
90
+ },
91
+ "title": "Logging out drops the server session and relocks the list (stagehand)"
92
+ }
definitions/tasks/L1/stagehand/sc_app_qty_accumulates__sh.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_qty_accumulates.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, adds one item twice, and answers with the cart line plus total.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "second_add",
11
+ "step": 8
12
+ },
13
+ {
14
+ "expected": "widget-b:2:total-10",
15
+ "kind": "saved_equals",
16
+ "label": "qty_and_total",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "!!document.getElementById('add-widget-b')",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "click",
48
+ "selector": "#add-widget-b"
49
+ },
50
+ {
51
+ "expression": "!!document.getElementById('cart-widget-b')",
52
+ "op": "wait_for_function"
53
+ },
54
+ {
55
+ "op": "click",
56
+ "selector": "#add-widget-b"
57
+ },
58
+ {
59
+ "expression": "document.getElementById('cart-total').textContent === 'total-10'",
60
+ "op": "wait_for_function"
61
+ },
62
+ {
63
+ "expression": "document.getElementById('cart-widget-b').textContent.trim().replace(/ rm$/, '') + ':' + document.getElementById('cart-total').textContent",
64
+ "op": "evaluate",
65
+ "save_as": "answer"
66
+ }
67
+ ]
68
+ },
69
+ "features": [
70
+ "fw.stagehand.op.new_page",
71
+ "fw.stagehand.op.goto",
72
+ "fw.stagehand.op.fill",
73
+ "fw.stagehand.op.click",
74
+ "fw.stagehand.op.wait_for_function",
75
+ "fw.stagehand.op.evaluate",
76
+ "cdp.runtime.evaluate",
77
+ "cdp.input.dispatch_mouse_event",
78
+ "cdp.network.request_will_be_sent"
79
+ ],
80
+ "grader": {
81
+ "checks": [
82
+ "answer_matches_expected"
83
+ ],
84
+ "endpoint": "/__grade__/expected_answer",
85
+ "kind": "server_side"
86
+ },
87
+ "layer": "L1",
88
+ "scene": {
89
+ "kind": "self_hosted_fixture",
90
+ "url": "/v0_4/app"
91
+ },
92
+ "subset_id": "l1.stagehand",
93
+ "tags": [
94
+ "family.multi_step_flow",
95
+ "version.v0_4"
96
+ ],
97
+ "task_id": "sc_app_qty_accumulates__sh",
98
+ "task_version": 1,
99
+ "timeouts": {
100
+ "hard_kill_ms": 45000,
101
+ "task_ms": 30000
102
+ },
103
+ "title": "Adding the same item twice accumulates quantity server-side (stagehand)"
104
+ }
definitions/tasks/L1/stagehand/sc_app_remove_item__sh.json ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/app_remove_item.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Logs in, adds two items, removes one, and answers with the corrected total.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "line_removed",
11
+ "step": 11
12
+ },
13
+ {
14
+ "expected": "total-7",
15
+ "kind": "saved_equals",
16
+ "label": "corrected_total",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#user-in",
32
+ "value": "eve-7"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#login-btn"
37
+ },
38
+ {
39
+ "expression": "document.getElementById('greet').textContent.indexOf('hi-') !== -1",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "expression": "!!document.getElementById('add-widget-a')",
44
+ "op": "wait_for_function"
45
+ },
46
+ {
47
+ "op": "click",
48
+ "selector": "#add-widget-a"
49
+ },
50
+ {
51
+ "expression": "!!document.getElementById('cart-widget-a')",
52
+ "op": "wait_for_function"
53
+ },
54
+ {
55
+ "op": "click",
56
+ "selector": "#add-widget-c"
57
+ },
58
+ {
59
+ "expression": "!!document.getElementById('cart-widget-c')",
60
+ "op": "wait_for_function"
61
+ },
62
+ {
63
+ "op": "click",
64
+ "selector": "#rm-widget-a"
65
+ },
66
+ {
67
+ "expression": "document.getElementById('cart-total').textContent === 'total-7'",
68
+ "op": "wait_for_function"
69
+ },
70
+ {
71
+ "op": "text_content",
72
+ "save_as": "answer",
73
+ "selector": "#cart-total"
74
+ }
75
+ ]
76
+ },
77
+ "features": [
78
+ "fw.stagehand.op.new_page",
79
+ "fw.stagehand.op.goto",
80
+ "fw.stagehand.op.fill",
81
+ "fw.stagehand.op.click",
82
+ "fw.stagehand.op.wait_for_function",
83
+ "fw.stagehand.op.text_content",
84
+ "cdp.runtime.evaluate",
85
+ "cdp.input.dispatch_mouse_event",
86
+ "cdp.network.request_will_be_sent"
87
+ ],
88
+ "grader": {
89
+ "checks": [
90
+ "answer_matches_expected"
91
+ ],
92
+ "endpoint": "/__grade__/expected_answer",
93
+ "kind": "server_side"
94
+ },
95
+ "layer": "L1",
96
+ "scene": {
97
+ "kind": "self_hosted_fixture",
98
+ "url": "/v0_4/app"
99
+ },
100
+ "subset_id": "l1.stagehand",
101
+ "tags": [
102
+ "family.multi_step_flow",
103
+ "version.v0_4"
104
+ ],
105
+ "task_id": "sc_app_remove_item__sh",
106
+ "task_version": 1,
107
+ "timeouts": {
108
+ "hard_kill_ms": 45000,
109
+ "task_ms": 30000
110
+ },
111
+ "title": "Removing a cart line updates the server-side total (stagehand)"
112
+ }
definitions/tasks/L1/stagehand/sc_computed_style_breadth__sh.json ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/computed_style_breadth.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "best_effort",
5
+ "description": "Calls CSS.getComputedStyleForNode through each raw-capable driver, requires at least 100 distinct properties, and verifies display, visibility, opacity, and pointer-events remain readable.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "computed_style_read",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "breadth-ok|count=",
15
+ "kind": "saved_contains",
16
+ "label": "property_set_is_broad",
17
+ "name": "answer"
18
+ },
19
+ {
20
+ "expected": "display=block|visibility=visible|opacity=0.75|pointer-events=auto",
21
+ "kind": "saved_contains",
22
+ "label": "critical_properties_readable",
23
+ "name": "answer"
24
+ }
25
+ ],
26
+ "kind": "framework_stagehand",
27
+ "steps": [
28
+ {
29
+ "op": "new_page"
30
+ },
31
+ {
32
+ "op": "goto",
33
+ "url": "{fixture_url}"
34
+ },
35
+ {
36
+ "op": "wait_for_selector",
37
+ "selector": "#computed-style-target",
38
+ "state": "visible"
39
+ },
40
+ {
41
+ "min_property_count": 100,
42
+ "op": "computed_style_breadth",
43
+ "required_properties": [
44
+ "display",
45
+ "visibility",
46
+ "opacity",
47
+ "pointer-events"
48
+ ],
49
+ "save_as": "answer",
50
+ "selector": "#computed-style-target"
51
+ }
52
+ ]
53
+ },
54
+ "features": [
55
+ "fw.stagehand.op.new_page",
56
+ "fw.stagehand.op.goto",
57
+ "fw.stagehand.op.wait_for_selector",
58
+ "fw.stagehand.op.computed_style_breadth",
59
+ "cdp.css.get_computed_style_for_node"
60
+ ],
61
+ "grader": {
62
+ "checks": [
63
+ "answer_matches_expected"
64
+ ],
65
+ "endpoint": "/__grade__/expected_answer",
66
+ "kind": "server_side"
67
+ },
68
+ "layer": "L1",
69
+ "scene": {
70
+ "kind": "self_hosted_fixture",
71
+ "url": "/v0_4/obs"
72
+ },
73
+ "subset_id": "l1.stagehand",
74
+ "tags": [
75
+ "family.observation",
76
+ "version.v0_4",
77
+ "purpose.issue_106",
78
+ "purpose.diagnostic"
79
+ ],
80
+ "task_id": "sc_computed_style_breadth__sh",
81
+ "task_version": 1,
82
+ "timeouts": {
83
+ "hard_kill_ms": 45000,
84
+ "task_ms": 30000
85
+ },
86
+ "title": "Computed style exposes a broad property set and critical interaction properties (stagehand)"
87
+ }
definitions/tasks/L1/stagehand/sc_cs_eval_context_persists__sh.json ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/cs_eval_context_persists.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Sets a window global in one evaluate call and derives a value from it in a second call. A driver that evaluates each expression in a throwaway context (or a fresh isolated world) fails here.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "second_eval_ok",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "42",
15
+ "kind": "saved_equals",
16
+ "label": "context_persisted",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "window.__abb_x = 41, 'set'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "expression": "String(window.__abb_x + 1)",
35
+ "op": "evaluate",
36
+ "save_as": "answer"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.evaluate",
44
+ "cdp.runtime.evaluate"
45
+ ],
46
+ "grader": {
47
+ "checks": [
48
+ "answer_matches_expected"
49
+ ],
50
+ "endpoint": "/__grade__/expected_answer",
51
+ "kind": "server_side"
52
+ },
53
+ "layer": "L1",
54
+ "scene": {
55
+ "kind": "self_hosted_fixture",
56
+ "url": "/l1/core"
57
+ },
58
+ "subset_id": "l1.stagehand",
59
+ "tags": [
60
+ "family.connect_session",
61
+ "version.v0_4"
62
+ ],
63
+ "task_id": "sc_cs_eval_context_persists__sh",
64
+ "task_version": 1,
65
+ "timeouts": {
66
+ "hard_kill_ms": 45000,
67
+ "task_ms": 30000
68
+ },
69
+ "title": "The JS world persists between separate driver evaluate calls (stagehand)"
70
+ }
definitions/tasks/L1/stagehand/sc_cs_fresh_page_no_stale_globals__sh.json ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/cs_fresh_page_no_stale_globals.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Sets a window global on the first page, then creates a new page on the same URL and confirms the global is absent. Exercises that new targets get fresh execution contexts rather than reusing the old page's world.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "recreate_ok",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "fresh",
15
+ "kind": "saved_equals",
16
+ "label": "world_is_fresh",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "window.__abb_marker = 41, 'marked'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "op": "new_page"
35
+ },
36
+ {
37
+ "op": "goto",
38
+ "url": "{fixture_url}"
39
+ },
40
+ {
41
+ "expression": "typeof window.__abb_marker === 'undefined' ? 'fresh' : 'stale'",
42
+ "op": "evaluate",
43
+ "save_as": "answer"
44
+ }
45
+ ]
46
+ },
47
+ "features": [
48
+ "fw.stagehand.op.new_page",
49
+ "fw.stagehand.op.goto",
50
+ "fw.stagehand.op.evaluate",
51
+ "cdp.target.create_target",
52
+ "cdp.runtime.evaluate"
53
+ ],
54
+ "grader": {
55
+ "checks": [
56
+ "answer_matches_expected"
57
+ ],
58
+ "endpoint": "/__grade__/expected_answer",
59
+ "kind": "server_side"
60
+ },
61
+ "layer": "L1",
62
+ "scene": {
63
+ "kind": "self_hosted_fixture",
64
+ "url": "/l1/core"
65
+ },
66
+ "subset_id": "l1.stagehand",
67
+ "tags": [
68
+ "family.connect_session",
69
+ "version.v0_4"
70
+ ],
71
+ "task_id": "sc_cs_fresh_page_no_stale_globals__sh",
72
+ "task_version": 1,
73
+ "timeouts": {
74
+ "hard_kill_ms": 45000,
75
+ "task_ms": 30000
76
+ },
77
+ "title": "A newly created page starts with a fresh JS world (stagehand)"
78
+ }
definitions/tasks/L1/stagehand/sc_cs_ready_state_complete__sh.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/cs_ready_state_complete.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Navigates and immediately asks the page for its readyState through the driver's evaluate surface. A driver that returns from goto before the document settles fails here.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "goto_ok",
11
+ "step": 1
12
+ },
13
+ {
14
+ "expected": "complete",
15
+ "kind": "saved_equals",
16
+ "label": "ready_complete",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "document.readyState",
31
+ "op": "evaluate",
32
+ "save_as": "answer"
33
+ }
34
+ ]
35
+ },
36
+ "features": [
37
+ "fw.stagehand.op.new_page",
38
+ "fw.stagehand.op.goto",
39
+ "fw.stagehand.op.evaluate",
40
+ "cdp.page.navigate",
41
+ "cdp.runtime.evaluate"
42
+ ],
43
+ "grader": {
44
+ "checks": [
45
+ "answer_matches_expected"
46
+ ],
47
+ "endpoint": "/__grade__/expected_answer",
48
+ "kind": "server_side"
49
+ },
50
+ "layer": "L1",
51
+ "scene": {
52
+ "kind": "self_hosted_fixture",
53
+ "url": "/l1/core"
54
+ },
55
+ "subset_id": "l1.stagehand",
56
+ "tags": [
57
+ "family.connect_session",
58
+ "version.v0_4"
59
+ ],
60
+ "task_id": "sc_cs_ready_state_complete__sh",
61
+ "task_version": 1,
62
+ "timeouts": {
63
+ "hard_kill_ms": 45000,
64
+ "task_ms": 30000
65
+ },
66
+ "title": "A settled navigation reports document.readyState complete (stagehand)"
67
+ }
definitions/tasks/L1/stagehand/sc_cs_second_page_independent_nav__sh.json ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/cs_second_page_independent_nav.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Navigates the first page to the core fixture, creates a second page, navigates it to /page2 and reads its heading. The first page's location must not constrain the second target's navigation.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "second_nav_ok",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "Page Two",
15
+ "kind": "saved_equals",
16
+ "label": "second_page_heading",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "new_page"
31
+ },
32
+ {
33
+ "op": "goto",
34
+ "url": "{fixture_base_url}/page2"
35
+ },
36
+ {
37
+ "op": "text_content",
38
+ "save_as": "answer",
39
+ "selector": "#title"
40
+ }
41
+ ]
42
+ },
43
+ "features": [
44
+ "fw.stagehand.op.new_page",
45
+ "fw.stagehand.op.goto",
46
+ "fw.stagehand.op.text_content",
47
+ "cdp.target.create_target",
48
+ "cdp.page.navigate"
49
+ ],
50
+ "grader": {
51
+ "checks": [
52
+ "answer_matches_expected"
53
+ ],
54
+ "endpoint": "/__grade__/expected_answer",
55
+ "kind": "server_side"
56
+ },
57
+ "layer": "L1",
58
+ "scene": {
59
+ "kind": "self_hosted_fixture",
60
+ "url": "/l1/core"
61
+ },
62
+ "subset_id": "l1.stagehand",
63
+ "tags": [
64
+ "family.connect_session",
65
+ "version.v0_4"
66
+ ],
67
+ "task_id": "sc_cs_second_page_independent_nav__sh",
68
+ "task_version": 1,
69
+ "timeouts": {
70
+ "hard_kill_ms": 45000,
71
+ "task_ms": 30000
72
+ },
73
+ "title": "A second page navigates independently of the first (stagehand)"
74
+ }
definitions/tasks/L1/stagehand/sc_cs_session_survives_three_pages__sh.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/cs_session_survives_three_pages.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Creates three pages in sequence, navigating each, and reads the heading from the last one. Exercises session/bookkeeping stability across repeated target creation within one attempt.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "third_page_nav_ok",
11
+ "step": 5
12
+ },
13
+ {
14
+ "expected": "CDP Core Fixture",
15
+ "kind": "saved_equals",
16
+ "label": "third_page_heading",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "new_page"
31
+ },
32
+ {
33
+ "op": "goto",
34
+ "url": "{fixture_base_url}/page2"
35
+ },
36
+ {
37
+ "op": "new_page"
38
+ },
39
+ {
40
+ "op": "goto",
41
+ "url": "{fixture_url}"
42
+ },
43
+ {
44
+ "op": "text_content",
45
+ "save_as": "answer",
46
+ "selector": "#title"
47
+ }
48
+ ]
49
+ },
50
+ "features": [
51
+ "fw.stagehand.op.new_page",
52
+ "fw.stagehand.op.goto",
53
+ "fw.stagehand.op.text_content",
54
+ "cdp.target.create_target"
55
+ ],
56
+ "grader": {
57
+ "checks": [
58
+ "answer_matches_expected"
59
+ ],
60
+ "endpoint": "/__grade__/expected_answer",
61
+ "kind": "server_side"
62
+ },
63
+ "layer": "L1",
64
+ "scene": {
65
+ "kind": "self_hosted_fixture",
66
+ "url": "/l1/core"
67
+ },
68
+ "subset_id": "l1.stagehand",
69
+ "tags": [
70
+ "family.connect_session",
71
+ "version.v0_4"
72
+ ],
73
+ "task_id": "sc_cs_session_survives_three_pages__sh",
74
+ "task_version": 1,
75
+ "timeouts": {
76
+ "hard_kill_ms": 45000,
77
+ "task_ms": 30000
78
+ },
79
+ "title": "The driver session stays healthy across three page creations (stagehand)"
80
+ }
definitions/tasks/L1/stagehand/sc_cs_two_pages_isolated__sh.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/cs_two_pages_isolated.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Fills an input on the first page, then creates a second page on the same fixture and confirms its input is untouched. Exercises multi-target isolation within one driver session.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "second_page_created",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "isolated",
15
+ "kind": "saved_equals",
16
+ "label": "no_state_leak",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#field",
32
+ "value": "leak-probe"
33
+ },
34
+ {
35
+ "op": "new_page"
36
+ },
37
+ {
38
+ "op": "goto",
39
+ "url": "{fixture_url}"
40
+ },
41
+ {
42
+ "expression": "document.getElementById('field').value === '' ? 'isolated' : 'leaked:' + document.getElementById('field').value",
43
+ "op": "evaluate",
44
+ "save_as": "answer"
45
+ }
46
+ ]
47
+ },
48
+ "features": [
49
+ "fw.stagehand.op.new_page",
50
+ "fw.stagehand.op.goto",
51
+ "fw.stagehand.op.fill",
52
+ "fw.stagehand.op.evaluate",
53
+ "cdp.target.create_target",
54
+ "cdp.target.attach_to_target"
55
+ ],
56
+ "grader": {
57
+ "checks": [
58
+ "answer_matches_expected"
59
+ ],
60
+ "endpoint": "/__grade__/expected_answer",
61
+ "kind": "server_side"
62
+ },
63
+ "layer": "L1",
64
+ "scene": {
65
+ "kind": "self_hosted_fixture",
66
+ "url": "/l1/core"
67
+ },
68
+ "subset_id": "l1.stagehand",
69
+ "tags": [
70
+ "family.connect_session",
71
+ "version.v0_4"
72
+ ],
73
+ "task_id": "sc_cs_two_pages_isolated__sh",
74
+ "task_version": 1,
75
+ "timeouts": {
76
+ "hard_kill_ms": 45000,
77
+ "task_ms": 30000
78
+ },
79
+ "title": "State set in one page must not leak into a second page (stagehand)"
80
+ }
definitions/tasks/L1/stagehand/sc_cs_ua_surface__sh.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/cs_ua_surface.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Reads the user agent through the driver's own identity surface and through page JavaScript. Exercises the session's identity plumbing end to end; every engine spoofs a Mozilla-family UA, so the page-observed value must contain 'Mozilla/'.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "driver_ua_readable",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "Mozilla/",
15
+ "kind": "saved_contains",
16
+ "label": "page_ua_mozilla",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "user_agent",
31
+ "save_as": "driver_ua"
32
+ },
33
+ {
34
+ "expression": "navigator.userAgent",
35
+ "op": "evaluate",
36
+ "save_as": "answer"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.user_agent",
44
+ "fw.stagehand.op.evaluate",
45
+ "cdp.browser.get_version"
46
+ ],
47
+ "grader": {
48
+ "checks": [
49
+ "answer_matches_expected"
50
+ ],
51
+ "endpoint": "/__grade__/expected_answer",
52
+ "kind": "server_side"
53
+ },
54
+ "layer": "L1",
55
+ "scene": {
56
+ "kind": "self_hosted_fixture",
57
+ "url": "/l1/core"
58
+ },
59
+ "subset_id": "l1.stagehand",
60
+ "tags": [
61
+ "family.connect_session",
62
+ "version.v0_4"
63
+ ],
64
+ "task_id": "sc_cs_ua_surface__sh",
65
+ "task_version": 1,
66
+ "timeouts": {
67
+ "hard_kill_ms": 45000,
68
+ "task_ms": 30000
69
+ },
70
+ "title": "Read the browser identity through the driver and the page (stagehand)"
71
+ }
definitions/tasks/L1/stagehand/sc_cs_url_surface__sh.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/cs_url_surface.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Navigates to the core fixture and reads the current URL through the driver's own url surface (not page JS). The reported location must contain the fixture path.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "url_readable",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "/l1/core",
15
+ "kind": "saved_contains",
16
+ "label": "url_has_fixture_path",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "url",
31
+ "save_as": "answer"
32
+ }
33
+ ]
34
+ },
35
+ "features": [
36
+ "fw.stagehand.op.new_page",
37
+ "fw.stagehand.op.goto",
38
+ "fw.stagehand.op.url",
39
+ "cdp.page.navigate"
40
+ ],
41
+ "grader": {
42
+ "checks": [
43
+ "answer_matches_expected"
44
+ ],
45
+ "endpoint": "/__grade__/expected_answer",
46
+ "kind": "server_side"
47
+ },
48
+ "layer": "L1",
49
+ "scene": {
50
+ "kind": "self_hosted_fixture",
51
+ "url": "/l1/core"
52
+ },
53
+ "subset_id": "l1.stagehand",
54
+ "tags": [
55
+ "family.connect_session",
56
+ "version.v0_4"
57
+ ],
58
+ "task_id": "sc_cs_url_surface__sh",
59
+ "task_version": 1,
60
+ "timeouts": {
61
+ "hard_kill_ms": 45000,
62
+ "task_ms": 30000
63
+ },
64
+ "title": "The driver's URL surface reflects the navigated location (stagehand)"
65
+ }
definitions/tasks/L1/stagehand/sc_dyn_counter_clicks__sh.json ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/dyn_counter_clicks.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Clicks #counter-btn three times on the probe controls page; each click increments the #press-count output via a JS handler. Reads the final tally. Exercises repeated pointer dispatch and observation of client-side state accumulation.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "third_click_ok",
11
+ "step": 4
12
+ },
13
+ {
14
+ "expected": "3",
15
+ "kind": "saved_equals",
16
+ "label": "count_is_three",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "click",
31
+ "selector": "#counter-btn"
32
+ },
33
+ {
34
+ "op": "click",
35
+ "selector": "#counter-btn"
36
+ },
37
+ {
38
+ "op": "click",
39
+ "selector": "#counter-btn"
40
+ },
41
+ {
42
+ "op": "text_content",
43
+ "save_as": "answer",
44
+ "selector": "#press-count"
45
+ }
46
+ ]
47
+ },
48
+ "features": [
49
+ "fw.stagehand.op.new_page",
50
+ "fw.stagehand.op.goto",
51
+ "fw.stagehand.op.click",
52
+ "fw.stagehand.op.text_content",
53
+ "cdp.input.dispatch_mouse_event"
54
+ ],
55
+ "grader": {
56
+ "checks": [
57
+ "answer_matches_expected"
58
+ ],
59
+ "endpoint": "/__grade__/expected_answer",
60
+ "kind": "server_side"
61
+ },
62
+ "layer": "L1",
63
+ "scene": {
64
+ "kind": "self_hosted_fixture",
65
+ "url": "/v0_3/probe/controls"
66
+ },
67
+ "subset_id": "l1.stagehand",
68
+ "tags": [
69
+ "family.waiting_dynamic",
70
+ "version.v0_4"
71
+ ],
72
+ "task_id": "sc_dyn_counter_clicks__sh",
73
+ "task_version": 1,
74
+ "timeouts": {
75
+ "hard_kill_ms": 45000,
76
+ "task_ms": 30000
77
+ },
78
+ "title": "Click a counter button repeatedly and read the tally (stagehand)"
79
+ }
definitions/tasks/L1/stagehand/sc_dyn_paging_final__sh.json ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/dyn_paging_final.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "On the paging fixture each #next click advances a counter and fetches that page's datum over XHR. The final datum P3-FINAL-73 exists only on page 3, reachable after two clicks, so it can only be read by waiting for each async update. Exercises polling/event-driven waiting across real network round-trips.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "final_datum_settled",
11
+ "step": 5
12
+ },
13
+ {
14
+ "expected": "P3-FINAL-73",
15
+ "kind": "saved_contains",
16
+ "label": "status_has_final",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "click",
31
+ "selector": "#next"
32
+ },
33
+ {
34
+ "expression": "document.getElementById('status').textContent.indexOf('page:2:')===0",
35
+ "op": "wait_for_function"
36
+ },
37
+ {
38
+ "op": "click",
39
+ "selector": "#next"
40
+ },
41
+ {
42
+ "expression": "document.getElementById('status').textContent.indexOf('P3-FINAL-73')>=0",
43
+ "op": "wait_for_function"
44
+ },
45
+ {
46
+ "op": "text_content",
47
+ "save_as": "answer",
48
+ "selector": "#status"
49
+ }
50
+ ]
51
+ },
52
+ "features": [
53
+ "fw.stagehand.op.new_page",
54
+ "fw.stagehand.op.goto",
55
+ "fw.stagehand.op.click",
56
+ "fw.stagehand.op.wait_for_function",
57
+ "fw.stagehand.op.text_content",
58
+ "cdp.network.request_will_be_sent"
59
+ ],
60
+ "grader": {
61
+ "checks": [
62
+ "answer_matches_expected"
63
+ ],
64
+ "endpoint": "/__grade__/expected_answer",
65
+ "kind": "server_side"
66
+ },
67
+ "layer": "L1",
68
+ "scene": {
69
+ "kind": "self_hosted_fixture",
70
+ "url": "/v2/actl2/paging"
71
+ },
72
+ "subset_id": "l1.stagehand",
73
+ "tags": [
74
+ "family.waiting_dynamic",
75
+ "version.v0_4"
76
+ ],
77
+ "task_id": "sc_dyn_paging_final__sh",
78
+ "task_version": 1,
79
+ "timeouts": {
80
+ "hard_kill_ms": 45000,
81
+ "task_ms": 30000
82
+ },
83
+ "title": "Advance paging via XHR clicks and read the final datum (stagehand)"
84
+ }
definitions/tasks/L1/stagehand/sc_form_checkbox_check__sh.json ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_checkbox_check.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Checks the #checkbox input and reads its live .checked property via evaluate. Exercises the check contract: the driver must toggle the control to a checked state observable on the DOM property, not merely dispatch a click.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "check_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "kind": "saved_truthy",
15
+ "label": "checkbox_is_checked",
16
+ "name": "answer"
17
+ }
18
+ ],
19
+ "kind": "framework_stagehand",
20
+ "steps": [
21
+ {
22
+ "op": "new_page"
23
+ },
24
+ {
25
+ "op": "goto",
26
+ "url": "{fixture_url}"
27
+ },
28
+ {
29
+ "op": "check",
30
+ "selector": "#checkbox"
31
+ },
32
+ {
33
+ "expression": "document.getElementById('checkbox').checked",
34
+ "op": "evaluate",
35
+ "save_as": "answer"
36
+ }
37
+ ]
38
+ },
39
+ "features": [
40
+ "fw.stagehand.op.new_page",
41
+ "fw.stagehand.op.goto",
42
+ "fw.stagehand.op.check",
43
+ "fw.stagehand.op.evaluate",
44
+ "cdp.input.dispatch_mouse_event"
45
+ ],
46
+ "grader": {
47
+ "checks": [
48
+ "answer_matches_expected"
49
+ ],
50
+ "endpoint": "/__grade__/expected_answer",
51
+ "kind": "server_side"
52
+ },
53
+ "layer": "L1",
54
+ "scene": {
55
+ "kind": "self_hosted_fixture",
56
+ "url": "/l1/core"
57
+ },
58
+ "subset_id": "l1.stagehand",
59
+ "tags": [
60
+ "family.forms",
61
+ "version.v0_4"
62
+ ],
63
+ "task_id": "sc_form_checkbox_check__sh",
64
+ "task_version": 1,
65
+ "timeouts": {
66
+ "hard_kill_ms": 45000,
67
+ "task_ms": 30000
68
+ },
69
+ "title": "Check a checkbox and observe the checked property (stagehand)"
70
+ }
definitions/tasks/L1/stagehand/sc_form_checkbox_event__sh.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_checkbox_event.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Checks the #agree checkbox on the probe controls page; the change handler writes 'checked' into #agree-out. Reads it back. Unlike a bare .checked read, this asserts the driver's check dispatches a real change event the page can react to.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "check_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "checked",
15
+ "kind": "saved_equals",
16
+ "label": "agree_checked",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "check",
31
+ "selector": "#agree"
32
+ },
33
+ {
34
+ "op": "text_content",
35
+ "save_as": "answer",
36
+ "selector": "#agree-out"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.check",
44
+ "fw.stagehand.op.text_content",
45
+ "cdp.input.dispatch_mouse_event"
46
+ ],
47
+ "grader": {
48
+ "checks": [
49
+ "answer_matches_expected"
50
+ ],
51
+ "endpoint": "/__grade__/expected_answer",
52
+ "kind": "server_side"
53
+ },
54
+ "layer": "L1",
55
+ "scene": {
56
+ "kind": "self_hosted_fixture",
57
+ "url": "/v0_3/probe/controls"
58
+ },
59
+ "subset_id": "l1.stagehand",
60
+ "tags": [
61
+ "family.forms",
62
+ "version.v0_4"
63
+ ],
64
+ "task_id": "sc_form_checkbox_event__sh",
65
+ "task_version": 1,
66
+ "timeouts": {
67
+ "hard_kill_ms": 45000,
68
+ "task_ms": 30000
69
+ },
70
+ "title": "Check a checkbox and observe its change handler output (stagehand)"
71
+ }
definitions/tasks/L1/stagehand/sc_form_fill_overwrites__sh.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_fill_overwrites.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Fills the same input twice; fill semantics require clear-then-set, so only the second value must remain.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "second_fill_ok",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "second-77",
15
+ "kind": "saved_equals",
16
+ "label": "second_value_only",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#overwrite",
32
+ "value": "first-11"
33
+ },
34
+ {
35
+ "op": "fill",
36
+ "selector": "#overwrite",
37
+ "value": "second-77"
38
+ },
39
+ {
40
+ "op": "input_value",
41
+ "save_as": "answer",
42
+ "selector": "#overwrite"
43
+ }
44
+ ]
45
+ },
46
+ "features": [
47
+ "fw.stagehand.op.new_page",
48
+ "fw.stagehand.op.goto",
49
+ "fw.stagehand.op.fill",
50
+ "fw.stagehand.op.input_value",
51
+ "cdp.input.insert_text"
52
+ ],
53
+ "grader": {
54
+ "checks": [
55
+ "answer_matches_expected"
56
+ ],
57
+ "endpoint": "/__grade__/expected_answer",
58
+ "kind": "server_side"
59
+ },
60
+ "layer": "L1",
61
+ "scene": {
62
+ "kind": "self_hosted_fixture",
63
+ "url": "/v0_4/forms"
64
+ },
65
+ "subset_id": "l1.stagehand",
66
+ "tags": [
67
+ "family.forms",
68
+ "version.v0_4"
69
+ ],
70
+ "task_id": "sc_form_fill_overwrites__sh",
71
+ "task_version": 1,
72
+ "timeouts": {
73
+ "hard_kill_ms": 45000,
74
+ "task_ms": 30000
75
+ },
76
+ "title": "A second fill replaces the first value (stagehand)"
77
+ }
definitions/tasks/L1/stagehand/sc_form_fill_readback__sh.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_fill_readback.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Fills the #field text input with a distinctive value and reads it back via input_value. Exercises the fill contract end to end: the driver must set the input's live value and observe it, proving keyboard/value semantics rather than just a DOM attribute.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "fill_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "bench-fill-7q",
15
+ "kind": "saved_equals",
16
+ "label": "value_roundtrips",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#field",
32
+ "value": "bench-fill-7q"
33
+ },
34
+ {
35
+ "op": "input_value",
36
+ "save_as": "answer",
37
+ "selector": "#field"
38
+ }
39
+ ]
40
+ },
41
+ "features": [
42
+ "fw.stagehand.op.new_page",
43
+ "fw.stagehand.op.goto",
44
+ "fw.stagehand.op.fill",
45
+ "fw.stagehand.op.input_value",
46
+ "cdp.input.insert_text"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/l1/core"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.forms",
63
+ "version.v0_4"
64
+ ],
65
+ "task_id": "sc_form_fill_readback__sh",
66
+ "task_version": 1,
67
+ "timeouts": {
68
+ "hard_kill_ms": 45000,
69
+ "task_ms": 30000
70
+ },
71
+ "title": "Fill a text input and read the value back (stagehand)"
72
+ }
definitions/tasks/L1/stagehand/sc_form_focus_active_element__sh.json ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_focus_active_element.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Focuses the core text field through each driver's public route or documented Runtime.evaluate fallback, then verifies the page's active element.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "focus_route_completed",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "field",
15
+ "kind": "saved_equals",
16
+ "label": "active_element_changed",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "focus",
31
+ "selector": "#field"
32
+ },
33
+ {
34
+ "expression": "document.activeElement && document.activeElement.id",
35
+ "op": "evaluate",
36
+ "save_as": "answer"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.focus",
44
+ "fw.stagehand.op.evaluate",
45
+ "cdp.dom.focus",
46
+ "cdp.runtime.evaluate"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/l1/core"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.forms",
63
+ "version.v0_4",
64
+ "purpose.issue_106"
65
+ ],
66
+ "task_id": "sc_form_focus_active_element__sh",
67
+ "task_version": 1,
68
+ "timeouts": {
69
+ "hard_kill_ms": 45000,
70
+ "task_ms": 30000
71
+ },
72
+ "title": "The driver focus route changes document.activeElement (stagehand)"
73
+ }
definitions/tasks/L1/stagehand/sc_form_label_click_toggles__sh.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_label_click_toggles.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Clicks the label (not the checkbox) and reads the change-handler output; label activation semantics must reach the associated control.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "label_click_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "via-label-on",
15
+ "kind": "saved_equals",
16
+ "label": "change_fired",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "click",
31
+ "selector": "#via-label"
32
+ },
33
+ {
34
+ "op": "text_content",
35
+ "save_as": "answer",
36
+ "selector": "#label-out"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.click",
44
+ "fw.stagehand.op.text_content",
45
+ "cdp.input.dispatch_mouse_event"
46
+ ],
47
+ "grader": {
48
+ "checks": [
49
+ "answer_matches_expected"
50
+ ],
51
+ "endpoint": "/__grade__/expected_answer",
52
+ "kind": "server_side"
53
+ },
54
+ "layer": "L1",
55
+ "scene": {
56
+ "kind": "self_hosted_fixture",
57
+ "url": "/v0_4/forms"
58
+ },
59
+ "subset_id": "l1.stagehand",
60
+ "tags": [
61
+ "family.forms",
62
+ "version.v0_4"
63
+ ],
64
+ "task_id": "sc_form_label_click_toggles__sh",
65
+ "task_version": 1,
66
+ "timeouts": {
67
+ "hard_kill_ms": 45000,
68
+ "task_ms": 30000
69
+ },
70
+ "title": "Clicking a label toggles its control and fires change (stagehand)"
71
+ }
definitions/tasks/L1/stagehand/sc_form_press_enter_handler__sh.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_press_enter_handler.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Presses Enter inside a text field whose keydown handler records the event; exercises real key-event dispatch, not value mutation.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "press_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "enter-65",
15
+ "kind": "saved_equals",
16
+ "label": "keydown_seen",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "key": "Enter",
31
+ "op": "press",
32
+ "selector": "#enter-field"
33
+ },
34
+ {
35
+ "op": "text_content",
36
+ "save_as": "answer",
37
+ "selector": "#enter-out"
38
+ }
39
+ ]
40
+ },
41
+ "features": [
42
+ "fw.stagehand.op.new_page",
43
+ "fw.stagehand.op.goto",
44
+ "fw.stagehand.op.press",
45
+ "fw.stagehand.op.text_content",
46
+ "cdp.input.dispatch_key_event"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/v0_4/forms"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.forms",
63
+ "version.v0_4"
64
+ ],
65
+ "task_id": "sc_form_press_enter_handler__sh",
66
+ "task_version": 1,
67
+ "timeouts": {
68
+ "hard_kill_ms": 45000,
69
+ "task_ms": 30000
70
+ },
71
+ "title": "press Enter reaches the focused field's key handler (stagehand)"
72
+ }
definitions/tasks/L1/stagehand/sc_form_radio_pick__sh.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_radio_pick.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Clicks the second radio in a group and derives which one the group reports as checked.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "click_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "opt-b",
15
+ "kind": "saved_equals",
16
+ "label": "b_selected",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "click",
31
+ "selector": "#opt-b"
32
+ },
33
+ {
34
+ "expression": "(document.querySelector('input[name=opt]:checked') || {id: 'none'}).id",
35
+ "op": "evaluate",
36
+ "save_as": "answer"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.click",
44
+ "fw.stagehand.op.evaluate",
45
+ "cdp.input.dispatch_mouse_event"
46
+ ],
47
+ "grader": {
48
+ "checks": [
49
+ "answer_matches_expected"
50
+ ],
51
+ "endpoint": "/__grade__/expected_answer",
52
+ "kind": "server_side"
53
+ },
54
+ "layer": "L1",
55
+ "scene": {
56
+ "kind": "self_hosted_fixture",
57
+ "url": "/v0_4/forms"
58
+ },
59
+ "subset_id": "l1.stagehand",
60
+ "tags": [
61
+ "family.forms",
62
+ "version.v0_4"
63
+ ],
64
+ "task_id": "sc_form_radio_pick__sh",
65
+ "task_version": 1,
66
+ "timeouts": {
67
+ "hard_kill_ms": 45000,
68
+ "task_ms": 30000
69
+ },
70
+ "title": "Clicking one radio selects it and deselects siblings (stagehand)"
71
+ }
definitions/tasks/L1/stagehand/sc_form_select_option__sh.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_select_option.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Selects the Engineering option in the #dept dropdown on the probe controls page; the page's change handler writes 'picked:eng' into #dept-out. Reads it back. Exercises select_option and confirms the driver triggers the change event rather than only setting value.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "select_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "picked:eng",
15
+ "kind": "saved_equals",
16
+ "label": "dept_picked_eng",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "select_option",
31
+ "selector": "#dept",
32
+ "value": "eng"
33
+ },
34
+ {
35
+ "op": "text_content",
36
+ "save_as": "answer",
37
+ "selector": "#dept-out"
38
+ }
39
+ ]
40
+ },
41
+ "features": [
42
+ "fw.stagehand.op.new_page",
43
+ "fw.stagehand.op.goto",
44
+ "fw.stagehand.op.select_option",
45
+ "fw.stagehand.op.text_content",
46
+ "cdp.dom.set_attribute_value"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/v0_3/probe/controls"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.forms",
63
+ "version.v0_4"
64
+ ],
65
+ "task_id": "sc_form_select_option__sh",
66
+ "task_version": 1,
67
+ "timeouts": {
68
+ "hard_kill_ms": 45000,
69
+ "task_ms": 30000
70
+ },
71
+ "title": "Select a dropdown option and observe the change event (stagehand)"
72
+ }
definitions/tasks/L1/stagehand/sc_form_submit_roundtrip__sh.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_submit_roundtrip.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Fills the query input, clicks submit, waits for the reloaded document, and reads the server-echoed query value. Exercises the full fill -> submit -> navigation -> readback chain.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "submit_ok",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "submitted:probe-624",
15
+ "kind": "saved_equals",
16
+ "label": "query_echoed",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#q",
32
+ "value": "probe-624"
33
+ },
34
+ {
35
+ "op": "click",
36
+ "selector": "#q-submit"
37
+ },
38
+ {
39
+ "expression": "location.search.indexOf('q=') >= 0 && !!document.getElementById('q-echo')",
40
+ "op": "wait_for_function"
41
+ },
42
+ {
43
+ "op": "text_content",
44
+ "save_as": "answer",
45
+ "selector": "#q-echo"
46
+ }
47
+ ]
48
+ },
49
+ "features": [
50
+ "fw.stagehand.op.new_page",
51
+ "fw.stagehand.op.goto",
52
+ "fw.stagehand.op.fill",
53
+ "fw.stagehand.op.click",
54
+ "fw.stagehand.op.wait_for_function",
55
+ "fw.stagehand.op.text_content",
56
+ "cdp.input.insert_text",
57
+ "cdp.page.navigate"
58
+ ],
59
+ "grader": {
60
+ "checks": [
61
+ "answer_matches_expected"
62
+ ],
63
+ "endpoint": "/__grade__/expected_answer",
64
+ "kind": "server_side"
65
+ },
66
+ "layer": "L1",
67
+ "scene": {
68
+ "kind": "self_hosted_fixture",
69
+ "url": "/v0_4/forms"
70
+ },
71
+ "subset_id": "l1.stagehand",
72
+ "tags": [
73
+ "family.forms",
74
+ "version.v0_4"
75
+ ],
76
+ "task_id": "sc_form_submit_roundtrip__sh",
77
+ "task_version": 1,
78
+ "timeouts": {
79
+ "hard_kill_ms": 45000,
80
+ "task_ms": 30000
81
+ },
82
+ "title": "Submit a GET form and read the echoed query (stagehand)"
83
+ }
definitions/tasks/L1/stagehand/sc_form_textarea_fill__sh.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/form_textarea_fill.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Fills a textarea and reads its live value through the driver.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "fill_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "ta-line-9",
15
+ "kind": "saved_equals",
16
+ "label": "textarea_roundtrip",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "fill",
31
+ "selector": "#notes",
32
+ "value": "ta-line-9"
33
+ },
34
+ {
35
+ "op": "input_value",
36
+ "save_as": "answer",
37
+ "selector": "#notes"
38
+ }
39
+ ]
40
+ },
41
+ "features": [
42
+ "fw.stagehand.op.new_page",
43
+ "fw.stagehand.op.goto",
44
+ "fw.stagehand.op.fill",
45
+ "fw.stagehand.op.input_value",
46
+ "cdp.input.insert_text"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/v0_4/forms"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.forms",
63
+ "version.v0_4"
64
+ ],
65
+ "task_id": "sc_form_textarea_fill__sh",
66
+ "task_version": 1,
67
+ "timeouts": {
68
+ "hard_kill_ms": 45000,
69
+ "task_ms": 30000
70
+ },
71
+ "title": "Fill a textarea and read it back (stagehand)"
72
+ }
definitions/tasks/L1/stagehand/sc_fr_child_posts_parent__sh.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_child_posts_parent.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Both static children post a greeting on load; the parent collects them and answers with the sorted join, proving frame scripts executed and the message channel works.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "messages_arrived",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "hello-a|hello-b",
15
+ "kind": "saved_equals",
16
+ "label": "both_children_posted",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "window.__msgs && window.__msgs.length >= 2",
31
+ "op": "wait_for_function"
32
+ },
33
+ {
34
+ "expression": "window.__msgs.slice().sort().join('|')",
35
+ "op": "evaluate",
36
+ "save_as": "answer"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.wait_for_function",
44
+ "fw.stagehand.op.evaluate",
45
+ "cdp.page.frame_attached",
46
+ "cdp.runtime.evaluate"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/v0_4/frames"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.frames_oopif",
63
+ "version.v0_4"
64
+ ],
65
+ "task_id": "sc_fr_child_posts_parent__sh",
66
+ "task_version": 1,
67
+ "timeouts": {
68
+ "hard_kill_ms": 45000,
69
+ "task_ms": 30000
70
+ },
71
+ "title": "Child frames deliver postMessage to the parent document (stagehand)"
72
+ }
definitions/tasks/L1/stagehand/sc_fr_child_self_navigation__sh.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_child_self_navigation.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Sets a marker on the parent, navigates the first child frame to a new URL, and answers with the child's new message plus proof the parent was not reloaded.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "child_navigated",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "child-nav2-42:top-alive",
15
+ "kind": "saved_equals",
16
+ "label": "parent_survived",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "window.__top_alive = 9; frames[0].location.href = '/v0_4/frames/child?tag=nav2'; 'navigating'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "expression": "!!frames[0].document.getElementById('msg') && frames[0].document.getElementById('msg').textContent.indexOf('nav2') !== -1",
35
+ "op": "wait_for_function"
36
+ },
37
+ {
38
+ "expression": "frames[0].document.getElementById('msg').textContent + ':' + (window.__top_alive === 9 ? 'top-alive' : 'top-reloaded')",
39
+ "op": "evaluate",
40
+ "save_as": "answer"
41
+ }
42
+ ]
43
+ },
44
+ "features": [
45
+ "fw.stagehand.op.new_page",
46
+ "fw.stagehand.op.goto",
47
+ "fw.stagehand.op.evaluate",
48
+ "fw.stagehand.op.wait_for_function",
49
+ "cdp.page.frame_navigated",
50
+ "cdp.runtime.evaluate"
51
+ ],
52
+ "grader": {
53
+ "checks": [
54
+ "answer_matches_expected"
55
+ ],
56
+ "endpoint": "/__grade__/expected_answer",
57
+ "kind": "server_side"
58
+ },
59
+ "layer": "L1",
60
+ "scene": {
61
+ "kind": "self_hosted_fixture",
62
+ "url": "/v0_4/frames"
63
+ },
64
+ "subset_id": "l1.stagehand",
65
+ "tags": [
66
+ "family.frames_oopif",
67
+ "version.v0_4"
68
+ ],
69
+ "task_id": "sc_fr_child_self_navigation__sh",
70
+ "task_version": 1,
71
+ "timeouts": {
72
+ "hard_kill_ms": 45000,
73
+ "task_ms": 30000
74
+ },
75
+ "title": "A child frame navigates itself while the parent document survives (stagehand)"
76
+ }
definitions/tasks/L1/stagehand/sc_fr_cross_origin_blocked__sh.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_cross_origin_blocked.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Inserts an iframe served from the localhost alias of the fixture origin (different origin string, same server), waits for it to load, and confirms the same-origin policy throws SecurityError on document access.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "xo_frame_loaded",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "blocked:SecurityError",
15
+ "kind": "saved_equals",
16
+ "label": "same_origin_policy_enforced",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "var f = document.createElement('iframe'); f.src = 'http://localhost:' + location.port + '/v0_4/frames/child?tag=xb'; f.id = 'xo'; f.onload = function () { window.__xo_loaded = true; }; document.getElementById('slot').appendChild(f); 'inserted'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "expression": "window.__xo_loaded === true",
35
+ "op": "wait_for_function"
36
+ },
37
+ {
38
+ "expression": "(function () { try { var d = frames[2].document; return 'leaked:' + (d ? 'doc' : 'nodoc'); } catch (e) { return 'blocked:' + e.name; } })()",
39
+ "op": "evaluate",
40
+ "save_as": "answer"
41
+ }
42
+ ]
43
+ },
44
+ "features": [
45
+ "fw.stagehand.op.new_page",
46
+ "fw.stagehand.op.goto",
47
+ "fw.stagehand.op.evaluate",
48
+ "fw.stagehand.op.wait_for_function",
49
+ "cdp.page.frame_attached",
50
+ "cdp.runtime.evaluate"
51
+ ],
52
+ "grader": {
53
+ "checks": [
54
+ "answer_matches_expected"
55
+ ],
56
+ "endpoint": "/__grade__/expected_answer",
57
+ "kind": "server_side"
58
+ },
59
+ "layer": "L1",
60
+ "scene": {
61
+ "kind": "self_hosted_fixture",
62
+ "url": "/v0_4/frames"
63
+ },
64
+ "subset_id": "l1.stagehand",
65
+ "tags": [
66
+ "family.frames_oopif",
67
+ "version.v0_4"
68
+ ],
69
+ "task_id": "sc_fr_cross_origin_blocked__sh",
70
+ "task_version": 1,
71
+ "timeouts": {
72
+ "hard_kill_ms": 45000,
73
+ "task_ms": 30000
74
+ },
75
+ "title": "Top-document JS cannot reach into a cross-origin iframe (stagehand)"
76
+ }
definitions/tasks/L1/stagehand/sc_fr_dynamic_iframe_attach__sh.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_dynamic_iframe_attach.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Inserts a third iframe after load and reads its script-computed message once the new frame's document is live.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "frame_attached",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "child-dyn-42",
15
+ "kind": "saved_equals",
16
+ "label": "dynamic_child_text",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "var f = document.createElement('iframe'); f.src = '/v0_4/frames/child?tag=dyn'; document.getElementById('slot').appendChild(f); 'inserted'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "expression": "window.frames.length === 3 && !!frames[2].document.getElementById('msg') && frames[2].document.getElementById('msg').textContent.indexOf('dyn') !== -1",
35
+ "op": "wait_for_function"
36
+ },
37
+ {
38
+ "expression": "frames[2].document.getElementById('msg').textContent",
39
+ "op": "evaluate",
40
+ "save_as": "answer"
41
+ }
42
+ ]
43
+ },
44
+ "features": [
45
+ "fw.stagehand.op.new_page",
46
+ "fw.stagehand.op.goto",
47
+ "fw.stagehand.op.evaluate",
48
+ "fw.stagehand.op.wait_for_function",
49
+ "cdp.page.frame_attached",
50
+ "cdp.runtime.evaluate"
51
+ ],
52
+ "grader": {
53
+ "checks": [
54
+ "answer_matches_expected"
55
+ ],
56
+ "endpoint": "/__grade__/expected_answer",
57
+ "kind": "server_side"
58
+ },
59
+ "layer": "L1",
60
+ "scene": {
61
+ "kind": "self_hosted_fixture",
62
+ "url": "/v0_4/frames"
63
+ },
64
+ "subset_id": "l1.stagehand",
65
+ "tags": [
66
+ "family.frames_oopif",
67
+ "version.v0_4"
68
+ ],
69
+ "task_id": "sc_fr_dynamic_iframe_attach__sh",
70
+ "task_version": 1,
71
+ "timeouts": {
72
+ "hard_kill_ms": 45000,
73
+ "task_ms": 30000
74
+ },
75
+ "title": "A dynamically inserted iframe attaches and runs its document (stagehand)"
76
+ }
definitions/tasks/L1/stagehand/sc_fr_frame_tree_shape__sh.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_frame_tree_shape.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Counts frames before and after inserting a child that itself embeds a grandchild, answering with the observed growth of the reachable same-origin tree.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "tree_settled",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "2>3>4",
15
+ "kind": "saved_equals",
16
+ "label": "tree_shape",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "window.__c0 = window.frames.length; var f = document.createElement('iframe'); f.src = '/v0_4/frames/child?tag=shape&deep=1'; document.getElementById('slot').appendChild(f); 'inserted'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "expression": "window.frames.length === 3 && frames[2].frames.length === 1",
35
+ "op": "wait_for_function"
36
+ },
37
+ {
38
+ "expression": "window.__c0 + '>' + window.frames.length + '>' + (window.frames.length + frames[2].frames.length)",
39
+ "op": "evaluate",
40
+ "save_as": "answer"
41
+ }
42
+ ]
43
+ },
44
+ "features": [
45
+ "fw.stagehand.op.new_page",
46
+ "fw.stagehand.op.goto",
47
+ "fw.stagehand.op.evaluate",
48
+ "fw.stagehand.op.wait_for_function",
49
+ "cdp.page.get_frame_tree",
50
+ "cdp.page.frame_attached"
51
+ ],
52
+ "grader": {
53
+ "checks": [
54
+ "answer_matches_expected"
55
+ ],
56
+ "endpoint": "/__grade__/expected_answer",
57
+ "kind": "server_side"
58
+ },
59
+ "layer": "L1",
60
+ "scene": {
61
+ "kind": "self_hosted_fixture",
62
+ "url": "/v0_4/frames"
63
+ },
64
+ "subset_id": "l1.stagehand",
65
+ "tags": [
66
+ "family.frames_oopif",
67
+ "version.v0_4"
68
+ ],
69
+ "task_id": "sc_fr_frame_tree_shape__sh",
70
+ "task_version": 1,
71
+ "timeouts": {
72
+ "hard_kill_ms": 45000,
73
+ "task_ms": 30000
74
+ },
75
+ "title": "The live frame tree reflects static plus dynamic children (stagehand)"
76
+ }
definitions/tasks/L1/stagehand/sc_fr_iframe_detach__sh.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_iframe_detach.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Records the initial frame count, removes the first static iframe, waits for the tree to shrink, and answers with the before:after counts.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "frame_detached",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "2:1",
15
+ "kind": "saved_equals",
16
+ "label": "count_shrank",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "window.__before = window.frames.length; document.getElementById('fa').remove(); 'removed'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "expression": "window.frames.length === window.__before - 1",
35
+ "op": "wait_for_function"
36
+ },
37
+ {
38
+ "expression": "window.__before + ':' + window.frames.length",
39
+ "op": "evaluate",
40
+ "save_as": "answer"
41
+ }
42
+ ]
43
+ },
44
+ "features": [
45
+ "fw.stagehand.op.new_page",
46
+ "fw.stagehand.op.goto",
47
+ "fw.stagehand.op.evaluate",
48
+ "fw.stagehand.op.wait_for_function",
49
+ "cdp.page.frame_detached",
50
+ "cdp.runtime.evaluate"
51
+ ],
52
+ "grader": {
53
+ "checks": [
54
+ "answer_matches_expected"
55
+ ],
56
+ "endpoint": "/__grade__/expected_answer",
57
+ "kind": "server_side"
58
+ },
59
+ "layer": "L1",
60
+ "scene": {
61
+ "kind": "self_hosted_fixture",
62
+ "url": "/v0_4/frames"
63
+ },
64
+ "subset_id": "l1.stagehand",
65
+ "tags": [
66
+ "family.frames_oopif",
67
+ "version.v0_4"
68
+ ],
69
+ "task_id": "sc_fr_iframe_detach__sh",
70
+ "task_version": 1,
71
+ "timeouts": {
72
+ "hard_kill_ms": 45000,
73
+ "task_ms": 30000
74
+ },
75
+ "title": "Removing an iframe detaches its frame from the tree (stagehand)"
76
+ }
definitions/tasks/L1/stagehand/sc_fr_nested_two_levels__sh.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_nested_two_levels.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Inserts a child that embeds its own child; the top document reads the grandchild's script-computed message through two levels of same-origin frame traversal.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "grandchild_loaded",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "child-leaf-42",
15
+ "kind": "saved_equals",
16
+ "label": "grandchild_text",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "var f = document.createElement('iframe'); f.src = '/v0_4/frames/child?tag=mid&deep=1'; document.getElementById('slot').appendChild(f); 'inserted'",
31
+ "op": "evaluate"
32
+ },
33
+ {
34
+ "expression": "window.frames.length === 3 && frames[2].frames.length === 1 && !!frames[2].frames[0].document.getElementById('msg') && frames[2].frames[0].document.getElementById('msg').textContent.indexOf('leaf') !== -1",
35
+ "op": "wait_for_function"
36
+ },
37
+ {
38
+ "expression": "frames[2].frames[0].document.getElementById('msg').textContent",
39
+ "op": "evaluate",
40
+ "save_as": "answer"
41
+ }
42
+ ]
43
+ },
44
+ "features": [
45
+ "fw.stagehand.op.new_page",
46
+ "fw.stagehand.op.goto",
47
+ "fw.stagehand.op.evaluate",
48
+ "fw.stagehand.op.wait_for_function",
49
+ "cdp.page.frame_attached",
50
+ "cdp.page.get_frame_tree"
51
+ ],
52
+ "grader": {
53
+ "checks": [
54
+ "answer_matches_expected"
55
+ ],
56
+ "endpoint": "/__grade__/expected_answer",
57
+ "kind": "server_side"
58
+ },
59
+ "layer": "L1",
60
+ "scene": {
61
+ "kind": "self_hosted_fixture",
62
+ "url": "/v0_4/frames"
63
+ },
64
+ "subset_id": "l1.stagehand",
65
+ "tags": [
66
+ "family.frames_oopif",
67
+ "version.v0_4"
68
+ ],
69
+ "task_id": "sc_fr_nested_two_levels__sh",
70
+ "task_version": 1,
71
+ "timeouts": {
72
+ "hard_kill_ms": 45000,
73
+ "task_ms": 30000
74
+ },
75
+ "title": "A grandchild frame two levels down is reachable through the frame tree (stagehand)"
76
+ }
definitions/tasks/L1/stagehand/sc_fr_sibling_isolation__sh.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_sibling_isolation.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Pokes a computed value into child A's note element and answers with both children's notes, proving sibling frame documents are distinct.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "poke_ok",
11
+ "step": 3
12
+ },
13
+ {
14
+ "expected": "poked-25:idle",
15
+ "kind": "saved_equals",
16
+ "label": "sibling_untouched",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "window.frames.length === 2 && !!frames[0].document.getElementById('note') && !!frames[1].document.getElementById('note')",
31
+ "op": "wait_for_function"
32
+ },
33
+ {
34
+ "expression": "frames[0].document.getElementById('note').textContent = 'poked-' + (5 * 5); 'poked'",
35
+ "op": "evaluate"
36
+ },
37
+ {
38
+ "expression": "frames[0].document.getElementById('note').textContent + ':' + frames[1].document.getElementById('note').textContent",
39
+ "op": "evaluate",
40
+ "save_as": "answer"
41
+ }
42
+ ]
43
+ },
44
+ "features": [
45
+ "fw.stagehand.op.new_page",
46
+ "fw.stagehand.op.goto",
47
+ "fw.stagehand.op.wait_for_function",
48
+ "fw.stagehand.op.evaluate",
49
+ "cdp.page.get_frame_tree",
50
+ "cdp.runtime.evaluate"
51
+ ],
52
+ "grader": {
53
+ "checks": [
54
+ "answer_matches_expected"
55
+ ],
56
+ "endpoint": "/__grade__/expected_answer",
57
+ "kind": "server_side"
58
+ },
59
+ "layer": "L1",
60
+ "scene": {
61
+ "kind": "self_hosted_fixture",
62
+ "url": "/v0_4/frames"
63
+ },
64
+ "subset_id": "l1.stagehand",
65
+ "tags": [
66
+ "family.frames_oopif",
67
+ "version.v0_4"
68
+ ],
69
+ "task_id": "sc_fr_sibling_isolation__sh",
70
+ "task_version": 1,
71
+ "timeouts": {
72
+ "hard_kill_ms": 45000,
73
+ "task_ms": 30000
74
+ },
75
+ "title": "Writing into one child frame leaves its sibling untouched (stagehand)"
76
+ }
definitions/tasks/L1/stagehand/sc_fr_static_child_read__sh.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/fr_static_child_read.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Waits for both static children to load and reads the first child's script-computed message through the frame tree.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "children_loaded",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "child-a-42",
15
+ "kind": "saved_equals",
16
+ "label": "child_text",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "expression": "window.frames.length === 2 && !!frames[0].document.getElementById('msg') && frames[0].document.getElementById('msg').textContent.length > 0",
31
+ "op": "wait_for_function"
32
+ },
33
+ {
34
+ "expression": "frames[0].document.getElementById('msg').textContent",
35
+ "op": "evaluate",
36
+ "save_as": "answer"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.wait_for_function",
44
+ "fw.stagehand.op.evaluate",
45
+ "cdp.page.frame_attached",
46
+ "cdp.runtime.evaluate"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/v0_4/frames"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.frames_oopif",
63
+ "version.v0_4"
64
+ ],
65
+ "task_id": "sc_fr_static_child_read__sh",
66
+ "task_version": 1,
67
+ "timeouts": {
68
+ "hard_kill_ms": 45000,
69
+ "task_ms": 30000
70
+ },
71
+ "title": "Read text out of a statically embedded same-origin iframe (stagehand)"
72
+ }
definitions/tasks/L1/stagehand/sc_loc_adjacent_sibling__sh.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/loc_adjacent_sibling.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Reads #lead + .next through the driver's text surface.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "read_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "adjacent-33",
15
+ "kind": "saved_equals",
16
+ "label": "adjacent_match",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "text_content",
31
+ "save_as": "answer",
32
+ "selector": "#lead + .next"
33
+ }
34
+ ]
35
+ },
36
+ "features": [
37
+ "fw.stagehand.op.new_page",
38
+ "fw.stagehand.op.goto",
39
+ "fw.stagehand.op.text_content",
40
+ "cdp.dom.query_selector"
41
+ ],
42
+ "grader": {
43
+ "checks": [
44
+ "answer_matches_expected"
45
+ ],
46
+ "endpoint": "/__grade__/expected_answer",
47
+ "kind": "server_side"
48
+ },
49
+ "layer": "L1",
50
+ "scene": {
51
+ "kind": "self_hosted_fixture",
52
+ "url": "/v0_4/locator"
53
+ },
54
+ "subset_id": "l1.stagehand",
55
+ "tags": [
56
+ "family.locator",
57
+ "version.v0_4"
58
+ ],
59
+ "task_id": "sc_loc_adjacent_sibling__sh",
60
+ "task_version": 1,
61
+ "timeouts": {
62
+ "hard_kill_ms": 45000,
63
+ "task_ms": 30000
64
+ },
65
+ "title": "Resolve an adjacent-sibling combinator (stagehand)"
66
+ }
definitions/tasks/L1/stagehand/sc_loc_attribute_selector_click__sh.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/loc_attribute_selector_click.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Clicks a button addressed by [data-x=\"go-7\"] and reads its handler output. Exercises attribute-selector support in the driver's element resolution.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "click_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "attr-hit-go-7",
15
+ "kind": "saved_equals",
16
+ "label": "handler_saw_attr",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "click",
31
+ "selector": "button[data-x=\"go-7\"]"
32
+ },
33
+ {
34
+ "op": "text_content",
35
+ "save_as": "answer",
36
+ "selector": "#attr-out"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.click",
44
+ "fw.stagehand.op.text_content",
45
+ "cdp.dom.query_selector",
46
+ "cdp.input.dispatch_mouse_event"
47
+ ],
48
+ "grader": {
49
+ "checks": [
50
+ "answer_matches_expected"
51
+ ],
52
+ "endpoint": "/__grade__/expected_answer",
53
+ "kind": "server_side"
54
+ },
55
+ "layer": "L1",
56
+ "scene": {
57
+ "kind": "self_hosted_fixture",
58
+ "url": "/v0_4/locator"
59
+ },
60
+ "subset_id": "l1.stagehand",
61
+ "tags": [
62
+ "family.locator",
63
+ "version.v0_4"
64
+ ],
65
+ "task_id": "sc_loc_attribute_selector_click__sh",
66
+ "task_version": 1,
67
+ "timeouts": {
68
+ "hard_kill_ms": 45000,
69
+ "task_ms": 30000
70
+ },
71
+ "title": "Click an element located by attribute selector (stagehand)"
72
+ }
definitions/tasks/L1/stagehand/sc_loc_class_count__sh.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/loc_class_count.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Counts .card elements through the driver's count surface.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "count_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "4",
15
+ "kind": "saved_equals",
16
+ "label": "four_cards",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "count",
31
+ "save_as": "answer",
32
+ "selector": ".card"
33
+ }
34
+ ]
35
+ },
36
+ "features": [
37
+ "fw.stagehand.op.new_page",
38
+ "fw.stagehand.op.goto",
39
+ "fw.stagehand.op.count",
40
+ "cdp.dom.query_selector_all"
41
+ ],
42
+ "grader": {
43
+ "checks": [
44
+ "answer_matches_expected"
45
+ ],
46
+ "endpoint": "/__grade__/expected_answer",
47
+ "kind": "server_side"
48
+ },
49
+ "layer": "L1",
50
+ "scene": {
51
+ "kind": "self_hosted_fixture",
52
+ "url": "/v0_4/locator"
53
+ },
54
+ "subset_id": "l1.stagehand",
55
+ "tags": [
56
+ "family.locator",
57
+ "version.v0_4"
58
+ ],
59
+ "task_id": "sc_loc_class_count__sh",
60
+ "task_version": 1,
61
+ "timeouts": {
62
+ "hard_kill_ms": 45000,
63
+ "task_ms": 30000
64
+ },
65
+ "title": "Count elements matching a class selector (stagehand)"
66
+ }
definitions/tasks/L1/stagehand/sc_loc_descendant_scope__sh.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/loc_descendant_scope.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Reads #zone .value where an identical .value also exists outside #zone; the scoped match must win.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "read_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "zone-val-21",
15
+ "kind": "saved_equals",
16
+ "label": "scoped_match",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "text_content",
31
+ "save_as": "answer",
32
+ "selector": "#zone .value"
33
+ }
34
+ ]
35
+ },
36
+ "features": [
37
+ "fw.stagehand.op.new_page",
38
+ "fw.stagehand.op.goto",
39
+ "fw.stagehand.op.text_content",
40
+ "cdp.dom.query_selector"
41
+ ],
42
+ "grader": {
43
+ "checks": [
44
+ "answer_matches_expected"
45
+ ],
46
+ "endpoint": "/__grade__/expected_answer",
47
+ "kind": "server_side"
48
+ },
49
+ "layer": "L1",
50
+ "scene": {
51
+ "kind": "self_hosted_fixture",
52
+ "url": "/v0_4/locator"
53
+ },
54
+ "subset_id": "l1.stagehand",
55
+ "tags": [
56
+ "family.locator",
57
+ "version.v0_4"
58
+ ],
59
+ "task_id": "sc_loc_descendant_scope__sh",
60
+ "task_version": 1,
61
+ "timeouts": {
62
+ "hard_kill_ms": 45000,
63
+ "task_ms": 30000
64
+ },
65
+ "title": "A descendant selector stays inside its ancestor (stagehand)"
66
+ }
definitions/tasks/L1/stagehand/sc_loc_first_match_semantics__sh.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_generated_from": "tasks/scenarios/loc_first_match_semantics.scenario.json",
3
+ "artifact_profile": "l1_standard",
4
+ "chrome_gate": "required",
5
+ "description": "Clicks .btn where two buttons match; querySelector semantics require the FIRST one, whose handler records its rank.",
6
+ "driver": {
7
+ "checks": [
8
+ {
9
+ "kind": "step_ok",
10
+ "label": "click_ok",
11
+ "step": 2
12
+ },
13
+ {
14
+ "expected": "clicked-first",
15
+ "kind": "saved_equals",
16
+ "label": "first_won",
17
+ "name": "answer"
18
+ }
19
+ ],
20
+ "kind": "framework_stagehand",
21
+ "steps": [
22
+ {
23
+ "op": "new_page"
24
+ },
25
+ {
26
+ "op": "goto",
27
+ "url": "{fixture_url}"
28
+ },
29
+ {
30
+ "op": "click",
31
+ "selector": ".btn"
32
+ },
33
+ {
34
+ "op": "text_content",
35
+ "save_as": "answer",
36
+ "selector": "#btn-out"
37
+ }
38
+ ]
39
+ },
40
+ "features": [
41
+ "fw.stagehand.op.new_page",
42
+ "fw.stagehand.op.goto",
43
+ "fw.stagehand.op.click",
44
+ "fw.stagehand.op.text_content",
45
+ "cdp.dom.query_selector"
46
+ ],
47
+ "grader": {
48
+ "checks": [
49
+ "answer_matches_expected"
50
+ ],
51
+ "endpoint": "/__grade__/expected_answer",
52
+ "kind": "server_side"
53
+ },
54
+ "layer": "L1",
55
+ "scene": {
56
+ "kind": "self_hosted_fixture",
57
+ "url": "/v0_4/locator"
58
+ },
59
+ "subset_id": "l1.stagehand",
60
+ "tags": [
61
+ "family.locator",
62
+ "version.v0_4"
63
+ ],
64
+ "task_id": "sc_loc_first_match_semantics__sh",
65
+ "task_version": 1,
66
+ "timeouts": {
67
+ "hard_kill_ms": 45000,
68
+ "task_ms": 30000
69
+ },
70
+ "title": "A multi-match selector acts on the first match (stagehand)"
71
+ }