isrpa 1.0.7__py3-none-any.whl → 1.0.9__py3-none-any.whl
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.
isrpa/utils.py
CHANGED
@@ -102,17 +102,21 @@ def get_active_url(user_name):
|
|
102
102
|
page.get("title") == "MagicalAutomator-sidePanel"
|
103
103
|
):
|
104
104
|
continue
|
105
|
-
else:
|
106
|
-
|
105
|
+
# else:
|
106
|
+
# if page.get("url") == "chrome://newtab/":
|
107
|
+
# return "chrome://new-tab-page/"
|
108
|
+
return page.get("id")
|
107
109
|
return None
|
108
110
|
|
109
111
|
|
110
|
-
def get_active_page(browser,
|
112
|
+
def get_active_page(browser, active_page_id):
|
111
113
|
"""
|
112
114
|
获取当前激活page对象
|
113
115
|
"""
|
114
116
|
for page in browser.contexts[0].pages:
|
115
|
-
|
117
|
+
client = page.context.new_cdp_session(page)
|
118
|
+
target_info = client.send("Target.getTargetInfo")
|
119
|
+
if target_info.get('targetInfo').get('targetId') == active_page_id:
|
116
120
|
page.bring_to_front()
|
117
121
|
return page
|
118
122
|
|
@@ -5,8 +5,8 @@ isrpa/__init__.py,sha256=pG-YPVG0gJIJ6s4xcAz9S_CnUxpUcz33wl9eNUSgxGk,20
|
|
5
5
|
isrpa/credentials.py,sha256=5paT4rxtZIUPqADmi1bLkoSKEYoosgS7rIjrJsgMNIs,3350
|
6
6
|
isrpa/llm_chat.py,sha256=jTuK9wcm3X36V9lXuGuTCdNup_zi2NeG2GuYHzO7gm4,1541
|
7
7
|
isrpa/message.py,sha256=N0s6hMaC5S-Pi4EhwcSp-ngfBTBQyW6ymU9sI9dUSeE,11329
|
8
|
-
isrpa/utils.py,sha256=
|
9
|
-
isrpa-1.0.
|
10
|
-
isrpa-1.0.
|
11
|
-
isrpa-1.0.
|
12
|
-
isrpa-1.0.
|
8
|
+
isrpa/utils.py,sha256=HTX3luyrOayq9bBLyNLdLkANSntp5LdFGWXps1Dknsc,5682
|
9
|
+
isrpa-1.0.9.dist-info/METADATA,sha256=E7FUX5kvfZ02XgMygRPCSDcZiznw-rri2L9rH-OFp2s,511
|
10
|
+
isrpa-1.0.9.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
11
|
+
isrpa-1.0.9.dist-info/top_level.txt,sha256=J5HJbtR2WAeKnW1rrpkiuapwnlswv3RgM-riyZD87o0,6
|
12
|
+
isrpa-1.0.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|