pomcorn 0.7.1__py3-none-any.whl → 0.7.2__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
|
@@ -108,7 +108,7 @@ class Page(WebView):
|
|
|
108
108
|
# navigate to relative url before page is initialized, since otherwise
|
|
109
109
|
# `wait_until_loaded` method in page `__init__` method might fail.
|
|
110
110
|
webdriver.get(cls._get_full_relative_url(app_root, path))
|
|
111
|
-
page = cls(webdriver, app_root=app_root)
|
|
111
|
+
page = cls(webdriver, app_root=app_root, **kwargs)
|
|
112
112
|
return page
|
|
113
113
|
|
|
114
114
|
def refresh(self) -> None:
|
|
@@ -147,7 +147,7 @@ class Page(WebView):
|
|
|
147
147
|
)
|
|
148
148
|
|
|
149
149
|
def click_on_page(self) -> None:
|
|
150
|
-
"""Click on (1, 1) coordinates
|
|
150
|
+
"""Click on (1, 1) coordinates of `html` tag (page upper left corner).
|
|
151
151
|
|
|
152
152
|
Allows you to move focus away from an element, for example, if it
|
|
153
153
|
is currently unavailable for interaction.
|
|
@@ -155,7 +155,14 @@ class Page(WebView):
|
|
|
155
155
|
"""
|
|
156
156
|
from selenium.webdriver.common.action_chains import ActionChains
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
from pomcorn import locators
|
|
159
|
+
|
|
160
|
+
html_webelement = self.init_element(
|
|
161
|
+
locator=locators.TagNameLocator("html"),
|
|
162
|
+
).get_element()
|
|
163
|
+
|
|
164
|
+
ActionChains(self.webdriver).move_to_element_with_offset(
|
|
165
|
+
to_element=html_webelement,
|
|
159
166
|
xoffset=1, # cspell:disable-line
|
|
160
167
|
yoffset=1, # cspell:disable-line
|
|
161
168
|
).click().perform()
|
|
@@ -168,6 +175,12 @@ class Page(WebView):
|
|
|
168
175
|
relative_url (str): Relative URL
|
|
169
176
|
|
|
170
177
|
"""
|
|
171
|
-
if
|
|
172
|
-
|
|
173
|
-
|
|
178
|
+
if app_root.endswith("/"):
|
|
179
|
+
# https://www.youtube.com/ -> https://www.youtube.com
|
|
180
|
+
app_root = app_root[:-1]
|
|
181
|
+
|
|
182
|
+
if relative_url.startswith("/"):
|
|
183
|
+
# /watch_list -> watch_list
|
|
184
|
+
relative_url = relative_url[1:]
|
|
185
|
+
|
|
186
|
+
return f"{app_root}/{relative_url}"
|
|
@@ -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=W4sGiYg8NfScsq20pMohYZdQC868i78k1Qd-XYeD2QI,5876
|
|
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.2.dist-info/LICENSE,sha256=1vmhQNp1dDH8ksJ199LuG4oKz5D4ZvNccPcFckiG2S4,1091
|
|
15
|
+
pomcorn-0.7.2.dist-info/METADATA,sha256=Tb96V2WQQJgVPE0-tbXb5FH7_1yjyUaOExaAAJcXPBc,5949
|
|
16
|
+
pomcorn-0.7.2.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
17
|
+
pomcorn-0.7.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|