From 3eeb4057c72f99ff2eb9b264f7ef497f72fe40f9 Mon Sep 17 00:00:00 2001 From: Kyle McGonagle Date: Sat, 9 Mar 2019 22:22:36 -0500 Subject: [PATCH] Added EventFiringWebElement to the isinstance check in the move_to method. The isinstance check will now look for WebElement or EventFiringWebElement. This will fix cases where the move_to() method in ActionChains will throw AttributeErrors when using EventFiringWebDriver. Fixes #6604 --- py/selenium/webdriver/common/actions/pointer_actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py/selenium/webdriver/common/actions/pointer_actions.py b/py/selenium/webdriver/common/actions/pointer_actions.py index 9fc4a0e136cb4..f93685749302a 100644 --- a/py/selenium/webdriver/common/actions/pointer_actions.py +++ b/py/selenium/webdriver/common/actions/pointer_actions.py @@ -21,6 +21,7 @@ from .pointer_input import PointerInput from selenium.webdriver.remote.webelement import WebElement +from selenium.webdriver.support.event_firing_webdriver import EventFiringWebElement class PointerActions(Interaction): @@ -38,7 +39,7 @@ def pointer_up(self, button=MouseButton.LEFT): self._button_action("create_pointer_up", button=button) def move_to(self, element, x=None, y=None): - if not isinstance(element, WebElement): + if not isinstance(element, (WebElement, EventFiringWebElement)): raise AttributeError("move_to requires a WebElement") if x is not None or y is not None: el_rect = element.rect