又尝试了 scroll 方法,惯性有点大。有大佬可以提供一下思路么
# scroll 滚动事件
def scroll_sliding(self, source, target):
try:
logger.info(f"从元素<{source}>滚动到元素<{target}>")
self.driver.scroll(source, target)
except Exception as e:
logger.info(f"从元素<{source}>滚动到元素<{target}>失败")
raise e