robotframework-browser-tray 1.1.1__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework_browser_tray-1.1.1 → robotframework_browser_tray-1.2.0}/PKG-INFO +1 -1
- {robotframework_browser_tray-1.1.1 → robotframework_browser_tray-1.2.0}/pyproject.toml +2 -2
- {robotframework_browser_tray-1.1.1 → robotframework_browser_tray-1.2.0}/src/robotframework_browser_tray/tray.py +5 -5
- {robotframework_browser_tray-1.1.1 → robotframework_browser_tray-1.2.0}/README.md +0 -0
- {robotframework_browser_tray-1.1.1 → robotframework_browser_tray-1.2.0}/src/robotframework_browser_tray/__init__.py +0 -0
- {robotframework_browser_tray-1.1.1 → robotframework_browser_tray-1.2.0}/src/robotframework_browser_tray/chromium.png +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "robotframework-browser-tray"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.2.0"
|
|
4
4
|
description = "Tray icon to start the Chromium installed by Browser Library"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Marduk Bolaños", email = "marduk.bolanos@imbus.de"},
|
|
@@ -22,4 +22,4 @@ build-backend = "flit_core.buildapi"
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
[tool.pdm]
|
|
25
|
-
|
|
25
|
+
distribution = true
|
|
@@ -34,13 +34,13 @@ def get_chromium_dir(node_modules: Path):
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def start_playwright(index_js: Path, playwright_process_port: int) -> Popen:
|
|
37
|
-
return Popen(
|
|
37
|
+
return Popen(['node', index_js, str(playwright_process_port)])
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
def start_chromium(chromium_dir: Path, remote_debugging_port: int, incognito: bool) -> Popen:
|
|
41
|
-
incognito_flag = "-incognito" if incognito else
|
|
41
|
+
incognito_flag = ["-incognito"] if incognito else []
|
|
42
42
|
chrome_exe = chromium_dir / "chrome-win" / "chrome.exe"
|
|
43
|
-
return Popen(f"
|
|
43
|
+
return Popen([chrome_exe, f"--remote-debugging-port={remote_debugging_port}", "--test-type"] + incognito_flag)
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
class TrayIcon:
|
|
@@ -89,13 +89,13 @@ class TrayIcon:
|
|
|
89
89
|
|
|
90
90
|
def is_running(cmd: str) -> bool:
|
|
91
91
|
process_list = subprocess.check_output(
|
|
92
|
-
["TASKLIST", "/FI", f'imagename eq {cmd}'],
|
|
92
|
+
["TASKLIST", "/V", "/FI", f'imagename eq {cmd}'],
|
|
93
93
|
encoding="utf-8"
|
|
94
94
|
).splitlines()
|
|
95
95
|
instances = [
|
|
96
96
|
process
|
|
97
97
|
for process in process_list
|
|
98
|
-
if process.startswith(cmd)
|
|
98
|
+
if process.startswith(cmd) and os.getlogin().lower() in process.lower()
|
|
99
99
|
]
|
|
100
100
|
return len(instances) > 1
|
|
101
101
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|