本文介紹了如何測試阻力&AngularJS e2e 測試中的刪除功能的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我正在嘗試測試我的應用程序,我需要將小部件從一個位置移動到另一個位置,換句話說,我需要測試拖動 &在端到端測試中刪除功能.
I am trying to test my application where I need to move a widget from one location to other, in other word I need to test drag & drop functionality in an end to end test.
我將如何測試這個?
推薦答案
我也遇到了同樣的問題.我的解決方案是在此處遵循 Selenium 問題中的建議:https://code.google.com/p/selenium/issues/detail?id=3604#c20
I had this same issue. The solution for me was to follow the advice in the Selenium issue here: https://code.google.com/p/selenium/issues/detail?id=3604#c20
從@nilsK 的示例開始,這是我的解決方案:
Starting with the example from @nilsK, here was my solution:
var yourOffset = {x:5,y:5};
ptor().actions()
.mouseMove(yourElement,yourOffset)
.mouseDown()
.mouseMove(yourElement,{x:0,y:0}) // Initial move to trigger drag start
.mouseMove(youTarget[,targetOffset]) // [] optional
.mouseUp()
.perform();
我認為這也解決了這個問題
這篇關于如何測試阻力&AngularJS e2e 測試中的刪除功能的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!