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] issue with waitForSelector #2283

Closed
saurabhxkapoor opened this issue May 18, 2020 · 1 comment · Fixed by #2305
Closed

[BUG] issue with waitForSelector #2283

saurabhxkapoor opened this issue May 18, 2020 · 1 comment · Fixed by #2305

Comments

@saurabhxkapoor
Copy link

saurabhxkapoor commented May 18, 2020

  • Playwright Version: 1.0.2
  • Operating System: Mac
  • Node version: 10.15.2
  • Browser: chrome (tried chrome only)

I am migrating tests from Puppeteer to use Playwright.

image

waitUntilAppears: async function (selector, timeoutTime) {
        let timeout_updated = await (typeof timeoutTime === 'undefined' ? TIMEOUT : timeoutTime);
        console.log(selector);
        console.log(timeout_updated);
        await page.waitForSelector(selector, {
                timeout: timeout_updated * 1000,
                state: 'visible'
            });
    },

When this method is called, it waits for waiting for selector "[visible] .arc-tree-node". Seems like the selector needs to be only .arc-tree-node and not prefixed with [visible]. Because, if i searc the selector in chrome console - [visible] .arc-tree-node, i dont find anything.

Any pointers ?

@pavelfeldman
Copy link
Member

pavelfeldman commented May 18, 2020

What it failed at finding is .arc-tree-node, it is the the error message that is confusing. It was trying to find the .arc-tree-node that would have non-empty bounding rect and failed...

aslushnikov added a commit to aslushnikov/playwright that referenced this issue May 20, 2020
aslushnikov added a commit that referenced this issue May 20, 2020
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

Successfully merging a pull request may close this issue.

2 participants