What happened?
move_to_element_with_offset(element, 0, 0) is clicking at the middle of the element.
How can we reproduce the issue?
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
def test_click_top_left_selenium():
driver = webdriver.Chrome()
driver.get("file:///C:/Users/user/Desktop/GitHub/selenium-python-helium/tests/api/data/test_point.html")
el = driver.find_element(By.XPATH, "//button[text()='Button 1']")
action = ActionChains(driver)
action.move_to_element_with_offset(el, 0, 0)
action.click()
action.perform()
assert driver.find_element(By.ID, "result").text == "Button 1 clicked at offset (0, 0)."
Relevant log output
Operating System
Windows 10
Selenium version
Python 3.9
What are the browser(s) and version(s) where you see this issue?
Chrome 97
What are the browser driver(s) and version(s) where you see this issue?
Chromedriver 97
Are you using Selenium Grid?
Python Selenium 4.1.0
What happened?
move_to_element_with_offset(element, 0, 0) is clicking at the middle of the element.
How can we reproduce the issue?
Relevant log output
Operating System
Windows 10
Selenium version
Python 3.9
What are the browser(s) and version(s) where you see this issue?
Chrome 97
What are the browser driver(s) and version(s) where you see this issue?
Chromedriver 97
Are you using Selenium Grid?
Python Selenium 4.1.0