Last active
January 16, 2019 12:34
-
-
Save umihico/dfe8d1177e6edff7d4aee222a2d3ca57 to your computer and use it in GitHub Desktop.
Bug hunting -Element is not clickable at point. Other element would receive the click-
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium.webdriver.remote.webelement import WebElement | |
from selenium.webdriver.common.action_chains import ActionChains | |
WebElement._origin_click = WebElement.click | |
def click(self): | |
try: | |
self._origin_click() | |
except Exception as e: | |
try: | |
action = ActionChains(self.parent) | |
action.move_to_element(moving_to_element) | |
except Exception as e: | |
try: | |
self._origin_click() | |
except Exception as e: | |
self.parent.execute_script("arguments[0].click();", self) | |
WebElement.click = click |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment