繁体   English   中英

如何自动化Selenium RC中的拖放功能

[英]how to automate the drag and drop functionality in selenium rc

我正在尝试自动化selenium rc中的拖放功能,我不确定selenium api中是否存在拖放方法,请就如何执行这种测试提出任何想法。

谢谢

对于硒RC,

selenium.mouseMove("<sourceLocator>");
selenium.mouseDown("<sourceLocator>");
selenium.mouseMove("<destinationLocator>");
selenium.mouseUp("<destinationLocator>");

这是链接 如果您开始使用Selenium Webdriver而不是RC会更好,因为它已正式弃用。

我不知道它如何在Java中工作,但在JS中它以这种方式工作

driver.actions().dragAndDrop(source, target).perform();

链接可能有助于在java =中编写相同的代码)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM