开发者

Does selenium support devexpress grid to record and playback using selenium IDE?

开发者 https://www.devze.com 2023-04-12 21:36 出处:网络
I have a web app which contains devexpress grid. I tried开发者_高级运维 to click the link displayed in one of the column of the grid, but it doesn\'t capture anything. Can anyone help me to fix this!Y

I have a web app which contains devexpress grid. I tried开发者_高级运维 to click the link displayed in one of the column of the grid, but it doesn't capture anything. Can anyone help me to fix this!


Yes, Selenium works with DevExpress controls, but the Selenium IDE recorder often fails to detect the correct element in which case you need to replace the 'Target' parameter with a manually entered one. You can use Firebug or equivalent to help find likely targets. Also, it sometimes helps to replace 'click' with a 'mouseDown' followed by a 'mouseUp'.

For instance, the following script works for clicking on rows and columns:

// 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");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号