错误:捕获到异常[错误:Selenium Python exp中不支持的命令[dragAndDrop]

2024-10-03 23:22:08 发布

您现在位置:Python中文网/ 问答频道 /正文

用于拖放命令的Selenium IDE和Katalon IDE命令在导出到python时不起作用。 导出时显示以下错误: 错误:捕获到异常[错误:不支持的命令[dragAndDrop |//*[@id=“ConsumerSlider”]/div | 100,0]]。 在python中尝试了下面这样的动作链,但没有用

en =  self.driver.find_element_by_xpath("//*[@id='ConsumerSlider']/div")
move = ActionChains(self.driver)
move.drag_and_drop_by_offset(en, +10, 0).perform()

它在执行时抛出这个错误

:self = response = {'status': 404, 'value': '{"value":{"error":"unknown command","message":"(Session info: chrome=78.0.3904.97)","stacktr...\n\tRtlGetAppContainerNamedObjectPath [0x779858ED+253]\n\tRtlGetAppContainerNamedObjectPath [0x779858BD+205]\n"}}'}


Tags: 命令selfdividmovebyvaluedriver