Skip to content

Conversation

@dgozman
Copy link
Contributor

@dgozman dgozman commented Jun 20, 2025

There is no reason to wait for the locator to match an element, because this method is used to convert between a locator and a preferred locator.

If nothing matches, just throw an error right away.

@dgozman dgozman requested a review from Skn0tt June 20, 2025 12:58
element: ElementHandle

generateLocatorString:
title: Generate locator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if it's internal, why does it need a title?

}
frame = frame.parentFrame();
}
return asLocator('javascript', result.reverse().join(' >> internal:control=enter-frame >> '));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it intentional we always use javascript here, instead of sdkLanguage?

There is no reason to wait for the locator to match an
element, because this method is used to convert between
a locator and a preferred locator.

If nothing matches, just throw an error right away.
@dgozman dgozman force-pushed the chore-generate-locator-no-timeout branch from 9736b44 to eb893a2 Compare June 23, 2025 12:58
@github-actions
Copy link
Contributor

Test results for "tests 1"

7 flaky ⚠️ [chromium-library] › library/chromium/tracing.spec.ts:49:3 › should run with custom categories if provided @chromium-ubuntu-22.04-node20
⚠️ [chromium-library] › library/chromium/tracing.spec.ts:49:3 › should run with custom categories if provided @chromium-ubuntu-22.04-node22
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104:3 › should work with strict CSP policy @firefox-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-trace.spec.ts:587:5 › should indicate current test status @macos-latest-node18-1
⚠️ [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

39453 passed, 823 skipped
✔️✔️✔️

Merge workflow run.

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 this pull request may close these issues.

2 participants