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

How to get data of the rows and column in exe? #25

Open
ranjan1522 opened this issue Sep 5, 2018 · 0 comments
Open

How to get data of the rows and column in exe? #25

ranjan1522 opened this issue Sep 5, 2018 · 0 comments

Comments

@ranjan1522
Copy link

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.`

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

1 participant