Javascript 使用jquery单击处理程序在对象上进行Selenium IDE记录单击

Javascript 使用jquery单击处理程序在对象上进行Selenium IDE记录单击,javascript,jquery,selenium-ide,Javascript,Jquery,Selenium Ide,我正在使用Selenium记录web应用程序的测试脚本 应用程序中的某些页面包含表示数据库中记录列表的表。有一个jquery click处理程序附加到表行,它加载一个页面,允许用户在单击表行时编辑相关记录 不幸的是,SeleniumIDE没有记录表行上的单击。我看过代码,相关功能是: Recorder.prototype.findClickableElement = function(e) { if (!e.tagName) return null; var tagName =

我正在使用Selenium记录web应用程序的测试脚本

应用程序中的某些页面包含表示数据库中记录列表的表。有一个jquery click处理程序附加到表行,它加载一个页面,允许用户在单击表行时编辑相关记录

不幸的是,SeleniumIDE没有记录表行上的单击。我看过代码,相关功能是:

Recorder.prototype.findClickableElement = function(e) {
    if (!e.tagName) return null;
    var tagName = e.tagName.toLowerCase();
    var type = e.type;
    if (e.hasAttribute("onclick") || e.hasAttribute("href") || tagName == "button" ||
        (tagName == "input" && 
         (type == "submit" || type == "button" || type == "image" || type == "radio" || type == "checkbox" || type == "reset"))) {
        return e;
    } else {
        if (e.parentNode != null) {
            return this.findClickableElement(e.parentNode);
        } else {
            return null;
        }
    }
}
我试图通过添加以下内容对此进行修改:

if($ && $._data) {
    var ev = $._data(e, "events");
    if(ev && ev.click)
        return e;
}
但是,$.\u数据为空

如果我在Firebug中查看相同的变量,打开相同的网页时,$.\u数据存在,$.\u数据(e,“事件”)。单击也存在

我不知道为什么它在Firebug中存在,但在Selenium中不存在。Selenium是否可能在不同的上下文中运行,因此有两个不同的“$”变量,或者其他什么