selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: move target out of bounds


關於ActionChains(driver).move_by_offset(x,y)時,move target out of bounds的問題

move_by_offset()中使用坐標都是針對上一步的計算的,若不想計算,可使用reset_actions() 重置為(0,0)。

action = ActionChains(driver)
action.move_by_offset(x, y).click_and_hold().move_to_element(target).release().perform()
action.reset_actions()

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM