I cannot use the find method of the toDataGrid extension.
reneeazevedo opened this issue · comments
I can't retrieve the value of a cell from a datagridview.
Code;
var grid = _driver.FindElementByName("DataGridView");
var itensgrid = grid.ToDataGrid();
var b = itensgrid.Find(1,1);
Message:
OpenQA.Selenium.NoSuchElementException : NOT GET ITEM
Rastreamento de Pilha:
RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary2 parameters)
RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters)
DataGrid.CallDataGridcellCommand(String command, Int32 row, Int32 column)
DataGrid.Find(Int32 row, Int32 column)
In your code line 1, You have just identified the element presence.
You need to get_text() of element or element.attribute('Name/value')
You must be having an unique id for each rows values to retrieve. use that to iterate through the rows.