Now getting the automation ids of both rows and column, but still unable to fetch the data of the rows and single cell. Below I have mentioned the code snippet of fetching the value which is available in cell but still not able to read the excepted value.
`String appPath = "C:\Users\windev\Desktop\WPF-561572249\WPF\bin\Debug\SfDataGridDemo.exe";
DesktopOptions option = new DesktopOptions();
option.setApplicationPath(appPath);
option.setDebugConnectToRunningApp(false);
option.setLaunchDelay(2);
driver = new WiniumDriver(new URL("http://localhost:9999"),option);
Thread.sleep(7000);
WebElement close = driver.findElementById("btn_Close");
close.click();
try
{
WebElement element = driver.findElementById("sfgrid");
DataGrid dataGrid = WebElementExtensions.toDataGrid(element);
RemoteWebElement cell = (RemoteWebElement) dataGrid.findElementById("Row1");
Thread.sleep(4000);
System.out.println("Content Data in the cell is: "+cell.getAttribute("Name"));
}
catch(Exception e)
{
System.out.println("error:"+e);
}
Output: Content Data in the cell is: GridCell
But the expected output is 1001 which is availabe in the table.`
Now getting the automation ids of both rows and column, but still unable to fetch the data of the rows and single cell. Below I have mentioned the code snippet of fetching the value which is available in cell but still not able to read the excepted value.
`String appPath = "C:\Users\windev\Desktop\WPF-561572249\WPF\bin\Debug\SfDataGridDemo.exe";
DesktopOptions option = new DesktopOptions();
option.setApplicationPath(appPath);
option.setDebugConnectToRunningApp(false);
option.setLaunchDelay(2);
driver = new WiniumDriver(new URL("http://localhost:9999"),option);
Thread.sleep(7000);
WebElement close = driver.findElementById("btn_Close");
close.click();
try
{
WebElement element = driver.findElementById("sfgrid");
DataGrid dataGrid = WebElementExtensions.toDataGrid(element);
RemoteWebElement cell = (RemoteWebElement) dataGrid.findElementById("Row1");
Thread.sleep(4000);
System.out.println("Content Data in the cell is: "+cell.getAttribute("Name"));
}
catch(Exception e)
{
System.out.println("error:"+e);
}
Output: Content Data in the cell is: GridCell
But the expected output is 1001 which is availabe in the table.`