我想测试API of WPF
已经在运行的应用程序。
该应用程序是单窗口应用程序,它MainWindow
包含我想获取的对象(it's public and has public methods and properties
)
有没有办法从 Gui 或 Process 到底层并获取存在的对象?
// Interaction logic for MainWindow.xaml
public partial class MainWindow : Window
{
//this is the object to be fetch
public AppAPI AppAPI { get; private set; } }
public class AppAPI
{
private void IncrementCounter(){...}
public int GetClickCounter(){...}
public void Click(){...}
public void Launch(){...}
}