<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: [v1.33.0]</li>
<li>Operating System: [Multiple]</li>
<li>Browser: [Chromium]</li>
<li>Other info: PW runs under docker official image, tried mcr.microsoft.com/playwright:v1.33.0 and mcr.microsoft.com/playwright:v1.32.0-focal - same result</li>
<li>Env: Node.js 17</li>
</ul>
<p dir="auto"><strong>This may be important:</strong> I use PW browser remote connection, PW and Chromium are in PW's image docker container and another docker container based on node:17-alpine image connects to it and performs RPA actions</p>
<h3 dir="auto">Source code (partial)</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const closeModalButtonLocator: Locator = page.locator('[data-automation-id=&quot;ModalDialog&quot;] [aria-label=&quot;Close&quot;]');
if (await closeModalButtonLocator.isVisible()) {
  const notShowButtonLocator: Locator = page.locator(
    '[data-automation-id=&quot;ModalDialog&quot;] button &gt;&gt; text=Don\'t show me this again'
  );
  if (await notShowButtonLocator.isVisible()) {
    await notShowButtonLocator.click({ force: true, timeout: this.config.longActionTimeout });
  } else {
    await closeModalButtonLocator.click({ force: true, timeout: this.config.longActionTimeout });
  }
}"><pre class="notranslate"><code class="notranslate">const closeModalButtonLocator: Locator = page.locator('[data-automation-id="ModalDialog"] [aria-label="Close"]');
if (await closeModalButtonLocator.isVisible()) {
  const notShowButtonLocator: Locator = page.locator(
    '[data-automation-id="ModalDialog"] button &gt;&gt; text=Don\'t show me this again'
  );
  if (await notShowButtonLocator.isVisible()) {
    await notShowButtonLocator.click({ force: true, timeout: this.config.longActionTimeout });
  } else {
    await closeModalButtonLocator.click({ force: true, timeout: this.config.longActionTimeout });
  }
}
</code></pre></div>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">await locator.isVisible() should return boolean value immediately</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">await locator.isVisible() throws exception Timeout 5000ms exceeded, but it shouldn't wait for anything and should just return element is visible or not. it sometimes happens in different places where isVisible are used, regardless of element actually visible or not</p>
<hr>
<p dir="auto">P.S can't publish all source code or full trace, but last error action screenshot from trace viewer is representative, i suppose</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/34742506/236477400-d1e88764-689e-4772-9b6b-7635a5582023.png"><img width="1536" alt="Screenshot 2023-05-05 at 16 41 10" src="https://user-images.githubusercontent.com/34742506/236477400-d1e88764-689e-4772-9b6b-7635a5582023.png" style="max-width: 100%;"></a></p>
<p dir="auto">I have a similar issue as in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1586654301" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/20928" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright/issues/20928/hovercard" href="https://github.com/microsoft/playwright/issues/20928">#20928</a> where I have an SVG image in a react project when I hide the SVG get the error <code class="notranslate">TypeError: Cannot read properties of undefined (reading 'includes')</code>.</p>
<p dir="auto">Se reproduction below.</p>



<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: v1.33.0</li>
<li>Operating System: All</li>
<li>Browser: Chromium</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>




<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto"><a href="https://github.com/jonaskello/playwright-bug-repro">https://github.com/jonaskello/playwright-bug-repro</a></p>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>See the readme in repo above</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">No errors</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">Error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="t (in promise) TypeError: Cannot read properties of undefined (reading 'includes')
    at parseSelectorString (&lt;anonymous&gt;:1422:17)
    at parseSelector (&lt;anonymous&gt;:1322:18)
    at InjectedScript.parseSelector (&lt;anonymous&gt;:4440:20)
    at makeStrict (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:1017:43)
    at cssFallback (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:1061:10)
    at generateSelector (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:826:40)
    at Recorder._updateModelForHoveredElement (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:3404:36)
    at Recorder._onFocus (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:3395:10)
    at Recorder._performAction (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:3531:10)
parseSelectorSt"><pre class="notranslate"><code class="notranslate">t (in promise) TypeError: Cannot read properties of undefined (reading 'includes')
    at parseSelectorString (&lt;anonymous&gt;:1422:17)
    at parseSelector (&lt;anonymous&gt;:1322:18)
    at InjectedScript.parseSelector (&lt;anonymous&gt;:4440:20)
    at makeStrict (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:1017:43)
    at cssFallback (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:1061:10)
    at generateSelector (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:826:40)
    at Recorder._updateModelForHoveredElement (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:3404:36)
    at Recorder._onFocus (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:3395:10)
    at Recorder._performAction (eval at extend (localhost/:4673:40), &lt;anonymous&gt;:3531:10)
parseSelectorSt
</code></pre></div>