English 中文(简体)
我如何从一个 j子那里获得吗?
原标题:How do I get the Id of a button of a jquery UI dialog?

标题是......。

这是我所尝试的,但没有工作。

 $( #uxReferralAssessmentDetailsDialog ).dialog({
            autoOpen: false,
            modal: true,
            width: 400,
            title: "Referral Assessment",
            buttons: { "Save":{ id:  uxbtnSaveAssessment , click:othis.OnAssessmentSave}, "Cancel": function() { $(this).dialog("close"); } }
        });

我使用的是ium,而不是马匹尔 x,我想利用每个元素的id来简化Xpath。

欢迎任何意见。

问题回答

如果你有很强的时间来决定id,以及正用 j印添加到html页的其他事项。 利用一种开发工具,如火焰燃烧等网络浏览器,作为火ox添加剂:

See link for firebug addon for more information: https://addons.mozilla.org/en-US/firefox/addon/1843





相关问题
Javascript communication with Selenium (RC)

My Application has a lot of calculation being done in JavaScript according to how and when the user acts on the application. The project prints out valuable information (through console calls) as to ...

Running automated Web browser tests under Hudson

I m running Hudson for my automated builds and love it. I d now like to create automated Web browser tests using either WaTiN (preferred) or Selenium. As my Hudson runs as a Windows service (under ...

Using a Java library with Scala reserved words

I m using an external library written in Java (Selenium). One of the function calls has the signature type(String, String), and I keep getting compiler errors when trying to call it from Scala, that ...

Heightened privilege selenium browsers on Windows 7 (x64)

I make use of *firefox and *iexplore etc. within my selenium tests to get around the issue of self-signed SSL certificates on my local machine. Unfortunately, now that I ve moved from XP over to 7, ...

Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my ...

Selenium IDE: Incrementing values by 1 and 71

Currently I m incrementing a value called wert by 1 with the following code: getEval storedVars[ wert ]=${wert}+1; The value wert is something like 80401299. I want to add 1 to the value, if it ...

热门标签