簡體   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