White Automation framework throws an exception whe

2019-08-02 20:20发布

I am using White Framework for automation. when I trying to get desktop instance I got exception "The type initializer for 'White.Core.Desktop' threw an exception."

My code looks like :

var window = White.Core.Desktop.Instance.Windows().Find(obj => obj.Title.Contains("TestAppHome"));

Is there any way to capture the window without exception that is without using White.Core.Desktop class?

Any help would be greatly appreciated !

1条回答
神经病院院长
2楼-- · 2019-08-02 20:51

Try this one:

List<White.Core.UIItems.WindowItems.Window> windows = WindowFactory.Desktop.DesktopWindows();
var window = windows.Find(w => w.Title.Contains("TestAppHome"));
查看更多
登录 后发表回答