Sdk/apis that can pull text from Form input objects from another C# windows from?

  c++, windows, winforms

Sdk/apis that can pull text from Form input objects from another C# windows from?

I am testing a C# Windows Form application created by another company.

I would like to write a program that can perform a series of inputs (like clicks and keypresses), then verify that text on the screen appears as expected.

We currently are resorting to OCR for this task using Eggplant, and it’s not that great very problematic.

I would much rather have an API or SDK that can do this.

I’ve heard of Spy++ which is a component of Visual Studio that can do this kind of “inspection” as if it were devtools on chrome.

So I can get the Window handle(s) owned by my process with:
.NET (C#): Getting child windows when you only have a process handle or PID?

But how then can you extract text from the Labels and Input elements from the Windows Form for use in a automated test?

I found ManagedSpy https://github.com/ForNeVeR/ManagedSpy and it seems to possibly have some ability to do this. Maybe I can steal some code out of that.


Source: StackOverflow

LEAVE A COMMENT