pomcorn 0.7.3__py3-none-any.whl → 0.7.5__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/element.py CHANGED
@@ -285,7 +285,6 @@ class PomcornElement(Generic[locators.TLocator]):
285
285
  def click(
286
286
  self,
287
287
  only_visible: bool = True,
288
- scroll_to: bool = True,
289
288
  wait_until_clickable: bool = True,
290
289
  ):
291
290
  """Click on element.
@@ -293,13 +292,10 @@ class PomcornElement(Generic[locators.TLocator]):
293
292
  Args:
294
293
  only_visible: Flag for viewing visible elements. If this is `True`
295
294
  (default), then this method will only get visible elements.
296
- scroll_to: Whether to scroll to element before clicking or not.
297
295
  wait_until_clickable: Wait until the element is clickable before
298
296
  clicking, or not (default `True`).
299
297
 
300
298
  """
301
- if scroll_to:
302
- self.scroll_to(only_visible=only_visible)
303
299
  if wait_until_clickable:
304
300
  self.wait_until_clickable()
305
301
  self.get_element(only_visible=only_visible).click()
pomcorn/page.py CHANGED
@@ -153,25 +153,19 @@ class Page(WebView):
153
153
  )
154
154
 
155
155
  def click_on_page(self) -> None:
156
- """Click on (1, 1) coordinates of `html` tag (page upper left corner).
156
+ """Click on (1, 1) coordinates of page (left upper corner).
157
157
 
158
158
  Allows you to move focus away from an element, for example, if it
159
159
  is currently unavailable for interaction.
160
160
 
161
161
  """
162
- from selenium.webdriver.common.action_chains import ActionChains
163
-
164
- from pomcorn import locators
165
-
166
- html_webelement = self.init_element(
167
- locator=locators.TagNameLocator("html"),
168
- ).get_element()
162
+ from selenium.webdriver.common.actions.action_builder import (
163
+ ActionBuilder,
164
+ )
169
165
 
170
- ActionChains(self.webdriver).move_to_element_with_offset(
171
- to_element=html_webelement,
172
- xoffset=1, # cspell:disable-line
173
- yoffset=1, # cspell:disable-line
174
- ).click().perform()
166
+ action = ActionBuilder(self.webdriver)
167
+ action.pointer_action.move_to_location(1, 1).click()
168
+ action.perform()
175
169
 
176
170
  @staticmethod
177
171
  def _get_full_relative_url(app_root: str, relative_url: str) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pomcorn
3
- Version: 0.7.3
3
+ Version: 0.7.5
4
4
  Summary: Base implementation of Page Object Model
5
5
  Home-page: https://pypi.org/project/pomcorn/
6
6
  License: MIT
@@ -2,16 +2,16 @@ pomcorn/__init__.py,sha256=V8v_V3wgKbao1KAQkcVTMnpGwyslw0nHfuTp-DwWTXg,318
2
2
  pomcorn/component.py,sha256=7nRt-A20Psm0Xl7Rm6tRUK8yOhIh4t2Bdm1fwmJ0MjA,8385
3
3
  pomcorn/descriptors/__init__.py,sha256=5q_d5GtcaFlIIyHdsUnE9UNbz3g40qJCHKNaWGvcC6s,72
4
4
  pomcorn/descriptors/element.py,sha256=4g_4ay5f00AXzCT4xHN1i7mTrlsECoUHh1Ph_TFPBDs,4502
5
- pomcorn/element.py,sha256=uxcqf3EK1TzDgdjQzhP2Ovf8GDsdas_tsJs_xPt62gI,12400
5
+ pomcorn/element.py,sha256=6VLLSPlc7961qa4rRXdno7cEAAeY8GEP2d4wtM5R9a0,12216
6
6
  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=49oQWi9yGp57T2IzjtHUepJwuJIsZwOWBNTh67O7dvI,5985
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.3.dist-info/LICENSE,sha256=1vmhQNp1dDH8ksJ199LuG4oKz5D4ZvNccPcFckiG2S4,1091
15
- pomcorn-0.7.3.dist-info/METADATA,sha256=Z2WUfZQBoHIe0n_LiSBIXKBUxHI2csmjdCdsYCcN3Io,5949
16
- pomcorn-0.7.3.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
17
- pomcorn-0.7.3.dist-info/RECORD,,
14
+ pomcorn-0.7.5.dist-info/LICENSE,sha256=1vmhQNp1dDH8ksJ199LuG4oKz5D4ZvNccPcFckiG2S4,1091
15
+ pomcorn-0.7.5.dist-info/METADATA,sha256=Z4CQLFxxt1K15BVGS-HP7cjv0VApHDmdfH7gk0Zmhps,5949
16
+ pomcorn-0.7.5.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
17
+ pomcorn-0.7.5.dist-info/RECORD,,