Open ankursha1 opened 3 years ago
@ankursha1 Could you provide more details:
@ankursha1 Could you provide more details:
- code example
- screenshot
- Is checkbox visible in Inspector.exe?
- Is checkbox available in Session.PageSource?
- Is checkbox has ScrollItemPatternAvalable=true?
Hi @Shakevg , Thanks for responding.
Code sample
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "Windows");
capabilities.setCapability("deviceName", "WindowsPC");
capabilities.setCapability("app", "D:\\Work\\WindowsApp\\DataGrid.exe");
// open
session = new WindowsDriver<WindowsElement>(new URL("http://127.0.0.1:4723/"), capabilities);
session.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
String xpath = "/Window/Tab/TabItem[3]";
RemoteWebElement tabView = (RemoteWebElement)session.findElement(By.xpath(xpath));
tabView.click();
//xpath = "/Window/Tab/TabItem[3]/DataGrid/DataItem[2]/Custom[5]"; ---> click on it scrolls cell into view
xpath = "/Window/Tab/TabItem[3]/DataGrid/DataItem[2]/Custom[5]/Checkbox";
RemoteWebElement checkBoxItem = session.findElement(By.xpath(xpath));
checkBoxItem.click();
-Screenshot Checkbox is inside 5 column cell which is partially visible.
checkbox visible in Inspector.exe Yes
Hi, I have a application which has a datagrid. The datagrid has row/column which contains some data. Few column are not visible in the view but available in datagrid. Datagrid cells has autoscroll support so when i try to perform click action on datagrid cell, winappdriver automatically scroll to cell and perform click action but when i try to perform click action on the checkbox in side cell, autoscroll does not work and action is not performed. Please help on how to perform action on control inside datagrid cell which is not visible.
Thanks