Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Fix async querying example
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Jun 4, 2024
1 parent da15e59 commit b5b45e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/querying.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export default async function() {
try {
await page.goto('https://test.k6.io/');

const titleWithCSS = await page.$('header h1.title').textContent();
const titleWithXPath = await page.$(`//header//h1[@class="title"]`).textContent();
const titleWithCSS = await page.$('header h1.title').then(e => e.textContent());
const titleWithXPath = await page.$(`//header//h1[@class="title"]`).then(e => e.textContent());

check(page, {
'Title with CSS selector': titleWithCSS == 'test.k6.io',
Expand Down

0 comments on commit b5b45e4

Please sign in to comment.