Promium 3.7.3__tar.gz → 3.7.4__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.
- {promium-3.7.3 → promium-3.7.4}/PKG-INFO +1 -1
- {promium-3.7.3 → promium-3.7.4}/Promium.egg-info/PKG-INFO +1 -1
- {promium-3.7.3 → promium-3.7.4}/promium/elements/input_field.py +3 -38
- {promium-3.7.3 → promium-3.7.4}/setup.py +1 -1
- {promium-3.7.3 → promium-3.7.4}/LICENSE +0 -0
- {promium-3.7.3 → promium-3.7.4}/Promium.egg-info/SOURCES.txt +0 -0
- {promium-3.7.3 → promium-3.7.4}/Promium.egg-info/dependency_links.txt +0 -0
- {promium-3.7.3 → promium-3.7.4}/Promium.egg-info/entry_points.txt +0 -0
- {promium-3.7.3 → promium-3.7.4}/Promium.egg-info/requires.txt +0 -0
- {promium-3.7.3 → promium-3.7.4}/Promium.egg-info/top_level.txt +0 -0
- {promium-3.7.3 → promium-3.7.4}/README.rst +0 -0
- {promium-3.7.3 → promium-3.7.4}/doc/__init__.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/doc/conf.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/__init__.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/_diag.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/assertions.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/base.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/browsers.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/common.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/device_config.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/__init__.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/checkbox.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/drop_downs.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/frame.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/link.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/multiselect_listbox.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/radio_button.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/textarea_field.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/elements/upload_button.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/exceptions.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/expected_conditions.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/helpers.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/logger.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/plugin.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/support/__init__.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/support/settings.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/test_case.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/promium/waits.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/pyproject.toml +0 -0
- {promium-3.7.3 → promium-3.7.4}/setup.cfg +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/__init__.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/config.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/conftest.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/pages/__init__.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/pages/catalog_404_page.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/pages/catalog_gallery_page.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/settings/__init__.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/settings/test_base.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/settings/test_chrome.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/settings/test_edge.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/settings/test_firefox.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/settings/test_ie.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/settings/test_opera.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/test_catalog_404.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/test_catalog_gallery.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/test_enviroment.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/test_requests.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/test_soft_asserts.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/test_waits.py +0 -0
- {promium-3.7.3 → promium-3.7.4}/tests/urls.py +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import contextlib
|
|
2
2
|
|
|
3
|
-
from selenium.webdriver.common.action_chains import ActionChains
|
|
4
3
|
from selenium.webdriver.common.keys import Keys
|
|
5
4
|
|
|
6
5
|
from promium.base import Element
|
|
@@ -49,43 +48,9 @@ class InputField(Element):
|
|
|
49
48
|
self.lookup().send_keys(*keys)
|
|
50
49
|
|
|
51
50
|
def _clear_field_with_keyboard(self) -> None:
|
|
52
|
-
"""Clear the field using
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
push_step(f'clear_with_keyboard("{self._fmt_locator()}")')
|
|
56
|
-
el = self.lookup()
|
|
57
|
-
with contextlib.suppress(Exception):
|
|
58
|
-
el.click()
|
|
59
|
-
for mod in (Keys.CONTROL, Keys.COMMAND):
|
|
60
|
-
try:
|
|
61
|
-
el.send_keys(mod, "a")
|
|
62
|
-
break
|
|
63
|
-
except TypeError:
|
|
64
|
-
try:
|
|
65
|
-
ActionChains(self.driver).key_down(mod).send_keys(
|
|
66
|
-
"a"
|
|
67
|
-
).key_up(mod).perform()
|
|
68
|
-
break
|
|
69
|
-
except Exception:
|
|
70
|
-
pass
|
|
71
|
-
except Exception:
|
|
72
|
-
continue
|
|
73
|
-
cleared = False
|
|
74
|
-
for key in (Keys.DELETE, Keys.BACKSPACE):
|
|
75
|
-
try:
|
|
76
|
-
el.send_keys(key)
|
|
77
|
-
cleared = True
|
|
78
|
-
break
|
|
79
|
-
except TypeError:
|
|
80
|
-
with contextlib.suppress(Exception):
|
|
81
|
-
ActionChains(self.driver).send_keys(key).perform()
|
|
82
|
-
cleared = True
|
|
83
|
-
break
|
|
84
|
-
except Exception:
|
|
85
|
-
continue
|
|
86
|
-
if not cleared:
|
|
87
|
-
with contextlib.suppress(Exception):
|
|
88
|
-
el.clear()
|
|
51
|
+
"""Clear the input field using keyboard shortcuts (Ctrl+A, Backspace)"""
|
|
52
|
+
self.send_keys(f"{Keys.CONTROL}a")
|
|
53
|
+
self.send_keys(Keys.BACKSPACE)
|
|
89
54
|
|
|
90
55
|
def clear_and_fill(self, text: str) -> str | None:
|
|
91
56
|
"""Clear the field using keyboard and fill it with the given text."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|