This is a migrated thread and some comments may be shown as answers.

Automated Testing for Batch Update Telerik Grid

1 Answer 100 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
skaw asked on 06 Jun 2013, 06:18 PM
We need help in writing automated test scripts for testing Telerik Batch Update Grid. Our automation script fails while trying to enter values into text boxes on edit of the grid. Clicking on the cell of the grid does not open the text box when we use our automated script.

Would appreciate any help on this...

Our script looks like something like this...

driver.Click("//form[@id='POLinesform']/table/tbody/tr/td[@id='LineNumber' and text()='1']/../td[@id='Warehouse']");
driver.ClearSendKeysWithName("Warehouse", testPo.warehouse);

Let me know if more information is needed.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 11 Jun 2013, 04:58 PM
Hello skaw,

Does your grid behave like this online demo?

In this demo it requires a double click to put the cell into edit mode. This code works to update this particular grid.

// Find the grid we want to update
RadGrid grid = ActiveBrowser.Find.ByExpression<RadGrid>("id=?RadGrid1");
// Locate the cell to be updated
HtmlTableCell cellToEdit = grid.MasterTable.Rows[1].Cells[1];
// Put the cell in edit mode by a mouse doubleclick
// Locate the <input> element that is added when the cell enters edit mode
HtmlInputText inputBox = cellToEdit.Find.ByTagIndex<HtmlInputText>("input", 0);
// Give it a new value
Actions.SetText(inputBox, "New Value");
// Exit edit mode by clicking on a different cell. Any cell will do.

If your grid behaves differently, can you point me to a publicly accessible URL where I can see its behavior and come up with a solution to automate it?

Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question