question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to debug test project when testing using WinAppDriver

See original GitHub issue

Hi 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:open
  • Created a year ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
Shakevgcommented, Aug 19, 2022

Arulpriya What do you mean to Debug? Why you cannot use standart methods of your IDE?

0reactions
vijayarasancommented, Nov 11, 2022

@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,

image

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Automate Desktops Apps Using WinAppDriver
Tools for Desktop App Automation Testing; WinAppDriver and Appium ... Needless to mention, you can write test cases in popular ...
Read more >
WinAppDriver and Desktop UI Test Automation
UITest for testing iOS and Android apps using the NUnit test framework. ... WinAppDriver, then; Create a Unit Test Project in Visual Studio....
Read more >
Set up WinAppDriver in Katalon Studio
This document shows you how to install and run Windows Application Driver (WinAppDriver) on a Windows 10 machine before performing Windows Desktop Apps...
Read more >
Remote Testing in Visual Studio 2022 - YouTube
Using Remote testing we can run Unit/Integration and UI testing in Linux, ... 2022 to remote environments for running and debugging tests ......
Read more >
WinForms UI Test Automation with Appium
Add UnitTest project to the solution of your test application or create ... There are two general ways to write tests: Using WinAppDriver...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found