in playwright locator in python I can use timeout directly on locators:
loggedin = page.locator('//h1[@class="page-title" and (text()="Your keys" or text()="Dine nøkler")]').is_visible(timeout=1000)
It returns a bool and no exception after 1 sec
How can I do the same timeout in K6 Browser, isVisible() have no timeout?
try {
let loggedin = await page.locator('//h1[@page-title=" and (text()="Your keys" or text()="Dine nøkler")]').isVisible();
}
catch (e) {
console.log("returns a promise after 30sec");
}
1 post - 1 participant