我正在使用Mocha通過Browserstack在移動網站上運行基於JavaScript的Selenium測試。我的測試適用於微不足道的情況(找到這個元素,點擊它,期望然後找到包含此文本的元素)。Selenium中的移動手勢/ Browserstack與節點
但是,現在我已經達到了需要模擬手勢(從右向左輕彈)的情況。我在Selenium Java API(http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html)中找到了TouchActions類的文檔,但是我沒有在Javascript實現中找到任何匹配的類或方法。
做不到這一點,我試圖手動元素的點擊和拖動屏幕的右側提供相同的手勢:
var btn = driver.findElement(webdriver.By.css('h2+button'));
driver.actions().
mouseUp().
mouseMove(btn).
mouseDown().
mouseMove({x: -500, y: 0}).
mouseUp().
perform();
不幸的是,讓我:
UnknownCommandError: The requested command is currently not yet supported by selendroid.
有沒有人有任何其他建議通過在Node/js中通過Selenium傳遞此手勢?