我正在使用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传递此手势?