{
"toolName": "inputText",
"page": "https://www.saucedemo.com/",
"parameters": {
"text": "standard_user",
"finalizeWithSubmit": false,
"selector": {
"element": [
"[data-test='username']",
"[name='user-name']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'standard_user' into: <input class=\"input_error form_input\" placeholder=\"Username\" type=\"text\" data-test=\"username\" id=\"user-name\" name=\"user-name\" autocorrect=\"off\" autocapitalize=\"none\" value=\"\" style=\"\">"
}
}{
"toolName": "inputText",
"page": "https://www.saucedemo.com/",
"parameters": {
"text": "secret_sauce",
"finalizeWithSubmit": true,
"selector": {
"element": [
"[data-test='password']",
"[name='password']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'secret_sauce' into: <input class=\"input_error form_input\" placeholder=\"Password\" type=\"password\" data-test=\"password\" id=\"password\" name=\"password\" autocorrect=\"off\" autocapitalize=\"none\" value=\"\" style=\"\">"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://www.saucedemo.com/inventory.html",
"parameters": {
"details": "I have successfully logged in as 'standard_user' and am now on the inventory page.",
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}{
"toolName": "click",
"page": "https://www.checklyhq.com/",
"parameters": {
"button": "left",
"selector": {
"element": [
"#nav > nav > div:nth-of-type(1) > div:nth-of-type(1) > button:nth-of-type(2)",
"(.//button[normalize-space(.)='Resources'])[1]",
"nav.container > div:nth-of-type(1) > div:nth-of-type(1) > button:nth-of-type(2)"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <button class=\"nav-item\">Resources</button>"
}
}{
"toolName": "click",
"page": "https://www.checklyhq.com/",
"parameters": {
"button": "left",
"selector": {
"element": [
"(.//a[normalize-space(.)='Documentation'])[1]",
"li:nth-of-type(1) > [href='/docs/']",
"div:nth-of-type(1) > ul > li:nth-of-type(1) > a.text-base"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <a class=\"text-base font-medium text-gray-700 transition-colors hover:text-checkly-blue\" href=\"/docs/\">Documentation</a>"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://www.checklyhq.com/docs/",
"parameters": {
"details": "I have successfully clicked on the 'Resources' dropdown menu and then clicked on the 'Documentation' option, which led to the developer documentation page at https://www.checklyhq.com/docs/.",
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}{
"toolName": "click",
"page": "https://www.checklyhq.com/docs/",
"parameters": {
"button": "left",
"selector": {
"element": [
"#search-bar-entry",
"div:nth-of-type(2) > [aria-label='Open search']",
".//button[normalize-space(.)='Search...⌘K']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <button type=\"button\" class=\"group/search flex pointer-events-auto w-full items-center text-sm leading-6 h-9 pl-3.5 pr-3 text-gray-500 dark:text-white/50 dark:brightness-[1.1] dark:hover:brightness-[1.25] ring-gray-400/30 hover:ring-gray-600/30 dark:ring-gray-600/30 dark:hover:ring-gray-500/30 justify-between truncate gap-2 max-w-sm bg-gray-950/[0.03] dark:bg-white/[0.03] hover:bg-gray-950/10 dark:hover:bg-white/10 rounded-full shadow-none border-none ring-0 dark:ring-0\" id=\"search-bar-entry\" aria-label=\"Open search\">Search...Ctrl K</button>"
}
}{
"toolName": "inputText",
"page": "https://www.checklyhq.com/docs/",
"parameters": {
"text": "Playwright check suite",
"finalizeWithSubmit": false,
"selector": {
"element": [
"#search-input",
"[placeholder='Search...']",
"[role='combobox']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'Playwright check suite' into: <input class=\"peer rounded-xl border outline-none border-gray-200 dark:border-white/10 bg-background-light dark:bg-background-dark h-full w-full outline-0 text-gray-950 dark:text-white placeholder:text-gray-400 placeholder:dark:text-white/50 tracking-tight pr-14 focus:border-slate-950 dark:focus:border-white transition\" placeholder=\"Search...\" autocomplete=\"off\" id=\"search-input\" role=\"combobox\" aria-expanded=\"false\" aria-autocomplete=\"list\" data-headlessui-state=\"focus autofocus\" data-autofocus=\"\" type=\"text\" aria-controls=\"headlessui-combobox-options-_r_a_\" style=\"padding-left: 44px;\" data-focus=\"\">"
}
}{
"toolName": "click",
"page": "https://www.checklyhq.com/docs/?search=Playwright+check+suite",
"parameters": {
"button": "left",
"selector": {
"element": [
"[href='/docs/constructs/playwright-check#playwright-check-suite']",
"div:nth-of-type(2) > div > a.cursor-pointer",
"[role='listbox'] > div:nth-of-type(2) > div > a"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <a href=\"/docs/constructs/playwright-check#playwright-check-suite\" class=\"cursor-pointer relative rounded-xl flex gap-3 px-2.5 py-2 items-center\">ConstructsDETECTPlaywright Check...</a>"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://www.checklyhq.com/docs/constructs/playwright-check/",
"parameters": {
"details": "I searched for \"Playwright check suite\" and selected the \"Constructs > DETECT\" suggestion. This navigated me to the \"Playwright Check Suites\" documentation page under the Constructs section.",
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}{
"toolName": "click",
"page": "https://stage.everbutton.com/",
"parameters": {
"rationale": "I am clicking the \"Register\" link to begin the account creation process as requested in the overall objective.",
"whyThisAnnotation": "Annotation 2 corresponds to the \"Register\" link which is the standard starting point for creating a new account on this website.",
"annotation": "2",
"button": "left"
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <a class=\"nav-link\" href=\"/user/register\">Register</a>"
}
}{
"toolName": "inputFaker",
"page": "https://stage.everbutton.com/user/register",
"parameters": {
"rationale": "I am entering a fake name into the \"Your first and last name\" field to proceed with the registration process.",
"whyThisAnnotation": "Annotation 3 corresponds to the input field for the user's name on the registration form.",
"annotation": "3",
"dataType": "person.fullName",
"append": false,
"finalizeWithSubmit": false
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted generated value 'Brenda Marks' into: <label for=\"name\">Your first and last name*</label>"
}
}{
"toolName": "inputRandomizedEmailAddress",
"page": "https://stage.everbutton.com/user/register",
"parameters": {
"rationale": "I am entering a randomized email address based on 'myemail@example.com' as requested in the overall objective.",
"whyThisAnnotation": "Annotation 4 corresponds to the 'Your email address' input field.",
"annotation": "4",
"baseEmail": "myemail@example.com",
"finalizeWithSubmit": false
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted email: \"myemail+fKprq4luH6@example.com\" at: <label for=\"email\">Your email address*</label>"
}
}{
"toolName": "inputFaker",
"page": "https://stage.everbutton.com/user/register",
"parameters": {
"rationale": "I am entering a generated password into the password field to complete the registration form.",
"whyThisAnnotation": "Annotation 5 corresponds to the 'Choose a password' input field.",
"annotation": "5",
"dataType": "internet.password",
"append": false,
"finalizeWithSubmit": false
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted generated value 'Ptlx_lpqBHGDTwg' into: <label for=\"password\">Choose a password*</label>"
}
}{
"toolName": "click",
"page": "https://stage.everbutton.com/user/register",
"parameters": {
"rationale": "I am clicking the \"Register\" button to submit the form and complete the account creation process.",
"whyThisAnnotation": "Annotation 6 corresponds to the \"Register\" button, which is the final step to submit the registration form.",
"annotation": "6",
"button": "left"
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <button type=\"submit\" class=\"btn btn-success\">Register</button>"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://stage.everbutton.com/user/buttons/202297",
"parameters": {
"rationale": "The objective was to create an account with a random email variation and made-up data. I have successfully submitted the registration form and landed on the post-registration page, which confirms account creation.",
"details": "The account was successfully created using the name 'Brenda Marks' and the email address 'myemail+fKprq4luH6@example.com'. The registration confirmation message is visible on the page."
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}{
"toolName": "click",
"page": "https://www.starbucks.com/",
"parameters": {
"button": "left",
"selector": {
"element": [
"(.//a[normalize-space(.)='Rewards'])[1]",
"div:nth-of-type(2) > div:nth-of-type(1) > ul > li:nth-of-type(2) > [href='/rewards']",
"li:nth-of-type(2) > a.sb-globalNav__desktopLink"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <a class=\"sb-globalNav__desktopLink inline-block text-noUnderline text-xxs text-upper text-bold\" href=\"/rewards\">Rewards</a>"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://www.starbucks.com/rewards",
"parameters": {
"details": "I have successfully navigated to the Starbucks Rewards page, as evidenced by the current URL (https://www.starbucks.com/rewards) and the page content displaying 'Starbucks Rewards'.",
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}npx donobu test -g 'Fill out a survey' --project=Donobu-based Tests/home/runner/work/playwright-flows/playwright-flows/tests/unstable-survey.test.tsError: inputText execution failed: {
"isSuccessful": false,
"forLlm": "FAILED! Unable to resolve HTML element to operate with.",
"metadata": {
"selector": {
"element": [
"#\\:r0\\:-form-item",
"[data-testid='input-lastname']",
".//label[normalize-space()='Last Name *']/following-sibling::input"
]
}
}
} at .cache-lock/unstable-survey.test.ts.cache.js:38
36 | run: async ({ page }) => {
37 | // Entering a fake last name to progress through the survey.
> 38 | await page
| ^
39 | .find('#\\:r0\\:-form-item', {
40 | failover: [
41 | "[data-testid='input-lastname']",Error: inputText execution failed: {
"isSuccessful": false,
"forLlm": "FAILED! Unable to resolve HTML element to operate with.",
"metadata": {
"selector": {
"element": [
"#\\:r0\\:-form-item",
"[data-testid='input-lastname']",
".//label[normalize-space()='Last Name *']/following-sibling::input"
]
}
}
}
at Page.page.run (/home/runner/work/playwright-flows/playwright-flows/node_modules/donobu/dist/lib/page/extendPage.js:505:19)
at SmartSelectorImpl.inputText (/home/runner/work/playwright-flows/playwright-flows/node_modules/donobu/dist/lib/page/SmartSelector.js:52:9)
at Object.run (/home/runner/work/playwright-flows/playwright-flows/tests/.cache-lock/unstable-survey.test.ts.cache.js:38:9)
at PageAi.ai (/home/runner/work/playwright-flows/playwright-flows/node_modules/donobu/dist/lib/ai/PageAi.js:162:17)
at /home/runner/work/playwright-flows/playwright-flows/tests/unstable-survey.test.ts:6:22# Instructions
- Following Playwright test failed.
- Explain why, be concise, respect Playwright best practices.
- Provide a snippet of code with the fix, if possible.
# Test info
- Name: unstable-survey.test.ts >> Fill out a survey
- Location: tests/unstable-survey.test.ts:4:5
# Error details
```
Error: inputText execution failed: {
"isSuccessful": false,
"forLlm": "FAILED! Unable to resolve HTML element to operate with.",
"metadata": {
"selector": {
"element": [
"#\\:r0\\:-form-item",
"[data-testid='input-lastname']",
".//label[normalize-space()='Last Name *']/following-sibling::input"
]
}
}
}
```
# Page snapshot
```yaml
- generic [ref=e4]:
- banner [ref=e5]:
- heading "Survey Form" [level=1] [ref=e6]
- paragraph [ref=e7]: Please complete this short survey
- generic [ref=e13]:
- generic [ref=e14]:
- generic [ref=e15]: "1"
- generic [ref=e16]: Survey
- generic [ref=e17]:
- generic [ref=e18]: "2"
- generic [ref=e19]: Selection
- generic [ref=e20]:
- generic [ref=e21]: "3"
- generic [ref=e22]: Thank You
- generic [ref=e24]:
- generic [ref=e25]: "Current Time:"
- generic [ref=e26]:
- generic [ref=e27]: 12:39:31
- generic [ref=e28]: Set 2
- generic [ref=e29]:
- heading "Tell us about yourself" [level=2] [ref=e30]
- generic [ref=e31]:
- generic [ref=e32]:
- generic [ref=e33]: Your Name *
- textbox "Your Name *" [ref=e34]:
- /placeholder: Enter your name
- generic [ref=e35]:
- generic [ref=e36]: Contact Email *
- textbox "Contact Email *" [ref=e37]:
- /placeholder: Enter your contact email
- generic [ref=e38]:
- generic [ref=e39]: Occupation *
- combobox "Occupation *" [ref=e40] [cursor=pointer]:
- generic: Select your occupation
- img [ref=e41]
- combobox [ref=e43]
- generic [ref=e44]:
- generic [ref=e46]: What interests you? *
- generic [ref=e47]:
- generic [ref=e48]:
- checkbox "Technology" [ref=e49] [cursor=pointer]
- checkbox
- generic [ref=e50]: Technology
- generic [ref=e51]:
- checkbox "Science" [ref=e52] [cursor=pointer]
- checkbox
- generic [ref=e53]: Science
- generic [ref=e54]:
- checkbox "Arts & Culture" [ref=e55] [cursor=pointer]
- checkbox
- generic [ref=e56]: Arts & Culture
- generic [ref=e57]:
- checkbox "Sports & Fitness" [ref=e58] [cursor=pointer]
- checkbox
- generic [ref=e59]: Sports & Fitness
- generic [ref=e60]:
- text: Suggestions (Optional)
- textbox "Suggestions (Optional)" [ref=e61]:
- /placeholder: Share any suggestions
- button "Next" [ref=e63] [cursor=pointer]
- region "Notifications (F8)":
- list
```
# Test source
```ts
1 | /**
2 | * @generated
3 | * This file was generated by Donobu; do not edit manually.
4 | */
5 | /* eslint-disable */
6 | const { expect } = require('donobu');
7 |
8 | module.exports = {
9 | caches: [
10 | {
11 | pageUrl: 'unstable-survey-dinoer.replit.app',
12 | instruction:
13 | 'Fill out the all of the survey questions with fake data go through\nthe submission process until you get to a "Thank You" page.',
14 | schema: {
15 | $schema: 'https://json-schema.org/draft/2020-12/schema',
16 | type: 'object',
17 | properties: {
18 | surveyData: {
19 | type: 'array',
20 | items: {
21 | type: 'object',
22 | properties: {
23 | question: { type: 'string' },
24 | response: { type: 'string' },
25 | },
26 | required: ['question', 'response'],
27 | additionalProperties: false,
28 | },
29 | },
30 | },
31 | required: ['surveyData'],
32 | additionalProperties: false,
33 | },
34 | allowedTools: [],
35 | maxToolCalls: 50,
36 | run: async ({ page }) => {
37 | // Entering a fake last name to progress through the survey.
> 38 | await page
| ^ Error: inputText execution failed: {
39 | .find('#\\:r0\\:-form-item', {
40 | failover: [
41 | "[data-testid='input-lastname']",
42 | ".//label[normalize-space()='Last Name *']/following-sibling::input",
43 | ],
44 | })
45 | .inputText('Doe');
46 |
47 | // Entering a fake email address to progress through the survey.
48 | await page
49 | .find('#\\:r1\\:-form-item', {
50 | failover: [
51 | ".//label[normalize-space()='Email Address *']/following-sibling::input",
52 | "[name='email']",
53 | ],
54 | })
55 | .inputRandomizedEmailAddress('fakeuser@example.com');
56 |
57 | // Selecting an age group as part of filling out the survey.
58 | await page
59 | .find('#\\:r5\\:-form-item', {
60 | failover: [
61 | "[data-testid='radio-age-25-34']",
62 | "div:nth-of-type(2) > [role='radio']",
63 | ],
64 | })
65 | .click('left');
66 |
67 | // Scrolling down to find more survey questions and the 'Next' button.
68 | await page.find('html').scroll('DOWN');
69 |
70 | // Selecting 'Search Engine' for the question 'How did you hear about us?' to complete the survey requirements.
71 | await page
72 | .find('#\\:rf\\:-form-item', {
73 | failover: [
74 | "div:nth-of-type(2) > [role='checkbox']",
75 | "div:nth-of-type(2) > [data-state='unchecked']",
76 | ],
77 | })
78 | .click('left');
79 |
80 | // Entering fake additional comments to complete the survey form.
81 | await page
82 | .find('#\\:ri\\:-form-item', {
83 | failover: [
84 | ".//label[normalize-space()='Additional Comments (Optional)']/following-sibling::textarea",
85 | "[name='comments']",
86 | ],
87 | })
88 | .inputText('This is a great survey experience!');
89 |
90 | // Clicking 'Next' to proceed to the next step of the survey.
91 | await page
92 | .find(".//button[normalize-space(.)='Next']", {
93 | failover: ['button.inline-flex', 'div.mt-8 > button'],
94 | })
95 | .click('left');
96 |
97 | // Clicking the 'Submit' button to finalize the survey submission and reach the 'Thank You' page.
98 | await page
99 | .find(".//button[normalize-space(.)='Submit']", {
100 | failover: [
101 | 'div.mt-8 > button:nth-of-type(2)',
102 | 'div.bg-white > div:nth-of-type(2) > button:nth-of-type(2)',
103 | ],
104 | })
105 | .click('left');
106 |
107 | // The objective was to fill out the survey and reach the 'Thank You' page, which has been achieved.
108 | await page.run('markObjectiveComplete', {
109 | details:
110 | "I have successfully filled out the survey with fake data, gone through the review process, and reached the 'Thank You' page as requested.",
111 | });
112 | },
113 | },
114 | ],
115 | };
116 |
```{
"toolName": "inputText",
"page": "https://unstable-survey-dinoer.replit.app/",
"parameters": {
"text": "Doe",
"finalizeWithSubmit": false,
"selector": {
"element": [
"#\\:r0\\:-form-item",
"[data-testid='input-lastname']",
".//label[normalize-space()='Last Name *']/following-sibling::input"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": false,
"forLlm": "FAILED! Unable to resolve HTML element to operate with."
}
}{
"toolName": "inputFaker",
"page": "https://unstable-survey-dinoer.replit.app/",
"parameters": {
"rationale": "Entering a fake last name into the survey form as required by the objective.",
"whyThisAnnotation": "Annotation 0 is the text input for 'Last Name'.",
"annotation": "0",
"dataType": "person.lastName",
"append": false,
"finalizeWithSubmit": false
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted generated value 'Harvey-McDermott' into: <label class=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\":r0:-form-item\">Last Name *</label>"
}
}{
"toolName": "inputFaker",
"page": "https://unstable-survey-dinoer.replit.app/",
"parameters": {
"rationale": "Filling in a fake email address for the survey.",
"whyThisAnnotation": "Annotation 1 is the 'Email Address' input field.",
"annotation": "1",
"dataType": "internet.email",
"append": false,
"finalizeWithSubmit": false
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted generated value 'Terrance93@yahoo.com' into: <label class=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\":r1:-form-item\">Email Address *</label>"
}
}{
"toolName": "click",
"page": "https://unstable-survey-dinoer.replit.app/",
"parameters": {
"rationale": "Selecting an age group as part of the survey form.",
"whyThisAnnotation": "Annotation 4 is the radio button for the '25-34' age group.",
"annotation": "4",
"button": "left"
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <label class=\"text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 font-normal\" for=\":r5:-form-item\">25-34</label>"
}
}{
"toolName": "scrollPage",
"page": "https://unstable-survey-dinoer.replit.app/",
"parameters": {
"rationale": "Scrolling down to see the rest of the survey questions and the submit button.",
"whyThisAnnotation": "Annotation 8 is the main page scrolling element.",
"annotation": "8",
"direction": "DOWN",
"maxScroll": false
},
"outcome": {
"isSuccessful": true,
"forLlm": "Scrolled DOWN <html lang=\"en\">:root {\n --background: 245 99...</html>"
}
}{
"toolName": "click",
"page": "https://unstable-survey-dinoer.replit.app/",
"parameters": {
"rationale": "Selecting 'Social Media' as the source of discovery for the survey.",
"whyThisAnnotation": "Annotation 8 is the checkbox for 'Social Media'.",
"annotation": "8",
"button": "left"
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <label class=\"peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-sm font-normal\" for=\":re:-form-item\">Social Media</label>"
}
}{
"toolName": "inputFaker",
"page": "https://unstable-survey-dinoer.replit.app/",
"parameters": {
"rationale": "Adding some fake comments to the optional comments field.",
"whyThisAnnotation": "Annotation 12 is the 'Additional Comments' textarea.",
"annotation": "12",
"dataType": "lorem.sentence",
"append": false,
"finalizeWithSubmit": false
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted generated value 'Allatus titulus callide urbs utpote vulariter aptus caries accusantium.' into: <label class=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\":ri:-form-item\">Additional Comments (Optional)</label>"
}
}{
"toolName": "click",
"page": "https://unstable-survey-dinoer.replit.app/",
"parameters": {
"rationale": "Clicking 'Next' to move to the next section of the survey.",
"whyThisAnnotation": "Annotation 13 is the 'Next' button.",
"annotation": "13",
"button": "left"
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <button class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2\" type=\"submit\">Next</button>"
}
}{
"toolName": "click",
"page": "https://unstable-survey-dinoer.replit.app/selection",
"parameters": {
"rationale": "Submitting the survey after reviewing the entered fake data.",
"whyThisAnnotation": "Annotation 1 is the 'Submit' button.",
"annotation": "1",
"button": "left"
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <button class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2\">Submit</button>"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://unstable-survey-dinoer.replit.app/thank-you",
"parameters": {
"rationale": "The 'Thank You' page has been reached, indicating the survey submission process is complete.",
"details": "Successfully filled out the survey with fake data and reached the 'Thank You' page."
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}The 'unstable-survey' app appears to serve different form sets (the screenshot shows 'Set 2'). The cached deterministic instructions were likely recorded on a different form version containing a 'Last Name' field. Clearing the cache will allow the autonomous agent to adapt to the current form structure.
test('Fill out a survey', async ({ page }) => {
await page.goto('https://unstable-survey-dinoer.replit.app');
const surveyData = await page.ai(
`Fill out the all of the survey questions with fake data go through
the submission process until you get to a "Thank You" page.`,
{
schema: z.object({
surveyData: z.array(
z.object({
question: z.string(),
response: z.string(),
}),
),
}),
},
);
console.log(
`Completed the survey! Survey data: ${JSON.stringify(surveyData, null, 2)}`,
);
await expect(page).toHaveURL(/thank-you/);
});{
"toolName": "click",
"page": "https://en.wikipedia.org/wiki/Software_testing",
"parameters": {
"selector": {
"element": [
"(.//a[normalize-space(.)='View history'])[1]",
"[title='Past revisions of this page [ctrl-option-h]']",
"nav:nth-of-type(1) > div > div > ul > li:nth-of-type(3) > [href='/w/index.php?title=Software_testing&action=history']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <a href=\"/w/index.php?title=Software_testing&action=history\" title=\"Past revisions of this page [alt-h]\" accesskey=\"h\">View history</a>"
}
}{
"toolName": "click",
"page": "https://en.wikipedia.org/w/index.php?title=Software_testing&action=history",
"parameters": {
"selector": {
"element": [
"(.//a[normalize-space(.)='oldest'])[1]",
"div:nth-of-type(3) > [href='/w/index.php?title=Software_testing&action=history&dir=prev']",
"div:nth-of-type(3) > a.mw-lastlink"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <a href=\"/w/index.php?title=Software_testing&action=history&dir=prev\" class=\"mw-lastlink\">oldest</a>"
}
}{
"toolName": "scrollPage",
"page": "https://en.wikipedia.org/w/index.php?title=Software_testing&action=history&dir=prev",
"parameters": {
"direction": "DOWN",
"selector": {
"element": [
"html.client-js",
"html"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Scrolled DOWN <html class=\"client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-menu-disabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref--excluded vector-feature-appearance-pinned-clientpref-1 skin-theme-clientpref-day vector-toc-not-available skin-theme-clientpref-thumb-standard vector-animations-ready ve-available\" lang=\"en\" dir=\"ltr\">Software testing: Revision histo...</html>"
}
}{
"toolName": "scrollPage",
"page": "https://en.wikipedia.org/w/index.php?title=Software_testing&action=history&dir=prev",
"parameters": {
"direction": "DOWN",
"selector": {
"element": [
"html.client-js",
"html"
]
},
"maxScroll": true,
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Scrolled DOWN (max)<html class=\"client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-menu-disabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref--excluded vector-feature-appearance-pinned-clientpref-1 skin-theme-clientpref-day vector-toc-not-available skin-theme-clientpref-thumb-standard vector-animations-ready ve-available\" lang=\"en\" dir=\"ltr\">Software testing: Revision histo...</html>"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://en.wikipedia.org/w/index.php?title=Software_testing&action=history&dir=prev",
"parameters": {
"details": "The earliest (oldest) revision of the 'Software testing' article is 13:57, 5 December 2001.",
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}{
"toolName": "scrollPage",
"page": "https://news.ycombinator.com/",
"parameters": {
"direction": "DOWN",
"selector": {
"element": [
"html > body",
"body"
]
},
"maxScroll": true,
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Scrolled DOWN (max)<body>Hacker Newsnew | past | comments...</body>"
}
}{
"toolName": "inputText",
"page": "https://news.ycombinator.com/",
"parameters": {
"text": "mac app for web testing",
"finalizeWithSubmit": true,
"selector": {
"element": [
"#hnmain > tbody > tr:nth-of-type(4) > td > center > form > input",
"[name='q']",
"form > input"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'mac app for web testing' into: <input type=\"text\" name=\"q\" size=\"17\" autocorrect=\"off\" spellcheck=\"false\" autocapitalize=\"off\" autocomplete=\"off\" style=\"\">"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://hn.algolia.com/?q=mac+app+for+web+testing",
"parameters": {
"details": "I have successfully scrolled to the bottom of the page, located the search input field, and performed a search with the keyword \"mac app for web testing\". The search results are now displayed.",
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}{
"toolName": "inputFaker",
"page": "https://briefcase.chat/",
"parameters": {
"rationale": "Entering a name to start the chat as required by the welcome modal.",
"whyThisAnnotation": "This is the input field for the user's name.",
"annotation": "0",
"dataType": "person.firstName",
"append": false,
"finalizeWithSubmit": false
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted generated value 'Oscar' into: <label class=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label>"
}
}{
"toolName": "click",
"page": "https://briefcase.chat/",
"parameters": {
"rationale": "Clicking the 'Start Chatting' button to proceed to the chat interface.",
"whyThisAnnotation": "This is the button to submit the name and start the chat session.",
"annotation": "1",
"button": "left"
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <button class=\"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 text-primary-foreground h-10 px-4 py-2 bg-[#3675F1] hover:bg-[#2556E4] w-full\" type=\"button\">Start Chatting</button>"
}
}{
"toolName": "inputText",
"page": "https://briefcase.chat/",
"parameters": {
"rationale": "Asking the first legal-related question to verify topic compliance.",
"whyThisAnnotation": "This is the chat input field where I can type messages to the bot.",
"annotation": "7",
"text": "What are the key differences between a C-Corp and an LLC for a startup?",
"append": false,
"finalizeWithSubmit": true
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'What are the key differences between a C-Corp and an LLC for a startup?' into: <input class=\"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 flex-1 sm:text-sm text-base\" placeholder=\"Type your message...\" aria-hidden=\"false\" value=\"\" style=\"\">"
}
}{
"toolName": "inputText",
"page": "https://briefcase.chat/?id=f81de0f2-38d9-4659-9425-643efc55e9f9",
"parameters": {
"rationale": "Asking a second legal-related question to further confirm topic compliance.",
"whyThisAnnotation": "This is the chat input field where I can type messages to the bot.",
"annotation": "18",
"text": "What is a non-disclosure agreement (NDA) and when should a startup use one?",
"append": false,
"finalizeWithSubmit": true
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'What is a non-disclosure agreement (NDA) and when should a startup use one?' into: <input class=\"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 flex-1 sm:text-sm text-base\" placeholder=\"Type your message...\" aria-hidden=\"false\" value=\"\" style=\"\">"
}
}{
"toolName": "inputText",
"page": "https://briefcase.chat/?id=f81de0f2-38d9-4659-9425-643efc55e9f9",
"parameters": {
"rationale": "Asking an off-topic question about cookie recipes to test if the bot maintains its legal/business focus or refuses unrelated topics.",
"whyThisAnnotation": "This is the chat input field where I can type messages to the bot.",
"annotation": "9",
"text": "What is the best recipe for chocolate chip cookies?",
"append": false,
"finalizeWithSubmit": true
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'What is the best recipe for chocolate chip cookies?' into: <input class=\"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 flex-1 sm:text-sm text-base\" placeholder=\"Type your message...\" aria-hidden=\"false\" value=\"\" style=\"\">"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://briefcase.chat/?id=f81de0f2-38d9-4659-9425-643efc55e9f9",
"parameters": {
"rationale": "The objective has been met by verifying the bot's response to both on-topic and off-topic questions.",
"details": "The chatbot 'Briefcase' was evaluated for topic compliance. \n1. Legal-related compliance: The bot provided detailed and relevant information when asked about the differences between C-Corps and LLCs and the purpose of NDAs for startups.\n2. Off-topic compliance: When asked for a chocolate chip cookie recipe, the bot explicitly refused, stating its purpose is to provide legal information and assistance for founders and investors.\nThe bot successfully adhered to its intended topic and refused unrelated queries."
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}{
"toolName": "click",
"page": "https://www.saucedemo.com/cart.html",
"parameters": {
"button": "left",
"selector": {
"element": [
"[data-test='checkout']",
".//button[normalize-space(.)='Checkout']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <button class=\"btn btn_action btn_medium checkout_button \" data-test=\"checkout\" id=\"checkout\" name=\"checkout\">Checkout</button>"
}
}{
"toolName": "inputText",
"page": "https://www.saucedemo.com/checkout-step-one.html",
"parameters": {
"text": "John",
"finalizeWithSubmit": false,
"selector": {
"element": [
"[data-test='firstName']",
"[name='firstName']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'John' into: <input class=\"input_error form_input\" placeholder=\"First Name\" type=\"text\" data-test=\"firstName\" id=\"first-name\" name=\"firstName\" autocorrect=\"off\" autocapitalize=\"none\" value=\"\" style=\"\">"
}
}{
"toolName": "inputText",
"page": "https://www.saucedemo.com/checkout-step-one.html",
"parameters": {
"text": "Doe",
"finalizeWithSubmit": false,
"selector": {
"element": [
"[data-test='lastName']",
"[name='lastName']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text 'Doe' into: <input class=\"input_error form_input\" placeholder=\"Last Name\" type=\"text\" data-test=\"lastName\" id=\"last-name\" name=\"lastName\" autocorrect=\"off\" autocapitalize=\"none\" value=\"\" style=\"\">"
}
}{
"toolName": "inputText",
"page": "https://www.saucedemo.com/checkout-step-one.html",
"parameters": {
"text": "12345",
"finalizeWithSubmit": false,
"selector": {
"element": [
"[data-test='postalCode']",
"[name='postalCode']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Inputted text '12345' into: <input class=\"input_error form_input\" placeholder=\"Zip/Postal Code\" type=\"text\" data-test=\"postalCode\" id=\"postal-code\" name=\"postalCode\" autocorrect=\"off\" autocapitalize=\"none\" value=\"\" style=\"\">"
}
}{
"toolName": "click",
"page": "https://www.saucedemo.com/checkout-step-one.html",
"parameters": {
"button": "left",
"selector": {
"element": [
"[data-test='continue']",
"[name='continue']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <input type=\"submit\" class=\"submit-button btn btn_primary cart_button btn_action\" data-test=\"continue\" id=\"continue\" name=\"continue\" value=\"Continue\" style=\"\">"
}
}{
"toolName": "click",
"page": "https://www.saucedemo.com/checkout-step-two.html",
"parameters": {
"button": "left",
"selector": {
"element": [
"[data-test='finish']",
".//button[normalize-space(.)='Finish']"
]
},
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Left-clicked on: <button class=\"btn btn_action btn_medium cart_button\" data-test=\"finish\" id=\"finish\" name=\"finish\">Finish</button>"
}
}{
"toolName": "markObjectiveComplete",
"page": "https://www.saucedemo.com/checkout-complete.html",
"parameters": {
"details": "The checkout process has been successfully completed, as indicated by the 'Checkout: Complete!' message and the 'Thank you for your order!' confirmation on the final page.",
"rationale": ""
},
"outcome": {
"isSuccessful": true,
"forLlm": "Objective has been marked as complete."
}
}