嗨,我在自动拖放挂起直到我手动将光标移动到下面的代码时遇到了问题。我是自动化测试的新手。感谢您的帮助,谢谢。
def drag_element(self):
self.element = self.driver.find_element_by_xpath('xpath')
try:
self.logger.debug("\nAtempting to perform drag and drop")
self.action_chains = ActionChains(self.driver)
self.action_chains.drag_and_drop_by_offset(self.element,1,1).perform()
return True
except NoSuchElementException:
self.auto_log("error", "Element {} does not exist".format(self.element))
return None