simplex 1.2.72__tar.gz → 1.2.73__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.

Potentially problematic release.


This version of simplex might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.1
2
2
  Name: simplex
3
- Version: 1.2.72
3
+ Version: 1.2.73
4
4
  Summary: Official Python SDK for Simplex API
5
5
  Home-page: https://simplex.sh
6
6
  Author: Simplex Labs, Inc.
@@ -19,16 +19,6 @@ Requires-Dist: python-dotenv
19
19
  Requires-Dist: click
20
20
  Provides-Extra: playwright
21
21
  Requires-Dist: rebrowser-playwright>=1.0.0; extra == "playwright"
22
- Dynamic: author
23
- Dynamic: author-email
24
- Dynamic: classifier
25
- Dynamic: description
26
- Dynamic: description-content-type
27
- Dynamic: home-page
28
- Dynamic: provides-extra
29
- Dynamic: requires-dist
30
- Dynamic: requires-python
31
- Dynamic: summary
32
22
 
33
23
  # Simplex AI Python SDK
34
24
 
@@ -22,7 +22,7 @@ class PostInstallCommand(install):
22
22
 
23
23
  setup(
24
24
  name="simplex",
25
- version="1.2.72",
25
+ version="1.2.73",
26
26
  packages=find_packages(),
27
27
  package_data={
28
28
  "simplex": ["browser_agent/dom/*.js"], # Include JS files in the dom directory
@@ -24,6 +24,8 @@ except ImportError:
24
24
  ImportWarning
25
25
  )
26
26
 
27
+ # BASE_URL = "https://simplex-dev-shreya--api-server-and-container-service-fas-bba69e.modal.run"
28
+ # BASE_URL = "https://simplex-dev--api-server-and-container-service-fastapi-app.modal.run"
27
29
  BASE_URL = "https://api.simplex.sh"
28
30
 
29
31
  class Playwright:
@@ -247,6 +249,34 @@ class Simplex:
247
249
  return response.json()["element_clicked"]
248
250
  else:
249
251
  raise ValueError(f"Failed to click element: {response.json()['error']}")
252
+
253
+ def get_dropdown_options(self, element_description: str, override_fail_state: bool = False):
254
+ if not element_description or not element_description.strip():
255
+ raise ValueError("element_description cannot be empty")
256
+ if not self.session_id:
257
+ raise ValueError(f"Must call create_session before calling action get_dropdown_options with element_description='{element_description}'")
258
+
259
+ data = {
260
+ 'element_description': element_description,
261
+ 'session_id': self.session_id,
262
+ 'override_fail_state': override_fail_state
263
+ }
264
+
265
+ response = requests.post(
266
+ f"{BASE_URL}/get_dropdown_options",
267
+ headers={
268
+ 'x-api-key': self.api_key
269
+ },
270
+ data=data
271
+ )
272
+
273
+ if 'succeeded' not in response.json():
274
+ raise ValueError(f"It looks like the get_dropdown_options action failed to return a response. Did you set your api_key when creating the Simplex class?")
275
+ if response.json()['succeeded']:
276
+ return response.json()['dropdown_options']
277
+ else:
278
+ raise ValueError(f"Failed to get dropdown options: {response.json()['error']}")
279
+
250
280
 
251
281
  def select_dropdown_option(self, element_description: str, override_fail_state: bool = False):
252
282
  if not element_description or not element_description.strip():
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.1
2
2
  Name: simplex
3
- Version: 1.2.72
3
+ Version: 1.2.73
4
4
  Summary: Official Python SDK for Simplex API
5
5
  Home-page: https://simplex.sh
6
6
  Author: Simplex Labs, Inc.
@@ -19,16 +19,6 @@ Requires-Dist: python-dotenv
19
19
  Requires-Dist: click
20
20
  Provides-Extra: playwright
21
21
  Requires-Dist: rebrowser-playwright>=1.0.0; extra == "playwright"
22
- Dynamic: author
23
- Dynamic: author-email
24
- Dynamic: classifier
25
- Dynamic: description
26
- Dynamic: description-content-type
27
- Dynamic: home-page
28
- Dynamic: provides-extra
29
- Dynamic: requires-dist
30
- Dynamic: requires-python
31
- Dynamic: summary
32
22
 
33
23
  # Simplex AI Python SDK
34
24
 
File without changes
File without changes
File without changes
File without changes
File without changes