Javascript Robotframework/Selenium2Library:为什么拖放不适用于可拖动的元素?
如果安装了python v2.7、robotframework v2.8.7和Selenium2Library v1.6.0,则可以运行以下测试用例来了解问题,例如使用:pybot-L TRACEJavascript Robotframework/Selenium2Library:为什么拖放不适用于可拖动的元素?,javascript,selenium,selenium-webdriver,webdriver,robotframework,Javascript,Selenium,Selenium Webdriver,Webdriver,Robotframework,如果安装了python v2.7、robotframework v2.8.7和Selenium2Library v1.6.0,则可以运行以下测试用例来了解问题,例如使用:pybot-L TRACE *** Settings *** Library Selenium2Library *** Variables *** *** Test Cases *** DragDemo Open Browser http://www.w3schools.com/html/h
*** Settings ***
Library Selenium2Library
*** Variables ***
*** Test Cases ***
DragDemo
Open Browser http://www.w3schools.com/html/html5_draganddrop.asp firefox
# NO VISIBLE ACTION HERE, BUT COMMANDS TAKE SOME MINUTES TO EXECUTE WITHOUT FAILURE
Wait Until Page Contains Element //img[@id='drag1']
Drag And Drop //img[@id='drag1'] //div[@id='div2']
Drag And Drop By Offset //img[@id='drag1'] 50 0
Drag And Drop By Offset //img[@draggable='true'] 100 0
Drag And Drop By Offset //img[@alt='W3Schools'] 10 -10
Mouse Down //img[@id='drag1']
Mouse Over //div[@id='div2']
Mouse Up //div[@id='div2']
# DRAG AND DROP ACTION HERE
Drag And Drop By Offset //span[contains(text(),'Drag and Drop')] 500 -500
Sleep 5
*** Keywords ***
该测试导航到公共网站,并尝试以各种方式拖放可拖动的元素。正如内联注释中提到的,这些命令执行时没有失败,但没有明显的效果。然而,最后一个拖放命令是在不可拖动的元素上执行的,奇怪的是,标记了一些操作文本。测试日志显示POST在任何一种情况下都会执行。为什么其他DnD命令不能按预期工作