Skip to content

Commit c58ba23

Browse files
authored
fix: multiple elements returned (#3883)
1 parent 963e847 commit c58ba23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/helper/Playwright.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3260,7 +3260,7 @@ async function findElement(matcher, locator) {
32603260
if (locator.react) return findReact(matcher, locator);
32613261
locator = new Locator(locator, 'css');
32623262

3263-
return matcher.locator(buildLocatorString(locator));
3263+
return matcher.locator(buildLocatorString(locator)).first();
32643264
}
32653265

32663266
async function getVisibleElements(elements) {

0 commit comments

Comments
 (0)