diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 693bbd7..0d0e446 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -3,6 +3,11 @@ Version history We follow `Semantic Versions `_. +0.7.5 +******************************************************************************* +- Remove redundant call of ``scroll_to`` in ``PomcornElement.click()``. + This is redundant, as webdriver by default scrolls to element before click (`docs `_). + 0.7.4 ******************************************************************************* - Improve ``Page.click_on_page()`` method to click the page coordinates instead diff --git a/pomcorn/element.py b/pomcorn/element.py index 9e3a490..684ee66 100644 --- a/pomcorn/element.py +++ b/pomcorn/element.py @@ -285,7 +285,6 @@ def select(self, value: str, only_visible: bool = True): def click( self, only_visible: bool = True, - scroll_to: bool = True, wait_until_clickable: bool = True, ): """Click on element. @@ -293,13 +292,10 @@ def click( Args: only_visible: Flag for viewing visible elements. If this is `True` (default), then this method will only get visible elements. - scroll_to: Whether to scroll to element before clicking or not. wait_until_clickable: Wait until the element is clickable before clicking, or not (default `True`). """ - if scroll_to: - self.scroll_to(only_visible=only_visible) if wait_until_clickable: self.wait_until_clickable() self.get_element(only_visible=only_visible).click() diff --git a/pyproject.toml b/pyproject.toml index a5bcd39..678e0f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pomcorn" -version = "0.7.4" +version = "0.7.5" description = "Base implementation of Page Object Model" authors = [ "Saritasa ",