Skip to content
New issue

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

[BUG] waitForSelector doesn't throw #4804

Closed
VincentDondain opened this issue Dec 22, 2020 · 1 comment
Closed

[BUG] waitForSelector doesn't throw #4804

VincentDondain opened this issue Dec 22, 2020 · 1 comment

Comments

@VincentDondain
Copy link

VincentDondain commented Dec 22, 2020

Context:

  • Playwright Version: 1.7.0
  • Operating System: macOS
  • Node.js version: 11.1
  • Browser: Chromium

Code Snippet

try {
    await page.waitForSelector('text="Personal codespaces"');
} catch {
    console.log("catch")
}

Describe the bug

Hi,

I'm expecting the code above to throw (according to the documentation) if it cannot find the selector (after it times out).

However with playwright 1.7.0 I am not entering the catch.

Am I doing something wrong?

Thanks

@VincentDondain
Copy link
Author

VincentDondain commented Dec 22, 2020

Nevermind this works as expected (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant