You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use the I.askGptOnPage() or I.askGptOnPageFragment() function to get a response based on the html code passed to the gpt endpoint.
What do you get instead?
No usable response since the html code was not sent properly:
[{role: 'user',content: 'Is the text "The world’s leading AI-powered developer platform" displayed on the page?'},{role: 'user',content: 'Within this HTML: [object Promise]'}]
npx codeceptjs run --verbose --ai
***************************************
nodeInfo: 22.7.0
osInfo: macOS 15.1
cpuInfo: (8) x64 Apple M1
chromeInfo: 128.0.6613.84
edgeInfo: Not Found
firefoxInfo: undefined
safariInfo: 18.0
If you need more detailed info, just run this: npx codeceptjs info
***************************************
CodeceptJS v3.6.5 #StandWithUkraine
Using test root "/Users/tom/workspaces/WebstormProjects/test"
Helpers: Playwright, AI
Plugins: screenshotOnFail, tryTo, retryFailedStep, retryTo, eachElement
askgpt --
[1] Starting recording promises
Timeouts:
› [Session] Starting singleton browser session
test askGptOnPage
I ask gpt on page "Is the text "The world’s leading AI-powered developer platform" displayed on the page?"
⠋ Processing AI request...[
{
role: 'user',
content: 'Is the text "The world’s leading AI-powered developer platform" displayed on the page?'
},
{ role: 'user', content: 'Within this HTML: [object Promise]' }
]
(node:71080) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
It looks like you've pasted an object reference or the text "[object Promise]" instead of the actual HTML code.To determine if the text "The world’s leading AI-powered developer platform" is displayed on a web page, you need to check the HTML content of that web page.Please provide the actual HTML code or a relevant portion of it so I can help you check if that specific text is present. ✔ OK in 1919ms OK | 1 passed // 3sAI assistant took 2s and used ~1K input tokens. Tokens limit: 10K
test source code:
Feature('askgpt');Scenario('test askGptOnPage',({ I })=>{I.askGptOnPage('Is the text "The world’s leading AI-powered developer platform" displayed on the page?');});
The text was updated successfully, but these errors were encountered:
tomaculum
changed the title
I.askGptOnPage and I.askGptOnPageFragment sends Promise
I.askGptOnPage and I.askGptOnPageFragment sends Promise to endpoint
Aug 26, 2024
What are you trying to achieve?
I want to use the
I.askGptOnPage()
orI.askGptOnPageFragment()
function to get a response based on the html code passed to the gpt endpoint.What do you get instead?
No usable response since the html code was not sent properly:
Details
The text was updated successfully, but these errors were encountered: