We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
globalSetup
1.43.1
import { defineConfig } from '@playwright/test'; export default defineConfig({ use: { testIdAttribute: 'pw-test-id', }, });
page.getByTestId(...)
page.getByTestId(...) works seamlessly across setup/teardown functions and specs.
I need to execute
import { selectors } from '@playwright/test' selectors.setTestIdAttribute('pw-test-id')
In order for the selector to work as expected.
No response
System: OS: macOS 14.4.1 Memory: 185.98 MB / 16.00 GB Binaries: Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm Languages: Bash: 3.2.57 - /bin/bash
The text was updated successfully, but these errors were encountered:
This is working as expected. If you would like your setup to be affected by the config, use project dependencies instead.
I'll try updating the docs to make this clear.
Sorry, something went wrong.
docs: mention that globalSetup does not respect config options (#30609)
c3d8b22
Closes #30605.
Successfully merging a pull request may close this issue.
Version
1.43.1
Steps to reproduce
page.getByTestId(...)
page.getByTestId(...)
in globalSetup function (probably the same happens for the teardown function)Expected behavior
page.getByTestId(...)
works seamlessly across setup/teardown functions and specs.Actual behavior
I need to execute
In order for the selector to work as expected.
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: