Don't use problematic selectors#8
Merged
Merged
Conversation
hynek-urban
commented
Feb 4, 2026
Collaborator
- Make sure none of the selectors are locale-dependent.
- Add a style guideline to hopefully avoid this in the future.
- Make the generated app names a little more informative (date is now included).
- And fix a bug related to github login detection. (Turns out the old logic sometimes misfired due to github returning http 200 and yet showing a sudo page.)
…n e8bfe2ed) A number of services generate random Latchkey- prefixed app names when necessary. Move this to a central place (a single reused function), probably in playwrightUtils.ts.
hynek@\~/gi/projects/latchkey$ latchkey login dropbox
node:internal/process/promises:394
triggerUncaughtException(err, true /\* fromPromise \*/);
^
locator.waitFor: Error: strict mode violation: locator('//\*[@id="create-button"]') resolved to 3 elements:
1) <button type="submit" id="create-button" class="button-primary">Create app</button> aka getByRole('button', { name: 'Create app' })
2) <button id="create-button" disabled="disabled" class="button-primary">Send email for verification</button> aka getByText('Send email for verification')
3) <button id="create-button" disabled="disabled" class="button-primary">Resend verification email</button> aka getByText('Resend verification email')
Call log:
- waiting for locator('//\*[@id="create-button"]') to be visible
at DropboxServiceSession.performBrowserFollowup (/home/hynek/gi/projects/latchkey/dist/src/services/dropbox.js:52:28)
at async file:///home/hynek/gi/projects/latchkey/dist/src/services/base.js:76:34
at async withTempBrowserContext (/home/hynek/gi/projects/latchkey/dist/src/playwrightUtils.js:44:24)
at async Command.<anonymous> (/home/hynek/gi/projects/latchkey/dist/src/cliCommands.js:253:36)
Node.js v24.13.0
qi-imbue
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.