simplex 1.2.27__py3-none-any.whl → 1.2.28__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.
Potentially problematic release.
This version of simplex might be problematic. Click here for more details.
- simplex/simplex.py +49 -3
- {simplex-1.2.27.dist-info → simplex-1.2.28.dist-info}/METADATA +1 -1
- simplex-1.2.28.dist-info/RECORD +11 -0
- simplex-1.2.27.dist-info/RECORD +0 -11
- {simplex-1.2.27.dist-info → simplex-1.2.28.dist-info}/LICENSE +0 -0
- {simplex-1.2.27.dist-info → simplex-1.2.28.dist-info}/WHEEL +0 -0
- {simplex-1.2.27.dist-info → simplex-1.2.28.dist-info}/entry_points.txt +0 -0
- {simplex-1.2.27.dist-info → simplex-1.2.28.dist-info}/top_level.txt +0 -0
simplex/simplex.py
CHANGED
|
@@ -15,7 +15,7 @@ class Simplex:
|
|
|
15
15
|
if not self.session_id:
|
|
16
16
|
return
|
|
17
17
|
response = requests.post(
|
|
18
|
-
f"{BASE_URL}/
|
|
18
|
+
f"{BASE_URL}/close_session",
|
|
19
19
|
headers={
|
|
20
20
|
'x-api-key': self.api_key
|
|
21
21
|
},
|
|
@@ -30,7 +30,7 @@ class Simplex:
|
|
|
30
30
|
|
|
31
31
|
def create_session(self, show_in_console: Optional[bool] = True, proxies: Optional[bool] = True):
|
|
32
32
|
response = requests.post(
|
|
33
|
-
f"{BASE_URL}/
|
|
33
|
+
f"{BASE_URL}/create_session",
|
|
34
34
|
headers={
|
|
35
35
|
'x-api-key': self.api_key
|
|
36
36
|
},
|
|
@@ -134,7 +134,7 @@ class Simplex:
|
|
|
134
134
|
data['session_id'] = self.session_id
|
|
135
135
|
|
|
136
136
|
response = requests.post(
|
|
137
|
-
f"{BASE_URL}/
|
|
137
|
+
f"{BASE_URL}/press_enter",
|
|
138
138
|
headers={
|
|
139
139
|
'x-api-key': self.api_key
|
|
140
140
|
},
|
|
@@ -144,6 +144,52 @@ class Simplex:
|
|
|
144
144
|
return
|
|
145
145
|
else:
|
|
146
146
|
raise ValueError(f"Failed to press enter: {response.json()['error']}")
|
|
147
|
+
|
|
148
|
+
def press_tab(self, cdp_url: str = None):
|
|
149
|
+
if not cdp_url and not self.session_id:
|
|
150
|
+
raise ValueError("Must call create_session before calling action press_tab")
|
|
151
|
+
|
|
152
|
+
data = {}
|
|
153
|
+
|
|
154
|
+
if cdp_url:
|
|
155
|
+
data['cdp_url'] = cdp_url
|
|
156
|
+
else:
|
|
157
|
+
data['session_id'] = self.session_id
|
|
158
|
+
|
|
159
|
+
response = requests.post(
|
|
160
|
+
f"{BASE_URL}/press_tab",
|
|
161
|
+
headers={
|
|
162
|
+
'x-api-key': self.api_key
|
|
163
|
+
},
|
|
164
|
+
data=data
|
|
165
|
+
)
|
|
166
|
+
if response.json()["succeeded"]:
|
|
167
|
+
return
|
|
168
|
+
else:
|
|
169
|
+
raise ValueError(f"Failed to press tab: {response.json()['error']}")
|
|
170
|
+
|
|
171
|
+
def delete_text(self, cdp_url: str = None):
|
|
172
|
+
if not cdp_url and not self.session_id:
|
|
173
|
+
raise ValueError("Must call create_session before calling action delete_text")
|
|
174
|
+
|
|
175
|
+
data = {}
|
|
176
|
+
|
|
177
|
+
if cdp_url:
|
|
178
|
+
data['cdp_url'] = cdp_url
|
|
179
|
+
else:
|
|
180
|
+
data['session_id'] = self.session_id
|
|
181
|
+
|
|
182
|
+
response = requests.post(
|
|
183
|
+
f"{BASE_URL}/delete_text",
|
|
184
|
+
headers={
|
|
185
|
+
'x-api-key': self.api_key
|
|
186
|
+
},
|
|
187
|
+
data=data
|
|
188
|
+
)
|
|
189
|
+
if response.json()["succeeded"]:
|
|
190
|
+
return
|
|
191
|
+
else:
|
|
192
|
+
raise ValueError(f"Failed to delete text: {response.json()['error']}")
|
|
147
193
|
|
|
148
194
|
def extract_bbox(self, element_description: str, cdp_url: str = None):
|
|
149
195
|
if not cdp_url and not self.session_id:
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
simplex/__init__.py,sha256=L_5i__xt_ZDkr6e-Wx9cr84t9sXpioOT7j01NJYJCTE,75
|
|
2
|
+
simplex/cli.py,sha256=zRf59YFwDg3mrPeAuYh6pvOidRLiKkQ_NdYVP2XAXTY,2481
|
|
3
|
+
simplex/simplex.py,sha256=R0KcvnIANySK_sYkM-qtD5SIbNbTfn6_KL3nco-nUao,13809
|
|
4
|
+
simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
|
|
5
|
+
simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
|
|
6
|
+
simplex-1.2.28.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
|
|
7
|
+
simplex-1.2.28.dist-info/METADATA,sha256=G7byF_8lnKHGjpPy2nPgTvxrLY4gMcud2EqKmaE49Bc,938
|
|
8
|
+
simplex-1.2.28.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
+
simplex-1.2.28.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
|
|
10
|
+
simplex-1.2.28.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
|
|
11
|
+
simplex-1.2.28.dist-info/RECORD,,
|
simplex-1.2.27.dist-info/RECORD
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
simplex/__init__.py,sha256=L_5i__xt_ZDkr6e-Wx9cr84t9sXpioOT7j01NJYJCTE,75
|
|
2
|
-
simplex/cli.py,sha256=zRf59YFwDg3mrPeAuYh6pvOidRLiKkQ_NdYVP2XAXTY,2481
|
|
3
|
-
simplex/simplex.py,sha256=CAd7jTtrg1hYnXj2kuuXe69XOm5LVRfvbcOGqioIi7Y,12459
|
|
4
|
-
simplex/deploy/__init__.py,sha256=_JQ81F_Nu7hSAfMA691gzs6a4-8oZ-buJ9h3Au12BKw,96
|
|
5
|
-
simplex/deploy/push.py,sha256=hRAbtFZaECKnBljaOLQ5nzJ6hk7tZgc1c7QdgxKQFoY,6123
|
|
6
|
-
simplex-1.2.27.dist-info/LICENSE,sha256=Xh0SJjYZfNI71pCNMB40aKlBLLuOB0blx5xkTtufFNQ,1075
|
|
7
|
-
simplex-1.2.27.dist-info/METADATA,sha256=_wxe1paP_FZiIKF_Xx76G9EhqO1JFjTenrxSqAR1t3I,938
|
|
8
|
-
simplex-1.2.27.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
9
|
-
simplex-1.2.27.dist-info/entry_points.txt,sha256=3veL2w3c5vxb3dm8I_M8Fs-370n1ZnvD8uu1nSsL7z8,45
|
|
10
|
-
simplex-1.2.27.dist-info/top_level.txt,sha256=cbMH1bYpN0A3gP-ecibPRHasHoqB-01T_2BUFS8p0CE,8
|
|
11
|
-
simplex-1.2.27.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|