Skip to content

Commit 3eeb405

Browse files
Kyle McGonagleAutomatedTester
authored andcommitted
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
1 parent 0ed1e0b commit 3eeb405

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

py/selenium/webdriver/common/actions/pointer_actions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .pointer_input import PointerInput
2222

2323
from selenium.webdriver.remote.webelement import WebElement
24+
from selenium.webdriver.support.event_firing_webdriver import EventFiringWebElement
2425

2526

2627
class PointerActions(Interaction):
@@ -38,7 +39,7 @@ def pointer_up(self, button=MouseButton.LEFT):
3839
self._button_action("create_pointer_up", button=button)
3940

4041
def move_to(self, element, x=None, y=None):
41-
if not isinstance(element, WebElement):
42+
if not isinstance(element, (WebElement, EventFiringWebElement)):
4243
raise AttributeError("move_to requires a WebElement")
4344
if x is not None or y is not None:
4445
el_rect = element.rect

0 commit comments

Comments
 (0)