报错 MoveTargetOutOfBoundsException 的解决办法

来源:互联网 发布:琉璃神社最新备用域名 编辑:程序博客网 时间:2024/04/28 01:34
# 将 滚动条 拖动到 xxxx 按钮,上端对齐scroll_add_crowd_button = driver.find_element_by_xpath(xpath_button_add_crowd)driver.execute_script("arguments[0].scrollIntoView();", scroll_add_crowd_button)# 定位 添加条件 按钮,经观需要鼠标悬停xpath_button_add_condition = '//span[contains(text(),"添加条件")]'move_on_to_add_condition = driver.find_element_by_xpath(xpath_button_add_condition)        ActionChains(driver).move_to_element(move_on_to_add_condition).perform()time.sleep(2)

将 滚动条 拖动到 与将要 用 鼠标悬浮 的 元素的 平齐位置即可解决

原创粉丝点击