aselenium 1.0.0__tar.gz → 1.0.2__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.
Files changed (60) hide show
  1. {aselenium-1.0.0 → aselenium-1.0.2}/MANIFEST.in +1 -0
  2. {aselenium-1.0.0/src/aselenium.egg-info → aselenium-1.0.2}/PKG-INFO +3 -2
  3. {aselenium-1.0.0 → aselenium-1.0.2}/setup.cfg +1 -1
  4. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/actions.py +61 -61
  5. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/alert.py +8 -8
  6. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/connection.py +9 -9
  7. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/element.py +99 -98
  8. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/options.py +115 -128
  9. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/service.py +22 -22
  10. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/session.py +346 -346
  11. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/shadow.py +33 -33
  12. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/utils.py +28 -28
  13. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/webdriver.py +22 -22
  14. {aselenium-1.0.0 → aselenium-1.0.2/src/aselenium.egg-info}/PKG-INFO +3 -2
  15. {aselenium-1.0.0 → aselenium-1.0.2}/LICENSE +0 -0
  16. {aselenium-1.0.0 → aselenium-1.0.2}/README.md +0 -0
  17. {aselenium-1.0.0 → aselenium-1.0.2}/pyproject.toml +0 -0
  18. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/__init__.py +0 -0
  19. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chrome/__init__.py +0 -0
  20. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chrome/options.py +0 -0
  21. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chrome/service.py +0 -0
  22. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chrome/session.py +0 -0
  23. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chrome/webdriver.py +0 -0
  24. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chromium/__init__.py +0 -0
  25. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chromium/options.py +0 -0
  26. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chromium/service.py +0 -0
  27. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chromium/session.py +0 -0
  28. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/chromium/webdriver.py +0 -0
  29. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/command.py +0 -0
  30. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/edge/__init__.py +0 -0
  31. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/edge/options.py +0 -0
  32. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/edge/service.py +0 -0
  33. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/edge/session.py +0 -0
  34. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/edge/webdriver.py +0 -0
  35. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/errors.py +0 -0
  36. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/firefox/__init__.py +0 -0
  37. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/firefox/options.py +0 -0
  38. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/firefox/service.py +0 -0
  39. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/firefox/session.py +0 -0
  40. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/firefox/utils.py +0 -0
  41. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/firefox/webdriver.py +0 -0
  42. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/javascript/__init__.py +0 -0
  43. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/javascript/get_attribute.py +0 -0
  44. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/javascript/is_viewable.py +0 -0
  45. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/logs.py +0 -0
  46. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/manager/__init__.py +0 -0
  47. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/manager/driver.py +0 -0
  48. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/manager/file.py +0 -0
  49. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/manager/version.py +0 -0
  50. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/safari/__init__.py +0 -0
  51. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/safari/options.py +0 -0
  52. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/safari/service.py +0 -0
  53. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/safari/session.py +0 -0
  54. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/safari/webdriver.py +0 -0
  55. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/settings.py +0 -0
  56. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium/valuewrap.py +0 -0
  57. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium.egg-info/SOURCES.txt +0 -0
  58. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium.egg-info/dependency_links.txt +0 -0
  59. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium.egg-info/requires.txt +0 -0
  60. {aselenium-1.0.0 → aselenium-1.0.2}/src/aselenium.egg-info/top_level.txt +0 -0
@@ -3,4 +3,5 @@ include README.md
3
3
 
