selenium是否支持使用selenium IDE录制和播放devexpress网格?



我有一个包含devexpress网格的web应用程序。我试图单击显示在网格的一列中的链接,但它没有捕获任何内容。有人能帮我修一下吗?

是的,Selenium可以与DevExpress控件一起工作,但是Selenium IDE记录器经常无法检测到正确的元素,在这种情况下,您需要将'Target'参数替换为手动输入的参数。您可以使用Firebug或类似的工具来帮助查找可能的目标。此外,有时用'mouseDown'后面跟着'mouseUp'来代替'click'也很有帮助。

例如,下面的脚本用于单击行和列:

// open the DevExpress grid demo (tested against version 11.2.5)
selenium.open("http://demos.devexpress.com/ASPxGridViewDemos/GridEditing/EditModes.aspx");
// click on the City column header
selenium.mouseDown("//td[@id='ContentHolder_grid_col3']/table/tbody/tr/td");
selenium.mouseUp("//td[@id='ContentHolder_grid_col3']/table/tbody/tr/td");
// click on the each of the first three rows
selenium.click("//tr[@id='ContentHolder_grid_DXDataRow0']/td/a");
selenium.click("//tr[@id='ContentHolder_grid_DXDataRow1']/td/a");
selenium.click("//tr[@id='ContentHolder_grid_DXDataRow2']/td/a");

最新更新