Monday, April 2, 2012

Webdriver - How to handle UltraWebGrid

Webdriver - How to handle UltraWebGrid.

In my application to update any cell, use need to "DoubleClick" to get the cell focus and type the text. Initially I have used "SendKeys" and ".innerHTML" values get displayed on the screen, but they are not getting saved.

I have used below code to solve the issue.


Actions action = new Actions(driver);
action.doubleClick(driver.findElement(By.id("ctl00xcpheRFxxUltraWebGrid1_rc_4_1")));
action.perform();
action.sendKeys(driver.findElement(By.id("ctl00xcpheRFxxUltraWebGrid1_rc_4_1")), "Bharath");
action.perform();
Wait(5000);
action.doubleClick(driver.findElement(By.id("ctl00_cpheRFx_lblComputed")));
action.perform();
Wait(5000);

driver.findElement(By.id("ctl00_cpheRFx_btnAddRow")).click();
Wait(5000);

UltraWebGrid Screen shot



---



No comments:

Post a Comment