Skip to content

Commit

Permalink
Merge pull request #80 from geopozo/andrew/diagnostic
Browse files Browse the repository at this point in the history
Andrew/diagnostic
  • Loading branch information
ayjayt authored Sep 26, 2024
2 parents c4d77c6 + af82259 commit bf69ffd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
24 changes: 24 additions & 0 deletions devtools/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,27 @@ def write_json(self, obj):
self.pipe.write_json(obj)
return key

def diagnose():
print("*****************************************")
print("Please copy and paste all these results to an issue or to slack!")
print("Collecting information about the system:")
print(platform.system())
print(platform.release())
print(platform.version())
print(platform.uname())
print("Looking for browser:")
print(which_browser())
print("Running a very simple test...")
try:
import pip
print(pip.get_installed_distributions())
except ImportError:
print("No pip installed for getting version")
finally:
pass
async def test():
browser = await Browser(debug=True, debug_browser=True)
await asyncio.sleep(2)
await browser.close()
asyncio.run(test())
print("Thank you! Please share these results with us!")
1 change: 1 addition & 0 deletions devtools/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# edge = // this needs to be tested



def which_windows():
import winreg
import re
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ find = {namespaces = false}
name = "devtools"
description = "Devtools protocol"
requires-python = ">=3.9"
version = "0.0.1"
dynamic = ["version"]

[project.optional-dependencies]
dev = [
"pytest",
]

[project.scripts]
devtools-doctor = "devtools.browser:diagnose"

[tool.ruff.lint]
ignore = ["E701"]

[tool.setuptools-git-versioning]
enabled = true

0 comments on commit bf69ffd

Please sign in to comment.