Selenium sendkeys for vb.net app with gridcell

275 views Asked by At

I have following html page generated dyamically in vb.net app <td class="GridCellRightAlign" role = "gridcell" aria-describedBy = "grdFromActInfo_colheader_2"> 0.00 </td> I am using C# with Selenium WebDriver to sendkeys in this field using xpath. But it does not work. The C# Selenium code is as follows By.XPath("//*[@id'grdFromActInfo']/table/tbody/tr[1]/td[1]/table/tbody[2]/tr/td/div[2]/table/tbody/tr/th).SendKeys("25"). I generated this xpath in Chrome Dev Tools using Inspect option

1

There are 1 answers

4
Ukrainis On
var element = driver.FindElement(By.XPath("//*[@id'grdFromActInfo']/table/tbody/tr[1]/td[1]/table/tbody[2]/tr/td/div[2]/table/tbody/tr/th");
element.SendKeys("25");