Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cannot use the find method of the toDataGrid extension. #105

Open
reneeazevedo opened this issue Nov 18, 2019 · 2 comments
Open

I cannot use the find method of the toDataGrid extension. #105

reneeazevedo opened this issue Nov 18, 2019 · 2 comments

Comments

@reneeazevedo
Copy link

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);

image

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)

@nguyenvongochuy
Copy link

nguyenvongochuy commented Oct 20, 2020

Did you have solution for this? I also have the same problem when I try to access Grid of WCF Test Client on the right panel when double click to open service and input.

But I cannot input value in the grid.

Do you all have any solution grid in WCF Test Client?

https://imgur.com/a/1vxbutE

Thanks

@nguyenvongochuy
Copy link

I use both locator but error:

    private IWebElement InputControl
    {
        //get { return driver.FindElement(By.Id("inputControl")); } //both locator cannot catch grid
        get { return driver.FindElement(By.ClassName("WindowsForms10.LISTBOX.app.0.141b42a_r10_ad1")); }
    }


        DataGrid grid = InputControl.ToDataGrid();
        int c = grid.ColumnCount; //error here because of not catch grid object
        int r = grid.RowCount; //error here because of not catch grid object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants