如何使用Selenium测试一个JQuery UI可排序小部件? [英] How to test a JQuery UI Sortable widget using Selenium?

查看:193
本文介绍了如何使用Selenium测试一个JQuery UI可排序小部件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用 JQuery UI Sortable 列出我们正在尝试使用Selenium进行自动化的排序列表。

We have a sortable list using JQuery UI Sortable that we are trying to automate using Selenium.

看起来dragAndDrop函数应该可以工作,但是当我们调用它时,UI不会改变。但是,如果我们使用firebug查看DOM,我们会看到列表元素DID的顺序发生变化。似乎只是UI不会刷新。

It looks like the dragAndDrop function should work, but when we call it, the UI does not change. However if we look at the DOM with firebug, we see that the order of the list elements DID change. It seems it's just the UI that does not refresh.

任何想法如何使其工作?

Any idea how to get it working?

推荐答案

没有解决方案我们可以找到工作,所以我们只是创建了帮助JavaScript的JavaScript函数,使用jQuery移动html元素。它适用于我们的案例,但感觉很脏!

No solution we could find worked, so we simply created helper javascript functions that moved the html elements around using jQuery. It worked for our case but it feels dirty!

这篇关于如何使用Selenium测试一个JQuery UI可排序小部件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