We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Playwright, JSHandle.evaluate passes itself as the first argument: https://playwright.dev/docs/api/class-jshandle#js-handle-evaluate. k6 browser doesn't seem to do the same.
NA
When calling the evaluate API like so:
evaluate
const page = await browser.newPage(); await page.goto('https://test.k6.io/browser.php'); const jsHandle = await page.evaluateHandle(() => document.body); const innerHTML = await jsHandle.evaluate((node) => node.innerHTML); console.log(innerHTML);
We get an error:
ERRO[0000] Uncaught (in promise) evaluating element: TypeError: Cannot read properties of undefined (reading 'innerHTML') at __xk6_browser_evaluation_script__:1:15 executor=shared-iterations scenario=browser
The expected bahaviour is that the innerHTML of the page's body is returned which can then be logged to the console.
The content you are editing has changed. Please copy your edits and refresh the page.
The text was updated successfully, but these errors were encountered:
ankur22
No branches or pull requests
Brief summary
In Playwright, JSHandle.evaluate passes itself as the first argument: https://playwright.dev/docs/api/class-jshandle#js-handle-evaluate. k6 browser doesn't seem to do the same.
xk6-browser version
NA
OS
NA
Chrome version
NA
Docker version and image (if applicable)
NA
Steps to reproduce the problem
When calling the
evaluate
API like so:We get an error:
Expected behaviour
The expected bahaviour is that the innerHTML of the page's body is returned which can then be logged to the console.
Actual behaviour
Tasks
The text was updated successfully, but these errors were encountered: