diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 000000000..30f051884 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,30 @@ +--- +name: Bug Report +about: Something doesn't work like it should? Tell us! +title: "[BUG]" +labels: '' +assignees: '' + +--- + +**Context:** + +- Playwright Version: [what Playwright version do you use?] +- Operating System: [e.g. Windows, Linux or Mac] +- Python Version: [e.g. 3.8, 3.9] + + + + +**Code Snippet** + +Help us help you! Put down a short code snippet that illustrates your bug and +that we can run and debug locally. For example: + +```python +... +``` + +**Describe the bug** + +Add any other details about the problem here. diff --git a/playwright/__main__.py b/playwright/__main__.py index 8e2a1be8d..6046134eb 100644 --- a/playwright/__main__.py +++ b/playwright/__main__.py @@ -13,17 +13,24 @@ # limitations under the License. import os +import platform import subprocess import sys from playwright._impl._driver import compute_driver_executable +from playwright._repo_version import version def main() -> None: - driver_executable = compute_driver_executable() - my_env = os.environ.copy() - my_env["PW_CLI_TARGET_LANG"] = "python" - subprocess.run([str(driver_executable), *sys.argv[1:]], env=my_env) + if "envinfo" in sys.argv: + print(f"- Playwright Version: {version}") + print(f"- Operating System: {platform.platform()}") + print(f"- Python Version: {sys.version}") + else: + driver_executable = compute_driver_executable() + env = os.environ.copy() + env["PW_CLI_TARGET_LANG"] = "python" + subprocess.run([str(driver_executable), *sys.argv[1:]], env=env) if __name__ == "__main__":