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
We want to add catch blocks to our examples to introduce better examples for our users.
catch
There is also another problem.
p.$
try
page.close
p.$ says
import { check } from 'k6'; import { chromium } from 'k6/x/browser'; export const options = { thresholds: { checks: ["rate==1.0"] } } export default async function() { const browser = chromium.launch({ headless: __ENV.XK6_HEADLESS ? true : false, }); const context = browser.newContext(); const page = context.newPage(); try { await page.goto('https://test.k6.io/'); check(page, { 'Title with CSS selector': p => { console.log('checking page textcontext'); return p.$('header h1.titlex').textContent() == 'test.k6.io' }, }); } finally { page.close(); browser.close(); } }
Related: #590, #697
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We want to add
catch
blocks to our examples to introduce better examples for our users.There is also another problem.
p.$
fails (I've changed the extension code to do so).try
block—it swallows the panic.page.close
panics since "p.$ panicked and shut down the browser already".page.close
's panic even ifp.$ says
something like "I could not find the selector something."Related: #590, #697
The text was updated successfully, but these errors were encountered: