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
Same thing as in js/ts world playwright.config.ts equivalent for python playwright.conf.py which would automatically parameterize all the tests.
playwright.config.ts
playwright.conf.py
Includes #67
The text was updated successfully, but these errors were encountered:
@mxschmitt
How about using the pyproject.toml file for configuration.
[tool.playwright] headed = true
@pytest.fixture(scope="session") def playwright_config(request: pytest.FixtureRequest) -> Dict: rootpath = request.config.rootpath config_file_path = rootpath / "pyproject.toml" if not config_file_path.exists(): return {} with config_file_path.open(mode="rb") as f: config = tomli.load(f) return config.get("tool", {}).get("playwright", {}) @pytest.fixture(scope="session") def browser_type_launch_args(pytestconfig: Any, playwright_config: Dict) -> Dict: launch_options = {} headed_option = pytestconfig.getoption("--headed") or playwright_config.get("headed")
I am not a seasoned python developer. If this is an acceptable approach, I can open up a PR.
Sorry, something went wrong.
Pytest provides a way to add ini options to the config and read them:
No branches or pull requests
Same thing as in js/ts world
playwright.config.ts
equivalent for pythonplaywright.conf.py
which would automatically parameterize all the tests.Includes #67
The text was updated successfully, but these errors were encountered: