<p dir="auto">Given a <code class="notranslate">tsconfig</code> like this:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;extends&quot;: [&quot;@tsconfig/strictest/tsconfig.json&quot;, &quot;@tsconfig/node16/tsconfig.json&quot;],
}"><pre class="notranslate">{
  <span class="pl-ent">"extends"</span>: [<span class="pl-s"><span class="pl-pds">"</span>@tsconfig/strictest/tsconfig.json<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>@tsconfig/node16/tsconfig.json<span class="pl-pds">"</span></span>],
}</pre></div>
<p dir="auto">An error like this happens:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="playwright test --config tests/e2e/config.ts

TypeError: The &quot;path&quot; argument must be of type string. Received an instance of Array"><pre class="notranslate"><code class="notranslate">playwright test --config tests/e2e/config.ts

TypeError: The "path" argument must be of type string. Received an instance of Array
</code></pre></div>
<p dir="auto">Let us know what functionality you'd like to see in Playwright and what your use case is.<br>
Do you think others might benefit from this as well?</p>
<p dir="auto">I consider it worthwhile to introduce new kinds of matchers to expect the number of elements that <code class="notranslate">locator.count()</code> returns.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const locator = page.locator('.selector')

await expect(locator).toHaveCount(2) // already implemented
await expect(locator).toHaveCountGreaterThan(5)
await expect(locator).toHaveCountLowerThan(10)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">locator</span> <span class="pl-c1">=</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">locator</span><span class="pl-kos">(</span><span class="pl-s">'.selector'</span><span class="pl-kos">)</span>

<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">locator</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveCount</span><span class="pl-kos">(</span><span class="pl-c1">2</span><span class="pl-kos">)</span> <span class="pl-c">// already implemented</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">locator</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveCountGreaterThan</span><span class="pl-kos">(</span><span class="pl-c1">5</span><span class="pl-kos">)</span>
<span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">locator</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toHaveCountLowerThan</span><span class="pl-kos">(</span><span class="pl-c1">10</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">For consistency, there could also be added <code class="notranslate">.toHaveLengthGreaterThan()</code> and <code class="notranslate">.toHaveLengthLowerThan()</code>.</p>