4
4
  include src/aselenium/*.pxd
5
5
  include src/aselenium/*.py
6
+ include src/aselenium/*.pyi
6
7
  include src/aselenium/*.pyx
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: aselenium
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Asyncronous implementation of web browser automation for Python.
5
5
  Home-page: https://github.com/AresJef/Aselenium
6
6
  Author: Jiefu Chen
@@ -19,6 +19,7 @@ Requires-Dist: pandas>=2.1.0
19
19
  Requires-Dist: psutil>=5.8.0
20
20
  Requires-Dist: pyarrow>=12.0.1
21
21
  Requires-Dist: orjson>=3.9.5
22
+ Dynamic: license-file
22
23
 
23
24
  ## Asyncronous implementation of web browser automation for Python.
24
25
 
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = aselenium
3
- version = 1.0.0
3
+ version = 1.0.2
4
4
  author = Jiefu Chen
5
5
  author_email = keppa1991@163.com
6
6
  description = Asyncronous implementation of web browser automation for Python.
@@ -125,10 +125,10 @@ class Actions:
125
125
  interactions such as mouse movements, key presses, and
126
126
  wheel scrolls.
127
127
 
128
- :param session: `<Session>` The session to perform the action chain.
129
- :param pointer: `<str>` The pointer type to use. Defaults to `'mouse'`.
128
+ :param session `<'Session'>`: The session to perform the action chain.
129
+ :param pointer `<'str'>`: The pointer type to use. Defaults to `'mouse'`.
130
130
  Available options: `"mouse"`, `"pen"`, `"touch"`.
131
- :param duration: `<int/float>` The duration in seconds to perform a pointer move or wheel scroll action. Defaults to `0.2`.
131
+ :param duration `<'int/float'>`: The duration in seconds to perform a pointer move or wheel scroll action. Defaults to `0.2`.
132
132
  """
133
133
  # Validate pointer
134
134
  if pointer not in Constraint.POINTER_TYPES:
@@ -163,7 +163,7 @@ class Actions:
163
163
  # Properties --------------------------------------------------------------------------
164
164
  @property
165
165
  def actions(self) -> ActionsChain:
166
- """Access all the actions to be performed `<ActionsDict>`.
166
+ """Access all the actions to be performed `<'ActionsDict'>`.
167
167
 
168
168
  Expected format:
169
169
  >>> {
@@ -188,16 +188,16 @@ class Actions:
188
188
  ) -> Actions:
189
189
  """Move the pointer (mouse) to an element (or a location).
190
190
 
191
- :param element: `<Element/None>` The Element to move to. Defaults to `None`.
191
+ :param element `<'Element/None'>`: The Element to move to. Defaults to `None`.
192
192
  - If specified, moves the pointer to the center of the element,
193
193
  where 'x/y' are the offsets relative to the center.
194
194
  - If not specified (`None`), moves the pointer to the given 'x/y'
195
195
  coordinates of the viewport.
196
196
 
197
- :param x: `<int>` The x-coordinate of the viewport, `*OR*` the x-offset to the center of an 'element'. Defaults to `0`.
198
- :param y: `<int>` The y-coordinate of the viewport, `*OR*` the y-offset to the center of an 'element'. Defaults to `0`.
199
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
200
- :return `<Actions>`: The actions chain.
197
+ :param x `<'int'>`: The x-coordinate of the viewport, `*OR*` the x-offset to the center of an 'element'. Defaults to `0`.
198
+ :param y `<'int'>`: The y-coordinate of the viewport, `*OR*` the y-offset to the center of an 'element'. Defaults to `0`.
199
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
200
+ :returns `<'Actions'>`: The actions chain.
201
201
 
202
202
  ### Example:
203
203
  >>> # . move the pointer to x/y coordinates of the viewport
@@ -221,10 +221,10 @@ class Actions:
221
221
  ) -> Actions:
222
222
  """Move the pointer (mouse) by the given offsets.
223
223
 
224
- :param x: `<int>` The x-coordinate offset relative to the pointer. Defaults to `0`.
225
- :param y: `<int>` The y-coordinate offset relative to the pointer. Defaults to `0`.
226
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
227
- :return `<Actions>`: The actions chain.
224
+ :param x `<'int'>`: The x-coordinate offset relative to the pointer. Defaults to `0`.
225
+ :param y `<'int'>`: The y-coordinate offset relative to the pointer. Defaults to `0`.
226
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
227
+ :returns `<'Actions'>`: The actions chain.
228
228
 
229
229
  ### Example:
230
230
  >>> # . move the pointer by x/y offset relative to its origin
@@ -242,11 +242,11 @@ class Actions:
242
242
  ) -> Actions:
243
243
  """Click a button of the pointer (mouse).
244
244
 
245
- :param button: `<int>` The button to click. Defaults to `MouseButtons.LEFT`.
246
- :param hold: `<bool>` Whether to hold the button down after clicked. Defaults to `False`.
247
- :param double: `<bool>` Whether to perform a double click (ignored when `hold=True`). Defaults to `False`.
248
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
249
- :return `<Actions>`: The Actions chian.
245
+ :param button `<'int'>`: The button to click. Defaults to `MouseButtons.LEFT`.
246
+ :param hold `<'bool'>`: Whether to hold the button down after clicked. Defaults to `False`.
247
+ :param double `<'bool'>`: Whether to perform a double click (ignored when `hold=True`). Defaults to `False`.
248
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
249
+ :returns `<'Actions'>`: The actions chain.
250
250
 
251
251
  ### Example:
252
252
  >>> # . click (press & release) the left button of the pointer
@@ -276,9 +276,9 @@ class Actions:
276
276
  """Release a previously press & hold button of the pointer (mouse).
277
277
  Use after the action `click(hold=True)`.
278
278
 
279
- :param button: `<int>` The button to release. Defaults to `MouseButtons.LEFT`.
280
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
281
- :return `<Actions>`: The actions chain.
279
+ :param button `<'int'>`: The button to release. Defaults to `MouseButtons.LEFT`.
280
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
281
+ :returns `<'Actions'>`: The actions chain.
282
282
 
283
283
  ### Example:
284
284
  >>> # . press & hold & release the left button of the pointer
@@ -304,14 +304,14 @@ class Actions:
304
304
  ) -> Actions:
305
305
  """Drag and drop an element (coordinates) to another element (coordinates).
306
306
 
307
- :param drag: `<Element/None>` The source element to drag. Defaults to `None`.
308
- :param drag_x: `<int>` The x-coordinate of the viewport, `*OR*` the x-offset to the center of a 'drag' element. Defaults to `0`.
309
- :param drag_y: `<int>` The y-coordinate of the viewport, `*OR*` the y-offset to the center of a 'drag' element. Defaults to `0`.
310
- :param drop: `<Element/None>` The destination element to drop. Defaults to `None`.
311
- :param drop_x: `<int>` The x-coordinate of the viewport, `*OR*` the x-offset to the center of an 'drop' element. Defaults to `0`.
312
- :param drop_y: `<int>` The y-coordinate of the viewport, `*OR*` the y-offset to the center of an 'drop' element. Defaults to `0`.
313
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
314
- :return `<Actions>`: The actions chain.
307
+ :param drag `<'Element/None'>`: The source element to drag. Defaults to `None`.
308
+ :param drag_x `<'int'>`: The x-coordinate of the viewport, `*OR*` the x-offset to the center of a 'drag' element. Defaults to `0`.
309
+ :param drag_y `<'int'>`: The y-coordinate of the viewport, `*OR*` the y-offset to the center of a 'drag' element. Defaults to `0`.
310
+ :param drop `<'Element/None'>`: The destination element to drop. Defaults to `None`.
311
+ :param drop_x `<'int'>`: The x-coordinate of the viewport, `*OR*` the x-offset to the center of an 'drop' element. Defaults to `0`.
312
+ :param drop_y `<'int'>`: The y-coordinate of the viewport, `*OR*` the y-offset to the center of an 'drop' element. Defaults to `0`.
313
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
314
+ :returns `<'Actions'>`: The actions chain.
315
315
 
316
316
  ### Notice:
317
317
  The `drag_and_drop` method eqvivalent to the following actions:
@@ -414,9 +414,9 @@ class Actions:
414
414
  ) -> Actions:
415
415
  """Press down a keyboard KEY.
416
416
 
417
- :param key: `<str/KeyboardKeys>` The KEY to press down.
418
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
419
- :return `<Actions>`: The actions chain.
417
+ :param key `<'str/KeyboardKeys'>`: The KEY to press down.
418
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
419
+ :returns `<'Actions'>`: The actions chain.
420
420
 
421
421
  ### Example:
422
422
  >>> # . control + a (select all)
@@ -436,9 +436,9 @@ class Actions:
436
436
  def key_up(self, key: str, pause: int | float | None = None) -> Actions:
437
437
  """Release a keyboard KEY.
438
438
 
439
- :param key: `<str>` The KEY to release.
440
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
441
- :return `<Actions>`: The actions chain.
439
+ :param key `<'str'>`: The KEY to release.
440
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
441
+ :returns `<'Actions'>`: The actions chain.
442
442
 
443
443
  ### Example:
444
444
  >>> # . control + a (select all)
@@ -467,9 +467,9 @@ class Actions:
467
467
  the actions of typing a series of keyboard keys, such as `Hello world!`.
468
468
  Each key is first pressed down and then released in the specified order.
469
469
 
470
- :param keys: `<str/KeyboardKeys>` The keys to send.
471
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
472
- :return `<Actions>`: The actions chain.
470
+ :param keys `<'str/KeyboardKeys'>`: The keys to send.
471
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
472
+ :returns `<'Actions'>`: The actions chain.
473
473
 
474
474
  Example:
475
475
  >>> From aselenium import KeyboardKeys
@@ -501,9 +501,9 @@ class Actions:
501
501
  `ctrl + c` (copy), `ctrl + v` (paste), etc. Each key is first pressed down in
502
502
  the specified order, and then released in the reverse order.
503
503
 
504
- :param keys: `<str/KeyboardKeys>` The keys combinations to send.
505
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
506
- :return `<Actions>`: The actions chain.
504
+ :param keys `<'str/KeyboardKeys'>`: The keys combinations to send.
505
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
506
+ :returns `<'Actions'>`: The actions chain.
507
507
 
508
508
  ### Example:
509
509
  >>> From aselenium import KeyboardKeys
@@ -568,11 +568,11 @@ class Actions:
568
568
  ) -> Actions:
569
569
  """Scroll the viewport to an element.
570
570
 
571
- :param element: `<Element/None>` The Element to scroll to.
572
- :param x: `<int>` The x-offset to the center of an 'element'. Defaults to `0`.
573
- :param y: `<int>` The y-offset to the center of an 'element'. Defaults to `0`.
574
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
575
- :return `<Actions>`: The actions chain.
571
+ :param element `<'Element/None'>`: The Element to scroll to.
572
+ :param x `<'int'>`: The x-offset to the center of an 'element'. Defaults to `0`.
573
+ :param y `<'int'>`: The y-offset to the center of an 'element'. Defaults to `0`.
574
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
575
+ :returns `<'Actions'>`: The actions chain.
576
576
  """
577
577
  if not isinstance(element, Element):
578
578
  raise errors.InvalidArgumentError(
@@ -592,10 +592,10 @@ class Actions:
592
592
  ) -> Actions:
593
593
  """Scroll the viewport by the given offsets.
594
594
 
595
- :param x: `<int>` The x-coordinate offset relative to current viewport position. Defaults to `0`.
596
- :param y: `<int>` The y-coordinate offset relative to current viewport position. Defaults to `0`.
597
- :param pause: `<int/float/None>` Total seconds to pause after the action. Defaults to `None`.
598
- :return `<Actions>`: The actions chain.
595
+ :param x `<'int'>`: The x-coordinate offset relative to current viewport position. Defaults to `0`.
596
+ :param y `<'int'>`: The y-coordinate offset relative to current viewport position. Defaults to `0`.
597
+ :param pause `<'int/float/None'>`: Total seconds to pause after the action. Defaults to `None`.
598
+ :returns `<'Actions'>`: The actions chain.
599
599
  """
600
600
  self._wheel_scroll(x_delta=x, y_delta=y, origin="viewport")
601
601
  return self.pause(pause)
@@ -654,8 +654,8 @@ class Actions:
654
654
  def pause(self, duration: int | float | None) -> Actions:
655
655
  """Pause the chain for a given duration.
656
656
 
657
- :param duration: `<int/float/None>` The duration to pause in seconds.
658
- :return `<Actions>`: The actions chain.
657
+ :param duration `<'int/float/None'>`: The duration to pause in seconds.
658
+ :returns `<'Actions'>`: The actions chain.
659
659
  """
660
660
  if duration is None:
661
661
  return self
@@ -663,7 +663,7 @@ class Actions:
663
663
  duration = int(duration * 1000)
664
664
  except Exception as err:
665
665
  raise errors.InvalidArgumentError(
666
- "<{}>\nArgument 'duration' must be a positive `<int/float>`, "
666
+ "<{}>\nArgument 'duration' must be a positive `<'int/float'>`, "
667
667
  "instead of: {}.".format(self.__class__.__name__, repr(duration))
668
668
  ) from err
669
669
  self._add_pointer_pause(duration)
@@ -675,13 +675,13 @@ class Actions:
675
675
  async def perform(self, explicit_wait: int | float | None = None) -> None:
676
676
  """Perform (execute) the actions chain.
677
677
 
678
- :param explicit_wait: `<int/float/None>` Total seconds to wait after sending the actions command. Defaults to `None`.
679
- - For Chromium based browsers, this argument is usually not needed. The webdriver
680
- itself will wait until all the actions are performed before returning a response.
681
- - For Firefox, specifing an explicit wait is required in most cases, since the
682
- webdriver will return a response immediately after receiving the actions command.
683
- Without an explicit long enough block, the next line of code will be executed
684
- while the browser is still performing the actions.
678
+ :param explicit_wait `<'int/float/None'>`: Total seconds to wait after sending the actions command. Defaults to `None`.
679
+ - For Chromium based browsers, this argument is usually not needed. The webdriver
680
+ itself will wait until all the actions are performed before returning a response.
681
+ - For Firefox, specifing an explicit wait is required in most cases, since the
682
+ webdriver will return a response immediately after receiving the actions command.
683
+ Without an explicit long enough block, the next line of code will be executed
684
+ while the browser is still performing the actions.
685
685
  """
686
686
  # Perform the actions
687
687
  try:
@@ -716,7 +716,7 @@ class Actions:
716
716
  except Exception as err:
717
717
  raise errors.InvalidArgumentError(
718
718
  "<{}>\nArgument 'explicit_wait' must "
719
- "be a positive `<int/float>`, instead of: {} {}.".format(
719
+ "be a positive `<'int/float'>`, instead of: {} {}.".format(
720
720
  self.__class__.__name__, repr(explicit_wait), type(explicit_wait)
721
721
  )
722
722
  ) from err
@@ -35,14 +35,14 @@ class Alert:
35
35
  def __init__(self, session: Session) -> None:
36
36
  """The JavaScript alert.
37
37
 
38
- :param session: `<Session>` The session the alert raises.
38
+ :param session `<'Session'>`: The session the alert raises.
39
39
  """
40
40
  self._session: Session = session
41
41
 
42
42
  # Properties --------------------------------------------------------------------------
43
43
  @property
44
44
  async def text(self) -> str | None:
45
- """Access the text of the alert `<str>`."""
45
+ """Access the text of the alert `<'str'>`."""
46
46
  try:
47
47
  res = await self._session.execute_command(Command.W3C_GET_ALERT_TEXT)
48
48
  except errors.InvalidMethodError:
@@ -59,7 +59,7 @@ class Alert:
59
59
  async def dismiss(self, pause: int | float | None = None) -> None:
60
60
  """Dismiss the alert.
61
61
 
62
- :param pause: `<int/float/None>` The pause in seconds after execution. Defaults to `None`.
62
+ :param pause `<'int/float/None'>`: The pause in seconds after execution. Defaults to `None`.
63
63
  This can be useful to wait for the command to take effect,
64
64
  before executing the next command. Defaults to `None` - no pause.
65
65
  """
@@ -69,7 +69,7 @@ class Alert:
69
69
  async def accept(self, pause: int | float | None = None) -> None:
70
70
  """Accept the alert.
71
71
 
72
- :param pause: `<int/float/None>` The pause in seconds after execution. Defaults to `None`.
72
+ :param pause `<'int/float/None'>`: The pause in seconds after execution. Defaults to `None`.
73
73
  This can be useful to wait for the command to take effect,
74
74
  before executing the next command. Defaults to `None` - no pause.
75
75
  """
@@ -84,9 +84,9 @@ class Alert:
84
84
  ) -> None:
85
85
  """Simulate typing or keyboard keys pressing into the alert.
86
86
 
87
- :param values: `<str>` strings to be typed or keyboard keys to be pressed.
88
- :param sep: `<str>` The separator between each values. Defaults to `' '`.
89
- :param pause: `<int/float/None>` The pause in seconds after execution. Defaults to `None`.
87
+ :param values `<'str'>`: The strings to be typed or keyboard keys to be pressed.
88
+ :param sep `<'str'>`: The separator between each values. Defaults to `' '`.
89
+ :param pause `<'int/float/None'>`: The pause in seconds after execution. Defaults to `None`.
90
90
  This can be useful to wait for the command to take effect,
91
91
  before executing the next command. Defaults to `None` - no pause.
92
92
 
@@ -117,7 +117,7 @@ class Alert:
117
117
  async def pause(self, duration: int | float | None) -> None:
118
118
  """Pause the for a given duration.
119
119
 
120
- :param duration: `<int/float/None>` The duration to pause in seconds.
120
+ :param duration `<'int/float/None'>`: The duration to pause in seconds.
121
121
  """
122
122
  if duration is None:
123
123
  return None # exit
@@ -44,7 +44,7 @@ class Connection:
44
44
  def __init__(self, session: ClientSession, session_timeout: int | float) -> None:
45
45
  """The connection to a remote server (Browser driver).
46
46
 
47
- :param session: `<ClientSession>` The async session of the connection.
47
+ :param session `<'ClientSession'>`: The async session of the connection.
48
48
  """
49
49
  self._session: ClientSession = session
50
50
  self._session_timeout: int | float = session_timeout
@@ -60,17 +60,17 @@ class Connection:
60
60
  ) -> dict[str, Any]:
61
61
  """Execute a command.
62
62
 
63
- :param base_url: `<str>` The base url of the command.
64
- :param command: `<str>` The command to execute.
65
- :param body: `<dict/None>` The body of the command. Defaults to `None`.
66
- :param keys: `<dict/None>` The keys to substitute in the command. Defaults to `None`.
67
- :param timeout: `<int/float/None>` Session timeout for command execution. Defaults to `None`.
63
+ :param base_url `<'str'>`: The base url of the command.
64
+ :param command `<'str'>`: The command to execute.
65
+ :param body `<'dict/None'>`: The body of the command. Defaults to `None`.
66
+ :param keys `<'dict/None'>`: The keys to substitute in the command. Defaults to `None`.
67
+ :param timeout `<'int/float/None'>`: Session timeout for command execution. Defaults to `None`.
68
68
  This arguments overwrites the default `options.session_timeout`,
69
69
  which is designed to cope with a frozen session due to unknown
70
70
  errors. For more information about session timeout, please refer
71
71
  to the documentation of `options.session_timeout` attribute.
72
72
 
73
- :return: `<dict>` The response from the command.
73
+ :returns `<'dict'>`: The response from the command.
74
74
  """
75
75
  # Map command
76
76
  method, cmd = self.map_command(command)
@@ -183,8 +183,8 @@ class Connection:
183
183
  def map_command(self, command: str) -> tuple[str, str]:
184
184
  """Map a command to its method and commond value.
185
185
 
186
- :param command: `<str>` The command to map.
187
- :return: `<tuple>` The method and commond value of the command.
186
+ :param command `<'str'>`: The command to map.
187
+ :returns `<'tuple'>`: The method and commond value of the command.
188
188
  """
189
189
  try:
190
190
  return COMMANDS[command]