pomcorn 0.7.2__py3-none-any.whl → 0.7.4__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 pomcorn might be problematic. Click here for more details.
pomcorn/page.py
CHANGED
|
@@ -103,12 +103,18 @@ class Page(WebView):
|
|
|
103
103
|
path: Relative URL.
|
|
104
104
|
|
|
105
105
|
"""
|
|
106
|
-
|
|
106
|
+
# hack to not specify app_root in each page init method
|
|
107
|
+
if app_root:
|
|
108
|
+
kwargs["app_root"] = app_root
|
|
109
|
+
|
|
107
110
|
# We don't use `page.navigate_relative` here because we need to
|
|
108
111
|
# navigate to relative url before page is initialized, since otherwise
|
|
109
112
|
# `wait_until_loaded` method in page `__init__` method might fail.
|
|
110
|
-
webdriver.get(
|
|
111
|
-
|
|
113
|
+
webdriver.get(
|
|
114
|
+
url=cls._get_full_relative_url(app_root or cls.APP_ROOT, path),
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
page = cls(webdriver, **kwargs)
|
|
112
118
|
return page
|
|
113
119
|
|
|
114
120
|
def refresh(self) -> None:
|
|
@@ -147,25 +153,19 @@ class Page(WebView):
|
|
|
147
153
|
)
|
|
148
154
|
|
|
149
155
|
def click_on_page(self) -> None:
|
|
150
|
-
"""Click on (1, 1) coordinates of
|
|
156
|
+
"""Click on (1, 1) coordinates of page (left upper corner).
|
|
151
157
|
|
|
152
158
|
Allows you to move focus away from an element, for example, if it
|
|
153
159
|
is currently unavailable for interaction.
|
|
154
160
|
|
|
155
161
|
"""
|
|
156
|
-
from selenium.webdriver.common.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
html_webelement = self.init_element(
|
|
161
|
-
locator=locators.TagNameLocator("html"),
|
|
162
|
-
).get_element()
|
|
162
|
+
from selenium.webdriver.common.actions.action_builder import (
|
|
163
|
+
ActionBuilder,
|
|
164
|
+
)
|
|
163
165
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
yoffset=1, # cspell:disable-line
|
|
168
|
-
).click().perform()
|
|
166
|
+
action = ActionBuilder(self.webdriver)
|
|
167
|
+
action.pointer_action.move_to_location(1, 1).click()
|
|
168
|
+
action.perform()
|
|
169
169
|
|
|
170
170
|
@staticmethod
|
|
171
171
|
def _get_full_relative_url(app_root: str, relative_url: str) -> str:
|
|
@@ -7,11 +7,11 @@ pomcorn/exceptions.py,sha256=8ZOmrybDwvEVZRLQzyozjRNhJvSLbablaFwGFUVMhrU,1131
|
|
|
7
7
|
pomcorn/locators/__init__.py,sha256=hNSlfmz3y-LI4PXF5VIwX8J5WSalyE2wmzuYc6kNxMA,708
|
|
8
8
|
pomcorn/locators/base_locators.py,sha256=B4SDSKi5j7kqwbxllnMHU9BKBJzn_dzNRphPQ2hTuss,7065
|
|
9
9
|
pomcorn/locators/xpath_locators.py,sha256=OjwTdHwqDfX_5aP0N6YeFwRl2gPr8ZNQny8yLxBrVCo,7264
|
|
10
|
-
pomcorn/page.py,sha256=
|
|
10
|
+
pomcorn/page.py,sha256=wuLoGUn1n0e7wSXLGYyUVnoPlz_gMfT8Jtg6yA09IeY,5755
|
|
11
11
|
pomcorn/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
pomcorn/waits_conditions.py,sha256=E8sLfBvIV2EO91Mm5KyKXB5IGEB9gUWza3XPE4_aCQE,3528
|
|
13
13
|
pomcorn/web_view.py,sha256=PlwEVgdOwFZXJY2WuUT2C2wyK1xOBJne5-A_FOuwsQI,14209
|
|
14
|
-
pomcorn-0.7.
|
|
15
|
-
pomcorn-0.7.
|
|
16
|
-
pomcorn-0.7.
|
|
17
|
-
pomcorn-0.7.
|
|
14
|
+
pomcorn-0.7.4.dist-info/LICENSE,sha256=1vmhQNp1dDH8ksJ199LuG4oKz5D4ZvNccPcFckiG2S4,1091
|
|
15
|
+
pomcorn-0.7.4.dist-info/METADATA,sha256=mzNeYBOWd2HGXSzs7yQNPFPswimwGFfFIb6gPHg9ZDM,5949
|
|
16
|
+
pomcorn-0.7.4.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
17
|
+
pomcorn-0.7.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|