开发者

automationelement write

开发者 https://www.devze.com 2023-03-12 12:52 出处:网络
Im working on a test to test a desktop application. Im using automation elements, from the API of microsoft. I want to write on textboxs. How can I write in a textbox that i get with an automationelem

Im working on a test to test a desktop application. Im using automation elements, from the API of microsoft. I want to write on textboxs. How can I write in a textbox that i get with an automationelement?

Im trying to make a test that navegate through an application, but i want to write in the textboxs that there are.

I already have the automation element of the textbox, but i dont know how to write.

What i can do it?开发者_JAVA技巧 And how it will be for clicking on buttons?

Thanks


Late, but maybe anyone need it in future:

To edit a value of an AutomationElement u have to call:

ValuePattern editValue = (ValuePattern)myAutomationElement.GetCurrentPattern(ValuePattern.Pattern);

after that, u can edit with:

editValue.SetValue("Add ur value HERE");

Greetz Kooki

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号