Using the following code:
elem = driver.find_element_by_xpath('/html/body/canvas')
from selenium.webdriver.common.action_chains import ActionChains
actions = ActionChains(driver)
actions.move_to_element_with_offset(elem, 185, -35).click().perform()
I am unable to navagate to the desired section of a canvas element and receive this error:
MoveTargetOutOfBoundsException: move target out of bounds
(Session info: chrome=85.0.4183.102)
My move target is most definitely within the viewport, no scrolling is necessary to make it clickable. I am using chromedriver and am using the top left corner of the canvas as the start point for my pixel coordinates for move_to_element_with_offset()
. Any ideas to fix this? I'm interested in any solutions to click a specified point on a canvas in python, doesn't need to use this same method.