How to debug test project when testing using WinAppDriver
See original GitHub issueHi Team,
We have our custom control that acts like MS DataGrid. We used the Windows driver to retrieve the framework elements and perform some actions on the control (like click). But the elements are not retrieved properly and we need to debug through the methods of our custom control from Windows driver methods. Can you suggest a way to debug the testing project? Below are the method that we use from Windows driver to get elements.
var options = new AppiumOptions();
options.AddAdditionalCapability("app", @"\....\bin\Debug\GridControlDemo.exe");
options.AddAdditionalCapability("deviceName", "LAPN-23996");
_driver = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723/"), options);
_driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
Actions actions = new Actions(_driver);
var grid1 = _driver.FindElementByAccessibilityId("Grid1");
var firstCellValue = grid1.FindElementByName("GridCell_R1_C1");
actions.MoveToElement(firstCellValue).ContextClick().Build().Perform();
Thanks in Advance, Arulpriya R
Issue Analytics
- State:
- Created a year ago
- Comments:12
Top GitHub Comments
Arulpriya What do you mean to Debug? Why you cannot use standart methods of your IDE?
@Shakevg We tried as you suggested, but it didn’t work. We are getting the same Grid when accessing the grids by using FindElementByAccessibilityId. Look at the screenshot taken when debugging the test,
(Note: We used the cell value text to indicate that both grids have the same value)
The element ID in both grids is the same. So, we could not perform click actions in the second grid. Please suggest a solution to get each element to perform actions.