51Testing软件测试论坛

标题: 求助,selenium drag_and_drop不生效 [打印本页]

作者: xiaoyaz    时间: 2016-10-21 00:23
标题: 求助,selenium drag_and_drop不生效
i用selenium drag_and_drop模拟鼠标拖拽动作,
拖拽动作没生效,代码运行无报错

请专家帮忙看下代码哪里有问题:
html:
    http://www.jb51.net/w3school/tiy ... lobal_draggable.htm

python代码:

if __name__=='__main__':
    from selenium import webdriver
    from selenium.webdriver.common.action_chains import ActionChains
    fbrowser=webdriver.Firefox()
    fbrowser.get("file:///D:/python_study/test/test.html")
    source=fbrowser.find_element_by_id('div1')
    des=fbrowser.find_element_by_id('drag1')
    ActionChains(fbrowser).drag_and_drop(source,des).perform()


软件版本信息:
firefox 45.0.1
selenium 2.53.0




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2